Changes in / [1755226:9bae71f]
- Location:
- src
- Files:
-
- 17 edited
-
CodeGen/CodeGenerator.cc (modified) (8 diffs)
-
InitTweak/FixInit.cc (modified) (5 diffs)
-
InitTweak/GenInit.cc (modified) (15 diffs)
-
InitTweak/GenInit.h (modified) (1 diff)
-
InitTweak/InitTweak.cc (modified) (9 diffs)
-
InitTweak/InitTweak.h (modified) (1 diff)
-
ResolvExpr/Resolver.cc (modified) (1 diff)
-
ResolvExpr/Resolver.h (modified) (1 diff)
-
ResolvExpr/TypeEnvironment.cc (modified) (1 diff)
-
SymTab/Autogen.cc (modified) (15 diffs)
-
SymTab/FixFunction.cc (modified) (1 diff)
-
SymTab/Indexer.cc (modified) (2 diffs)
-
SymTab/Indexer.h (modified) (3 diffs)
-
SymTab/Mangler.cc (modified) (15 diffs)
-
SymTab/Validate.cc (modified) (6 diffs)
-
SynTree/Visitor.h (modified) (1 diff)
-
main.cc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/CodeGen/CodeGenerator.cc
r1755226 r9bae71f 443 443 void CodeGenerator::postvisit( UntypedExpr * untypedExpr ) { 444 444 extension( untypedExpr ); 445 if ( NameExpr * nameExpr = dynamic_cast< NameExpr* >( untypedExpr-> function) ) {445 if ( NameExpr * nameExpr = dynamic_cast< NameExpr* >( untypedExpr->get_function() ) ) { 446 446 OperatorInfo opInfo; 447 if ( operatorLookup( nameExpr-> name, opInfo ) ) {448 std::list< Expression* >::iterator arg = untypedExpr-> args.begin();447 if ( operatorLookup( nameExpr->get_name(), opInfo ) ) { 448 std::list< Expression* >::iterator arg = untypedExpr->get_args().begin(); 449 449 switch ( opInfo.type ) { 450 450 case OT_INDEX: 451 assert( untypedExpr-> args.size() == 2 );451 assert( untypedExpr->get_args().size() == 2 ); 452 452 (*arg++)->accept( *visitor ); 453 453 output << "["; … … 461 461 case OT_CTOR: 462 462 case OT_DTOR: 463 if ( untypedExpr-> args.size() == 1 ) {463 if ( untypedExpr->get_args().size() == 1 ) { 464 464 // the expression fed into a single parameter constructor or destructor may contain side 465 465 // effects, so must still output this expression … … 480 480 (*arg++)->accept( *visitor ); 481 481 output << opInfo.symbol << "{ "; 482 genCommaList( arg, untypedExpr-> args.end() );482 genCommaList( arg, untypedExpr->get_args().end() ); 483 483 output << "}) /* " << opInfo.inputName << " */"; 484 484 } // if … … 488 488 case OT_PREFIXASSIGN: 489 489 case OT_LABELADDRESS: 490 assert( untypedExpr-> args.size() == 1 );490 assert( untypedExpr->get_args().size() == 1 ); 491 491 output << "("; 492 492 output << opInfo.symbol; … … 497 497 case OT_POSTFIX: 498 498 case OT_POSTFIXASSIGN: 499 assert( untypedExpr-> args.size() == 1 );499 assert( untypedExpr->get_args().size() == 1 ); 500 500 (*arg)->accept( *visitor ); 501 501 output << opInfo.symbol; … … 504 504 case OT_INFIX: 505 505 case OT_INFIXASSIGN: 506 assert( untypedExpr-> args.size() == 2 );506 assert( untypedExpr->get_args().size() == 2 ); 507 507 output << "("; 508 508 (*arg++)->accept( *visitor ); … … 517 517 } // switch 518 518 } else { 519 // builtin routines 520 nameExpr->accept( *visitor ); 521 output << "("; 522 genCommaList( untypedExpr->args.begin(), untypedExpr->args.end() ); 523 output << ")"; 519 if ( nameExpr->get_name() == "..." ) { // case V1 ... V2 or case V1~V2 520 assert( untypedExpr->get_args().size() == 2 ); 521 (*untypedExpr->get_args().begin())->accept( *visitor ); 522 output << " ... "; 523 (*--untypedExpr->get_args().end())->accept( *visitor ); 524 } else { // builtin routines 525 nameExpr->accept( *visitor ); 526 output << "("; 527 genCommaList( untypedExpr->get_args().begin(), untypedExpr->get_args().end() ); 528 output << ")"; 529 } // if 524 530 } // if 525 531 } else { 526 untypedExpr-> function->accept( *visitor );532 untypedExpr->get_function()->accept( *visitor ); 527 533 output << "("; 528 genCommaList( untypedExpr-> args.begin(), untypedExpr->args.end() );534 genCommaList( untypedExpr->get_args().begin(), untypedExpr->get_args().end() ); 529 535 output << ")"; 530 536 } // if … … 532 538 533 539 void CodeGenerator::postvisit( RangeExpr * rangeExpr ) { 534 rangeExpr-> low->accept( *visitor );540 rangeExpr->get_low()->accept( *visitor ); 535 541 output << " ... "; 536 rangeExpr-> high->accept( *visitor );542 rangeExpr->get_high()->accept( *visitor ); 537 543 } 538 544 -
src/InitTweak/FixInit.cc
r1755226 r9bae71f 58 58 #include "SynTree/TypeSubstitution.h" // for TypeSubstitution, operator<< 59 59 #include "SynTree/Visitor.h" // for acceptAll, maybeAccept 60 #include "Tuples/Tuples.h" // for isTtype 60 61 61 62 bool ctordtorp = false; // print all debug … … 338 339 } else if ( DeclarationWithType * funcDecl = dynamic_cast< DeclarationWithType * > ( function->get_var() ) ) { 339 340 FunctionType * ftype = dynamic_cast< FunctionType * >( GenPoly::getFunctionType( funcDecl->get_type() ) ); 340 assert f( ftype, "Function call without function type: %s", toString( funcDecl ).c_str());341 assert( ftype ); 341 342 if ( CodeGen::isConstructor( funcDecl->get_name() ) && ftype->get_parameters().size() == 2 ) { 342 343 Type * t1 = getPointerBase( ftype->get_parameters().front()->get_type() ); … … 367 368 } 368 369 369 bool ResolveCopyCtors::skipCopyConstruct( Type * type ) { return ! isConstructable( type ); } 370 bool ResolveCopyCtors::skipCopyConstruct( Type * type ) { 371 return dynamic_cast< VarArgsType * >( type ) || dynamic_cast< ReferenceType * >( type ) || GenPoly::getFunctionType( type ) || Tuples::isTtype( type ); 372 } 370 373 371 374 Expression * ResolveCopyCtors::makeCtorDtor( const std::string & fname, ObjectDecl * var, Expression * cpArg ) { … … 816 819 assert( ! ctorInit->get_ctor() || ! ctorInit->get_init() ); 817 820 Statement * dtor = ctorInit->get_dtor(); 818 // don't need to call intrinsic dtor, because it does nothing, but819 // non-intrinsic dtors must be called820 821 if ( dtor && ! isIntrinsicSingleArgCallStmt( dtor ) ) { 821 // set dtor location to the object's location for error messages822 ctorInit->dtor->location = objDecl->location;822 // don't need to call intrinsic dtor, because it does nothing, but 823 // non-intrinsic dtors must be called 823 824 reverseDeclOrder.front().push_front( objDecl ); 824 825 } // if … … 1011 1012 // skip non-DWT members 1012 1013 if ( ! field ) continue; 1013 // skip non-constructable members1014 if ( ! tryConstruct( field ) ) continue;1015 1014 // skip handled members 1016 1015 if ( ! unhandled.count( field ) ) continue; -
src/InitTweak/GenInit.cc
r1755226 r9bae71f 62 62 }; 63 63 64 struct CtorDtor : public WithGuards, public WithShortCircuiting , public WithVisitorRef<CtorDtor>{64 struct CtorDtor : public WithGuards, public WithShortCircuiting { 65 65 /// create constructor and destructor statements for object declarations. 66 66 /// the actual call statements will be added in after the resolver has run … … 75 75 // that need to be constructed or destructed 76 76 void previsit( StructDecl *aggregateDecl ); 77 void previsit( AggregateDecl * ) { visit_children = false; } 78 void previsit( NamedTypeDecl * ) { visit_children = false; } 79 void previsit( FunctionType * ) { visit_children = false; } 77 void previsit( __attribute__((unused)) UnionDecl * aggregateDecl ) { visit_children = false; } 78 void previsit( __attribute__((unused)) EnumDecl * aggregateDecl ) { visit_children = false; } 79 void previsit( __attribute__((unused)) TraitDecl * aggregateDecl ) { visit_children = false; } 80 void previsit( __attribute__((unused)) TypeDecl * typeDecl ) { visit_children = false; } 81 void previsit( __attribute__((unused)) TypedefDecl * typeDecl ) { visit_children = false; } 82 void previsit( __attribute__((unused)) FunctionType * funcType ) { visit_children = false; } 80 83 81 84 void previsit( CompoundStmt * compoundStmt ); … … 93 96 }; 94 97 95 struct HoistArrayDimension final : public WithDeclsToAdd, public WithShortCircuiting, public WithGuards { 98 class HoistArrayDimension final : public GenPoly::DeclMutator { 99 public: 100 typedef GenPoly::DeclMutator Parent; 101 96 102 /// hoist dimension from array types in object declaration so that it uses a single 97 103 /// const variable of type size_t, so that side effecting array dimensions are only … … 99 105 static void hoistArrayDimension( std::list< Declaration * > & translationUnit ); 100 106 101 void premutate( ObjectDecl * objectDecl ); 102 DeclarationWithType * postmutate( ObjectDecl * objectDecl ); 103 void premutate( FunctionDecl *functionDecl ); 107 private: 108 using Parent::mutate; 109 110 virtual DeclarationWithType * mutate( ObjectDecl * objectDecl ) override; 111 virtual DeclarationWithType * mutate( FunctionDecl *functionDecl ) override; 104 112 // should not traverse into any of these declarations to find objects 105 113 // that need to be constructed or destructed 106 void premutate( AggregateDecl * ) { visit_children = false; } 107 void premutate( NamedTypeDecl * ) { visit_children = false; } 108 void premutate( FunctionType * ) { visit_children = false; } 114 virtual Declaration* mutate( StructDecl *aggregateDecl ) override { return aggregateDecl; } 115 virtual Declaration* mutate( UnionDecl *aggregateDecl ) override { return aggregateDecl; } 116 virtual Declaration* mutate( EnumDecl *aggregateDecl ) override { return aggregateDecl; } 117 virtual Declaration* mutate( TraitDecl *aggregateDecl ) override { return aggregateDecl; } 118 virtual TypeDecl* mutate( TypeDecl *typeDecl ) override { return typeDecl; } 119 virtual Declaration* mutate( TypedefDecl *typeDecl ) override { return typeDecl; } 120 121 virtual Type* mutate( FunctionType *funcType ) override { return funcType; } 109 122 110 123 void hoist( Type * type ); … … 115 128 116 129 void genInit( std::list< Declaration * > & translationUnit ) { 117 fixReturnStatements( translationUnit );130 ReturnFixer::makeReturnTemp( translationUnit ); 118 131 HoistArrayDimension::hoistArrayDimension( translationUnit ); 119 132 CtorDtor::generateCtorDtor( translationUnit ); 120 133 } 121 134 122 void fixReturnStatements( std::list< Declaration * > & translationUnit ) {135 void ReturnFixer::makeReturnTemp( std::list< Declaration * > & translationUnit ) { 123 136 PassVisitor<ReturnFixer> fixer; 124 137 mutateAll( translationUnit, fixer ); … … 130 143 // hands off if the function returns a reference - we don't want to allocate a temporary if a variable's address 131 144 // is being returned 132 if ( returnStmt->get_expr() && returnVals.size() == 1 && isConstructable( returnVals.front()->get_type() ) ) {145 if ( returnStmt->get_expr() && returnVals.size() == 1 && ! dynamic_cast< ReferenceType * >( returnVals.front()->get_type() ) ) { 133 146 // explicitly construct the return value using the return expression and the retVal object 134 147 assertf( returnVals.front()->get_name() != "", "Function %s has unnamed return value\n", funcName.c_str() ); … … 145 158 GuardValue( funcName ); 146 159 147 ftype = functionDecl-> type;148 funcName = functionDecl-> name;160 ftype = functionDecl->get_functionType(); 161 funcName = functionDecl->get_name(); 149 162 } 150 163 … … 152 165 // which would be incorrect if it is a side-effecting computation. 153 166 void HoistArrayDimension::hoistArrayDimension( std::list< Declaration * > & translationUnit ) { 154 PassVisitor<HoistArrayDimension> hoister; 155 mutateAll( translationUnit, hoister ); 156 } 157 158 void HoistArrayDimension::premutate( ObjectDecl * objectDecl ) { 159 GuardValue( storageClasses ); 167 HoistArrayDimension hoister; 168 hoister.mutateDeclarationList( translationUnit ); 169 } 170 171 DeclarationWithType * HoistArrayDimension::mutate( ObjectDecl * objectDecl ) { 160 172 storageClasses = objectDecl->get_storageClasses(); 161 } 162 163 DeclarationWithType * HoistArrayDimension::postmutate( ObjectDecl * objectDecl ) { 173 DeclarationWithType * temp = Parent::mutate( objectDecl ); 164 174 hoist( objectDecl->get_type() ); 165 return objectDecl;175 return temp; 166 176 } 167 177 … … 184 194 185 195 arrayType->set_dimension( new VariableExpr( arrayDimension ) ); 186 declsToAddBefore.push_back( arrayDimension );196 addDeclaration( arrayDimension ); 187 197 188 198 hoist( arrayType->get_base() ); … … 191 201 } 192 202 193 void HoistArrayDimension::premutate( FunctionDecl * ) { 194 GuardValue( inFunction ); 203 DeclarationWithType * HoistArrayDimension::mutate( FunctionDecl *functionDecl ) { 204 ValueGuard< bool > oldInFunc( inFunction ); 205 inFunction = true; 206 DeclarationWithType * decl = Parent::mutate( functionDecl ); 207 return decl; 195 208 } 196 209 … … 201 214 202 215 bool CtorDtor::isManaged( Type * type ) const { 203 // references are never constructed216 // at least for now, references are never constructed 204 217 if ( dynamic_cast< ReferenceType * >( type ) ) return false; 205 218 // need to clear and reset qualifiers when determining if a type is managed … … 208 221 if ( TupleType * tupleType = dynamic_cast< TupleType * > ( type ) ) { 209 222 // tuple is also managed if any of its components are managed 210 if ( std::any_of( tupleType-> types.begin(), tupleType->types.end(), [&](Type * type) { return isManaged( type ); }) ) {223 if ( std::any_of( tupleType->get_types().begin(), tupleType->get_types().end(), [&](Type * type) { return isManaged( type ); }) ) { 211 224 return true; 212 225 } … … 292 305 293 306 void CtorDtor::previsit( FunctionDecl *functionDecl ) { 294 visit_children = false; // do not try and construct parameters or forall parameters295 307 GuardValue( inFunction ); 296 308 inFunction = true; … … 306 318 } 307 319 308 maybeAccept( functionDecl->get_statements(), *visitor ); 320 PassVisitor<CtorDtor> newCtorDtor; 321 newCtorDtor.pass = *this; 322 maybeAccept( functionDecl->get_statements(), newCtorDtor ); 323 visit_children = false; // do not try and construct parameters or forall parameters - must happen after maybeAccept 309 324 } 310 325 … … 325 340 } 326 341 327 void CtorDtor::previsit( CompoundStmt *) {342 void CtorDtor::previsit( __attribute__((unused)) CompoundStmt * compoundStmt ) { 328 343 GuardScope( managedTypes ); 329 344 } -
src/InitTweak/GenInit.h
r1755226 r9bae71f 25 25 void genInit( std::list< Declaration * > & translationUnit ); 26 26 27 /// Converts return statements into copy constructor calls on the hidden return variable 28 void fixReturnStatements( std::list< Declaration * > & translationUnit ); 29 30 /// generates a single ctor/dtor statement using objDecl as the 'this' parameter and arg as the optional argument 31 ImplicitCtorDtorStmt * genCtorDtor( const std::string & fname, ObjectDecl * objDecl, Expression * arg = nullptr ); 27 /// generates a single ctor/dtor statement using objDecl as the 'this' parameter and arg as the optional argument 28 ImplicitCtorDtorStmt * genCtorDtor( const std::string & fname, ObjectDecl * objDecl, Expression * arg = nullptr ); 32 29 33 30 /// creates an appropriate ConstructorInit node which contains a constructor, destructor, and C-initializer -
src/InitTweak/InitTweak.cc
r1755226 r9bae71f 1 #include <stddef.h> // for NULL 1 2 #include <algorithm> // for find, all_of 2 3 #include <cassert> // for assertf, assert, strict_dynamic_cast … … 22 23 #include "SynTree/Type.h" // for FunctionType, ArrayType, PointerType 23 24 #include "SynTree/Visitor.h" // for Visitor, maybeAccept 24 #include "Tuples/Tuples.h" // for Tuples::isTtype25 25 26 26 class UntypedValofExpr; … … 184 184 callExpr->get_args().splice( callExpr->get_args().end(), args ); 185 185 186 *out++ = new IfStmt( noLabels, cond, new ExprStmt( noLabels, callExpr ), nullptr);186 *out++ = new IfStmt( noLabels, cond, new ExprStmt( noLabels, callExpr ), NULL ); 187 187 188 188 UntypedExpr * increment = new UntypedExpr( new NameExpr( "++?" ) ); … … 250 250 // To accomplish this, generate switch statement, consuming all of expander's elements 251 251 Statement * InitImpl::buildListInit( UntypedExpr * dst, std::list< Expression * > & indices ) { 252 if ( ! init ) return nullptr;252 if ( ! init ) return NULL; 253 253 CompoundStmt * block = new CompoundStmt( noLabels ); 254 254 build( dst, indices.begin(), indices.end(), init, back_inserter( block->get_kids() ) ); 255 255 if ( block->get_kids().empty() ) { 256 256 delete block; 257 return nullptr;257 return NULL; 258 258 } else { 259 init = nullptr; // init was consumed in creating the list init259 init = NULL; // init was consumed in creating the list init 260 260 return block; 261 261 } 262 262 } 263 263 264 Statement * ExprImpl::buildListInit( UntypedExpr *, std::list< Expression * > &) {265 return nullptr;264 Statement * ExprImpl::buildListInit( __attribute((unused)) UntypedExpr * dst, __attribute((unused)) std::list< Expression * > & indices ) { 265 return NULL; 266 266 } 267 267 … … 270 270 } 271 271 272 bool tryConstruct( DeclarationWithType * dwt ) { 273 ObjectDecl * objDecl = dynamic_cast< ObjectDecl * >( dwt ); 274 if ( ! objDecl ) return false; 272 bool tryConstruct( ObjectDecl * objDecl ) { 275 273 return ! LinkageSpec::isBuiltin( objDecl->get_linkage() ) && 276 (objDecl->get_init() == nullptr || 277 ( objDecl->get_init() != nullptr && objDecl->get_init()->get_maybeConstructed() )) 278 && ! objDecl->get_storageClasses().is_extern 279 && isConstructable( objDecl->type ); 280 } 281 282 bool isConstructable( Type * type ) { 283 return ! dynamic_cast< VarArgsType * >( type ) && ! dynamic_cast< ReferenceType * >( type ) && ! dynamic_cast< FunctionType * >( type ) && ! Tuples::isTtype( type ); 274 (objDecl->get_init() == NULL || 275 ( objDecl->get_init() != NULL && objDecl->get_init()->get_maybeConstructed() )) 276 && ! objDecl->get_storageClasses().is_extern; 284 277 } 285 278 … … 321 314 collectCtorDtorCalls( stmt, matches ); 322 315 assert( matches.size() <= 1 ); 323 return matches.size() == 1 ? matches.front() : nullptr;316 return matches.size() == 1 ? matches.front() : NULL; 324 317 } 325 318 … … 366 359 ApplicationExpr * isIntrinsicCallExpr( Expression * expr ) { 367 360 ApplicationExpr * appExpr = dynamic_cast< ApplicationExpr * >( expr ); 368 if ( ! appExpr ) return nullptr;361 if ( ! appExpr ) return NULL; 369 362 DeclarationWithType * function = getCalledFunction( appExpr->get_function() ); 370 363 assertf( function, "getCalledFunction returned nullptr: %s", toString( appExpr->get_function() ).c_str() ); 371 364 // check for Intrinsic only - don't want to remove all overridable ctor/dtors because autogenerated ctor/dtor 372 365 // will call all member dtors, and some members may have a user defined dtor. 373 return function->get_linkage() == LinkageSpec::Intrinsic ? appExpr : nullptr;366 return function->get_linkage() == LinkageSpec::Intrinsic ? appExpr : NULL; 374 367 } 375 368 … … 489 482 return refType->get_base(); 490 483 } else { 491 return nullptr;484 return NULL; 492 485 } 493 486 } … … 495 488 Type * isPointerType( Type * type ) { 496 489 if ( getPointerBase( type ) ) return type; 497 else return nullptr;490 else return NULL; 498 491 } 499 492 -
src/InitTweak/InitTweak.h
r1755226 r9bae71f 33 33 std::list< Expression * > makeInitList( Initializer * init ); 34 34 35 /// True if the resolver should try to construct dwt 36 bool tryConstruct( DeclarationWithType * dwt ); 37 38 /// True if the type can have a user-defined constructor 39 bool isConstructable( Type * t ); 35 /// True if the resolver should try to construct objDecl 36 bool tryConstruct( ObjectDecl * objDecl ); 40 37 41 38 /// True if the Initializer contains designations -
src/ResolvExpr/Resolver.cc
r1755226 r9bae71f 93 93 PassVisitor<Resolver> resolver; 94 94 acceptAll( translationUnit, resolver ); 95 }96 97 void resolveDecl( Declaration * decl, const SymTab::Indexer &indexer ) {98 PassVisitor<Resolver> resolver( indexer );99 maybeAccept( decl, resolver );100 95 } 101 96 -
src/ResolvExpr/Resolver.h
r1755226 r9bae71f 29 29 /// Checks types and binds syntactic constructs to typed representations 30 30 void resolve( std::list< Declaration * > translationUnit ); 31 void resolveDecl( Declaration *, const SymTab::Indexer &indexer );32 31 Expression *resolveInVoidContext( Expression *expr, const SymTab::Indexer &indexer ); 33 32 Expression *findVoidExpression( Expression *untyped, const SymTab::Indexer &indexer ); -
src/ResolvExpr/TypeEnvironment.cc
r1755226 r9bae71f 123 123 for ( std::list< EqvClass >::const_iterator theClass = env.begin(); theClass != env.end(); ++theClass ) { 124 124 for ( std::set< std::string >::const_iterator theVar = theClass->vars.begin(); theVar != theClass->vars.end(); ++theVar ) { 125 /// std::c err<< "adding " << *theVar;125 /// std::cout << "adding " << *theVar; 126 126 if ( theClass->type ) { 127 /// std::c err<< " bound to ";128 /// theClass->type->print( std::c err);129 /// std::c err<< std::endl;127 /// std::cout << " bound to "; 128 /// theClass->type->print( std::cout ); 129 /// std::cout << std::endl; 130 130 sub.add( *theVar, theClass->type ); 131 131 } else if ( theVar != theClass->vars.begin() ) { 132 132 TypeInstType *newTypeInst = new TypeInstType( Type::Qualifiers(), *theClass->vars.begin(), theClass->data.kind == TypeDecl::Ftype ); 133 /// std::c err<< " bound to variable " << *theClass->vars.begin() << std::endl;133 /// std::cout << " bound to variable " << *theClass->vars.begin() << std::endl; 134 134 sub.add( *theVar, newTypeInst ); 135 135 delete newTypeInst; -
src/SymTab/Autogen.cc
r1755226 r9bae71f 16 16 #include "Autogen.h" 17 17 18 #include <cstddef> // for NULL 18 19 #include <algorithm> // for count_if 19 20 #include <cassert> // for strict_dynamic_cast, assert, assertf … … 26 27 #include "AddVisit.h" // for addVisit 27 28 #include "CodeGen/OperatorTable.h" // for isCtorDtor, isCtorDtorAssign 28 #include "Common/PassVisitor.h" // for PassVisitor29 29 #include "Common/ScopedMap.h" // for ScopedMap<>::const_iterator, Scope... 30 30 #include "Common/utility.h" // for cloneAll, operator+ 31 31 #include "GenPoly/DeclMutator.h" // for DeclMutator 32 32 #include "GenPoly/ScopedSet.h" // for ScopedSet, ScopedSet<>::iterator 33 #include "InitTweak/GenInit.h" // for fixReturnStatements34 #include "ResolvExpr/Resolver.h" // for resolveDecl35 33 #include "SymTab/Mangler.h" // for Mangler 36 34 #include "SynTree/Attribute.h" // For Attribute … … 55 53 }; 56 54 57 struct AutogenerateRoutines final : public WithDeclsToAdd, public WithVisitorRef<AutogenerateRoutines>, public WithGuards, public WithShortCircuiting { 55 class AutogenerateRoutines final : public Visitor { 56 template< typename Visitor > 57 friend void acceptAndAdd( std::list< Declaration * > &translationUnit, Visitor &visitor ); 58 template< typename Visitor > 59 friend void addVisitStatementList( std::list< Statement* > &stmts, Visitor &visitor ); 60 public: 61 std::list< Declaration * > &get_declsToAdd() { return declsToAdd; } 62 63 typedef Visitor Parent; 64 using Parent::visit; 65 58 66 AutogenerateRoutines(); 59 67 60 void previsit( EnumDecl * enumDecl ); 61 void previsit( StructDecl * structDecl ); 62 void previsit( UnionDecl * structDecl ); 63 void previsit( TypeDecl * typeDecl ); 64 void previsit( TraitDecl * traitDecl ); 65 void previsit( FunctionDecl * functionDecl ); 66 67 void previsit( FunctionType * ftype ); 68 void previsit( PointerType * ptype ); 69 70 void previsit( CompoundStmt * compoundStmt ); 68 virtual void visit( EnumDecl *enumDecl ); 69 virtual void visit( StructDecl *structDecl ); 70 virtual void visit( UnionDecl *structDecl ); 71 virtual void visit( TypeDecl *typeDecl ); 72 virtual void visit( TraitDecl *ctxDecl ); 73 virtual void visit( FunctionDecl *functionDecl ); 74 75 virtual void visit( FunctionType *ftype ); 76 virtual void visit( PointerType *ftype ); 77 78 virtual void visit( CompoundStmt *compoundStmt ); 79 virtual void visit( SwitchStmt *switchStmt ); 71 80 72 81 private: 73 GenPoly::ScopedSet< std::string > structsDone; 82 template< typename StmtClass > void visitStatement( StmtClass *stmt ); 83 84 std::list< Declaration * > declsToAdd, declsToAddAfter; 85 std::set< std::string > structsDone; 74 86 unsigned int functionNesting = 0; // current level of nested functions 75 87 /// Note: the following maps could be ScopedSets, but it should be easier to work … … 100 112 101 113 void autogenerateRoutines( std::list< Declaration * > &translationUnit ) { 102 PassVisitor<AutogenerateRoutines>generator;103 acceptA ll( translationUnit, generator );114 AutogenerateRoutines generator; 115 acceptAndAdd( translationUnit, generator ); 104 116 105 117 // needs to be done separately because AutogenerateRoutines skips types that appear as function arguments, etc. … … 109 121 110 122 bool isUnnamedBitfield( ObjectDecl * obj ) { 111 return obj != nullptr && obj->get_name() == "" && obj->get_bitfieldWidth() != nullptr;123 return obj != NULL && obj->get_name() == "" && obj->get_bitfieldWidth() != NULL; 112 124 } 113 125 … … 116 128 FunctionDecl * decl = functionDecl->clone(); 117 129 delete decl->get_statements(); 118 decl->set_statements( nullptr);130 decl->set_statements( NULL ); 119 131 declsToAdd.push_back( decl ); 120 132 decl->fixUniqueId(); … … 327 339 assert( ! func->get_functionType()->get_parameters().empty() ); 328 340 ObjectDecl * dstParam = dynamic_cast<ObjectDecl*>( func->get_functionType()->get_parameters().front() ); 329 ObjectDecl * srcParam = nullptr;341 ObjectDecl * srcParam = NULL; 330 342 if ( func->get_functionType()->get_parameters().size() == 2 ) { 331 343 srcParam = dynamic_cast<ObjectDecl*>( func->get_functionType()->get_parameters().back() ); … … 334 346 assert( dstParam ); 335 347 336 Expression *srcselect = srcParam ? new MemberExpr( field, new VariableExpr( srcParam ) ) : nullptr;348 Expression *srcselect = srcParam ? new MemberExpr( field, new VariableExpr( srcParam ) ) : NULL; 337 349 makeStructMemberOp( dstParam, srcselect, field, func, forward ); 338 350 } // if … … 373 385 } else { 374 386 // no matching parameter, initialize field with default ctor 375 makeStructMemberOp( dstParam, nullptr, field, func );387 makeStructMemberOp( dstParam, NULL, field, func ); 376 388 } 377 389 } … … 389 401 void makeStructFunctions( StructDecl *aggregateDecl, StructInstType *refType, unsigned int functionNesting, std::list< Declaration * > & declsToAdd, const std::vector< FuncData > & data ) { 390 402 // Builtins do not use autogeneration. 391 if ( LinkageSpec::isBuiltin( aggregateDecl->get_linkage() ) ) { 403 if ( aggregateDecl->get_linkage() == LinkageSpec::BuiltinCFA || 404 aggregateDecl->get_linkage() == LinkageSpec::BuiltinC ) { 392 405 return; 393 406 } 394 407 395 408 // Make function polymorphic in same parameters as generic struct, if applicable 396 const std::list< TypeDecl * > & typeParams = aggregateDecl->get_parameters(); // List of type variables to be placed on the generated functions409 const std::list< TypeDecl* > & typeParams = aggregateDecl->get_parameters(); // List of type variables to be placed on the generated functions 397 410 398 411 // generate each of the functions based on the supplied FuncData objects … … 559 572 // the order here determines the order that these functions are generated. 560 573 // assignment should come last since it uses copy constructor in return. 561 data.emplace_back( "?{}", genDefaultType, constructable ); 562 data.emplace_back( "?{}", genCopyType, copyable ); 563 data.emplace_back( "^?{}", genDefaultType, destructable ); 564 data.emplace_back( "?=?", genAssignType, assignable ); 565 } 566 567 void AutogenerateRoutines::previsit( EnumDecl * enumDecl ) { 568 visit_children = false; 574 data.push_back( FuncData( "?{}", genDefaultType, constructable ) ); 575 data.push_back( FuncData( "?{}", genCopyType, copyable ) ); 576 data.push_back( FuncData( "^?{}", genDefaultType, destructable ) ); 577 data.push_back( FuncData( "?=?", genAssignType, assignable ) ); 578 } 579 580 void AutogenerateRoutines::visit( EnumDecl *enumDecl ) { 569 581 if ( ! enumDecl->get_members().empty() ) { 570 582 EnumInstType *enumInst = new EnumInstType( Type::Qualifiers(), enumDecl->get_name() ); … … 574 586 } 575 587 576 void AutogenerateRoutines::previsit( StructDecl * structDecl ) { 577 visit_children = false; 578 if ( structDecl->has_body() && structsDone.find( structDecl->name ) == structsDone.end() ) { 579 StructInstType structInst( Type::Qualifiers(), structDecl->name ); 580 for ( TypeDecl * typeDecl : structDecl->parameters ) { 588 void AutogenerateRoutines::visit( StructDecl *structDecl ) { 589 if ( structDecl->has_body() && structsDone.find( structDecl->get_name() ) == structsDone.end() ) { 590 StructInstType structInst( Type::Qualifiers(), structDecl->get_name() ); 591 for ( TypeDecl * typeDecl : structDecl->get_parameters() ) { 581 592 // need to visit assertions so that they are added to the appropriate maps 582 acceptAll( typeDecl-> assertions, *visitor);583 structInst. parameters.push_back( new TypeExpr( new TypeInstType( Type::Qualifiers(), typeDecl->name, typeDecl ) ) );593 acceptAll( typeDecl->get_assertions(), *this ); 594 structInst.get_parameters().push_back( new TypeExpr( new TypeInstType( Type::Qualifiers(), typeDecl->get_name(), typeDecl ) ) ); 584 595 } 585 596 structInst.set_baseStruct( structDecl ); 586 597 makeStructFunctions( structDecl, &structInst, functionNesting, declsToAddAfter, data ); 587 structsDone.insert( structDecl-> name);598 structsDone.insert( structDecl->get_name() ); 588 599 } // if 589 600 } 590 601 591 void AutogenerateRoutines::previsit( UnionDecl * unionDecl ) { 592 visit_children = false; 602 void AutogenerateRoutines::visit( UnionDecl *unionDecl ) { 593 603 if ( ! unionDecl->get_members().empty() ) { 594 604 UnionInstType unionInst( Type::Qualifiers(), unionDecl->get_name() ); … … 609 619 610 620 // generate ctor/dtors/assign for typedecls, e.g., otype T = int *; 611 void AutogenerateRoutines::previsit( TypeDecl * typeDecl ) { 612 visit_children = false; 621 void AutogenerateRoutines::visit( TypeDecl *typeDecl ) { 613 622 if ( ! typeDecl->base ) return; 614 623 … … 655 664 } 656 665 657 void AutogenerateRoutines::previsit( FunctionType *) { 666 void addDecls( std::list< Declaration * > &declsToAdd, std::list< Statement * > &statements, std::list< Statement * >::iterator i ) { 667 for ( std::list< Declaration * >::iterator decl = declsToAdd.begin(); decl != declsToAdd.end(); ++decl ) { 668 statements.insert( i, new DeclStmt( noLabels, *decl ) ); 669 } // for 670 declsToAdd.clear(); 671 } 672 673 void AutogenerateRoutines::visit( FunctionType *) { 658 674 // ensure that we don't add assignment ops for types defined as part of the function 659 visit_children = false; 660 } 661 662 void AutogenerateRoutines::previsit( PointerType *) { 675 } 676 677 void AutogenerateRoutines::visit( PointerType *) { 663 678 // ensure that we don't add assignment ops for types defined as part of the pointer 664 visit_children = false; 665 } 666 667 void AutogenerateRoutines::previsit( TraitDecl * ) { 679 } 680 681 void AutogenerateRoutines::visit( TraitDecl *) { 668 682 // ensure that we don't add assignment ops for types defined as part of the trait 669 visit_children = false; 670 } 671 672 void AutogenerateRoutines::previsit( FunctionDecl * functionDecl ) { 673 visit_children = false; 683 } 684 685 template< typename StmtClass > 686 inline void AutogenerateRoutines::visitStatement( StmtClass *stmt ) { 687 std::set< std::string > oldStructs = structsDone; 688 addVisit( stmt, *this ); 689 structsDone = oldStructs; 690 } 691 692 void AutogenerateRoutines::visit( FunctionDecl *functionDecl ) { 674 693 // record the existence of this function as appropriate 675 694 insert( functionDecl, constructable, InitTweak::isDefaultConstructor ); … … 678 697 insert( functionDecl, destructable, InitTweak::isDestructor ); 679 698 680 maybeAccept( functionDecl-> type, *visitor);699 maybeAccept( functionDecl->get_functionType(), *this ); 681 700 functionNesting += 1; 682 maybeAccept( functionDecl-> statements, *visitor);701 maybeAccept( functionDecl->get_statements(), *this ); 683 702 functionNesting -= 1; 684 703 } 685 704 686 void AutogenerateRoutines::previsit( CompoundStmt * ) { 687 GuardScope( constructable ); 688 GuardScope( assignable ); 689 GuardScope( copyable ); 690 GuardScope( destructable ); 691 GuardScope( structsDone ); 705 void AutogenerateRoutines::visit( CompoundStmt *compoundStmt ) { 706 constructable.beginScope(); 707 assignable.beginScope(); 708 copyable.beginScope(); 709 destructable.beginScope(); 710 visitStatement( compoundStmt ); 711 constructable.endScope(); 712 assignable.endScope(); 713 copyable.endScope(); 714 destructable.endScope(); 715 } 716 717 void AutogenerateRoutines::visit( SwitchStmt *switchStmt ) { 718 visitStatement( switchStmt ); 692 719 } 693 720 -
src/SymTab/FixFunction.cc
r1755226 r9bae71f 27 27 28 28 DeclarationWithType * FixFunction::mutate(FunctionDecl *functionDecl) { 29 // can't delete function type because it may contain assertions, so transfer ownership to new object30 29 ObjectDecl *pointer = new ObjectDecl( functionDecl->get_name(), functionDecl->get_storageClasses(), functionDecl->get_linkage(), 0, new PointerType( Type::Qualifiers(), functionDecl->get_type() ), 0, functionDecl->get_attributes() ); 31 30 functionDecl->get_attributes().clear(); 32 functionDecl->type = nullptr; 31 // can't delete function type because it may contain assertions, but can't transfer ownership without a clone since set_type checks for nullptr 32 functionDecl->set_type( functionDecl->get_type()->clone() ); 33 33 delete functionDecl; 34 34 return pointer; -
src/SymTab/Indexer.cc
r1755226 r9bae71f 40 40 41 41 namespace SymTab { 42 struct NewScope { 43 NewScope( SymTab::Indexer & indexer ) : indexer( indexer ) { indexer.enterScope(); } 44 ~NewScope() { indexer.leaveScope(); } 45 SymTab::Indexer & indexer; 46 }; 47 48 template< typename TreeType, typename VisitorType > 49 inline void acceptNewScope( TreeType *tree, VisitorType &visitor ) { 50 visitor.enterScope(); 51 maybeAccept( tree, visitor ); 52 visitor.leaveScope(); 53 } 54 42 55 typedef std::unordered_map< std::string, DeclarationWithType* > MangleTable; 43 56 typedef std::unordered_map< std::string, MangleTable > IdTable; … … 185 198 } 186 199 187 Indexer::Indexer( ) : tables( 0 ), scope( 0) {}188 189 Indexer::Indexer( const Indexer &that ) : doDebug( that.doDebug ), tables( newRef( that.tables ) ), scope( that.scope) {}190 191 Indexer::Indexer( Indexer &&that ) : doDebug( that.doDebug ), tables( that.tables ), scope( that.scope) {200 Indexer::Indexer( bool _doDebug ) : tables( 0 ), scope( 0 ), doDebug( _doDebug ) {} 201 202 Indexer::Indexer( const Indexer &that ) : tables( newRef( that.tables ) ), scope( that.scope ), doDebug( that.doDebug ) {} 203 204 Indexer::Indexer( Indexer &&that ) : tables( that.tables ), scope( that.scope ), doDebug( that.doDebug ) { 192 205 that.tables = 0; 193 206 } -
src/SymTab/Indexer.h
r1755226 r9bae71f 26 26 class Indexer { 27 27 public: 28 explicit Indexer( );28 explicit Indexer( bool useDebug = false ); 29 29 30 30 Indexer( const Indexer &that ); … … 76 76 void addTrait( TraitDecl *decl ); 77 77 78 bool doDebug = false; ///< Display debugging trace?79 78 private: 80 79 struct Impl; … … 82 81 Impl *tables; ///< Copy-on-write instance of table data structure 83 82 unsigned long scope; ///< Scope index of this pointer 83 bool doDebug; ///< Display debugging trace? 84 84 85 85 /// Takes a new ref to a table (returns null if null) -
src/SymTab/Mangler.cc
r1755226 r9bae71f 31 31 32 32 namespace SymTab { 33 std::string Mangler::mangleType( Type * ty ) {33 std::string Mangler::mangleType( Type *ty ) { 34 34 Mangler mangler( false, true ); 35 35 maybeAccept( ty, mangler ); … … 48 48 } 49 49 50 void Mangler::mangleDecl( DeclarationWithType * declaration ) {50 void Mangler::mangleDecl( DeclarationWithType *declaration ) { 51 51 bool wasTopLevel = isTopLevel; 52 52 if ( isTopLevel ) { … … 79 79 } 80 80 81 void Mangler::visit( ObjectDecl * declaration ) {81 void Mangler::visit( ObjectDecl *declaration ) { 82 82 mangleDecl( declaration ); 83 83 } 84 84 85 void Mangler::visit( FunctionDecl * declaration ) {85 void Mangler::visit( FunctionDecl *declaration ) { 86 86 mangleDecl( declaration ); 87 87 } 88 88 89 void Mangler::visit( VoidType * voidType ) {89 void Mangler::visit( VoidType *voidType ) { 90 90 printQualifiers( voidType ); 91 91 mangleName << "v"; 92 92 } 93 93 94 void Mangler::visit( BasicType * basicType ) {94 void Mangler::visit( BasicType *basicType ) { 95 95 static const char *btLetter[] = { 96 96 "b", // Bool … … 121 121 } 122 122 123 void Mangler::visit( PointerType * pointerType ) {123 void Mangler::visit( PointerType *pointerType ) { 124 124 printQualifiers( pointerType ); 125 125 mangleName << "P"; … … 127 127 } 128 128 129 void Mangler::visit( ArrayType * arrayType ) {129 void Mangler::visit( ArrayType *arrayType ) { 130 130 // TODO: encode dimension 131 131 printQualifiers( arrayType ); … … 134 134 } 135 135 136 void Mangler::visit( ReferenceType * refType ) {136 void Mangler::visit( ReferenceType *refType ) { 137 137 printQualifiers( refType ); 138 138 mangleName << "R"; … … 149 149 } 150 150 151 void Mangler::visit( FunctionType * functionType ) {151 void Mangler::visit( FunctionType *functionType ) { 152 152 printQualifiers( functionType ); 153 153 mangleName << "F"; … … 160 160 } 161 161 162 void Mangler::mangleRef( ReferenceToType * refType, std::string prefix ) {162 void Mangler::mangleRef( ReferenceToType *refType, std::string prefix ) { 163 163 printQualifiers( refType ); 164 164 … … 166 166 } 167 167 168 void Mangler::mangleGenericRef( ReferenceToType * refType, std::string prefix ) {168 void Mangler::mangleGenericRef( ReferenceToType *refType, std::string prefix ) { 169 169 printQualifiers( refType ); 170 170 … … 189 189 } 190 190 191 void Mangler::visit( StructInstType * aggregateUseType ) {191 void Mangler::visit( StructInstType *aggregateUseType ) { 192 192 if ( typeMode ) mangleGenericRef( aggregateUseType, "s" ); 193 193 else mangleRef( aggregateUseType, "s" ); 194 194 } 195 195 196 void Mangler::visit( UnionInstType * aggregateUseType ) {196 void Mangler::visit( UnionInstType *aggregateUseType ) { 197 197 if ( typeMode ) mangleGenericRef( aggregateUseType, "u" ); 198 198 else mangleRef( aggregateUseType, "u" ); 199 199 } 200 200 201 void Mangler::visit( EnumInstType * aggregateUseType ) {201 void Mangler::visit( EnumInstType *aggregateUseType ) { 202 202 mangleRef( aggregateUseType, "e" ); 203 203 } 204 204 205 void Mangler::visit( TypeInstType * typeInst ) {205 void Mangler::visit( TypeInstType *typeInst ) { 206 206 VarMapType::iterator varNum = varNums.find( typeInst->get_name() ); 207 207 if ( varNum == varNums.end() ) { … … 231 231 } 232 232 233 void Mangler::visit( TupleType * tupleType ) {233 void Mangler::visit( TupleType *tupleType ) { 234 234 printQualifiers( tupleType ); 235 235 mangleName << "T"; 236 acceptAll( tupleType-> types, *this );236 acceptAll( tupleType->get_types(), *this ); 237 237 mangleName << "_"; 238 238 } 239 239 240 void Mangler::visit( VarArgsType * varArgsType ) {240 void Mangler::visit( VarArgsType *varArgsType ) { 241 241 printQualifiers( varArgsType ); 242 242 mangleName << "VARGS"; 243 243 } 244 244 245 void Mangler::visit( ZeroType *) {245 void Mangler::visit( __attribute__((unused)) ZeroType *zeroType ) { 246 246 mangleName << "Z"; 247 247 } 248 248 249 void Mangler::visit( OneType *) {249 void Mangler::visit( __attribute__((unused)) OneType *oneType ) { 250 250 mangleName << "O"; 251 251 } 252 252 253 void Mangler::visit( TypeDecl * decl ) {253 void Mangler::visit( TypeDecl *decl ) { 254 254 static const char *typePrefix[] = { "BT", "BD", "BF" }; 255 mangleName << typePrefix[ decl->get_kind() ] << ( decl-> name.length() + 1 ) << decl->name;255 mangleName << typePrefix[ decl->get_kind() ] << ( decl->get_name().length() + 1 ) << decl->get_name(); 256 256 } 257 257 … … 262 262 } 263 263 264 void Mangler::printQualifiers( Type * type ) {264 void Mangler::printQualifiers( Type *type ) { 265 265 // skip if not including qualifiers 266 266 if ( typeMode ) return; … … 270 270 int tcount = 0, dcount = 0, fcount = 0, vcount = 0; 271 271 mangleName << "A"; 272 for ( Type::ForallList::iterator i = type-> forall.begin(); i != type->forall.end(); ++i ) {272 for ( Type::ForallList::iterator i = type->get_forall().begin(); i != type->get_forall().end(); ++i ) { 273 273 switch ( (*i)->get_kind() ) { 274 274 case TypeDecl::Any: … … 287 287 assert( false ); 288 288 } // switch 289 varNums[ (*i )->name ] = std::pair< int, int >( nextVarNum++, (int)(*i)->get_kind() );290 for ( std::list< DeclarationWithType* >::iterator assert = (*i )->assertions.begin(); assert != (*i)->assertions.end(); ++assert ) {289 varNums[ (*i )->get_name() ] = std::pair< int, int >( nextVarNum++, (int )(*i )->get_kind() ); 290 for ( std::list< DeclarationWithType* >::iterator assert = (*i )->get_assertions().begin(); assert != (*i )->get_assertions().end(); ++assert ) { 291 291 Mangler sub_mangler( mangleOverridable, typeMode ); 292 292 sub_mangler.nextVarNum = nextVarNum; … … 312 312 // } // if 313 313 if ( type->get_lvalue() ) { 314 // mangle based on whether the type is lvalue, so that the resolver can differentiate lvalues and rvalues315 314 mangleName << "L"; 316 } 315 } // if 317 316 if ( type->get_atomic() ) { 318 317 mangleName << "A"; -
src/SymTab/Validate.cc
r1755226 r9bae71f 56 56 #include "FixFunction.h" // for FixFunction 57 57 #include "Indexer.h" // for Indexer 58 #include "InitTweak/GenInit.h" // for fixReturnStatements59 58 #include "InitTweak/InitTweak.h" // for isCtorDtorAssign 60 59 #include "Parser/LinkageSpec.h" // for C … … 151 150 /// Replaces array and function types in forall lists by appropriate pointer type and assigns each Object and Function declaration a unique ID. 152 151 struct ForallPointerDecay final { 153 void previsit( ObjectDecl * object );154 void previsit( FunctionDecl * func );152 void previsit( ObjectDecl *object ); 153 void previsit( FunctionDecl *func ); 155 154 }; 156 155 … … 580 579 581 580 /// Fix up assertions - flattens assertion lists, removing all trait instances 582 void forallFixer( std::list< TypeDecl * > & forall, BaseSyntaxNode * node) {583 for ( TypeDecl * type : f orall) {581 void forallFixer( Type * func ) { 582 for ( TypeDecl * type : func->get_forall() ) { 584 583 std::list< DeclarationWithType * > asserts; 585 584 asserts.splice( asserts.end(), type->assertions ); … … 600 599 assertion = assertion->acceptMutator( fixer ); 601 600 if ( fixer.get_isVoid() ) { 602 throw SemanticError( "invalid type void in assertion of function ", node);601 throw SemanticError( "invalid type void in assertion of function ", func ); 603 602 } // if 604 603 } // for … … 608 607 609 608 void ForallPointerDecay::previsit( ObjectDecl *object ) { 610 forallFixer( object-> type->forall, object);611 if ( PointerType *pointer = dynamic_cast< PointerType * >( object-> type) ) {612 forallFixer( pointer-> base->forall, object);609 forallFixer( object->get_type() ); 610 if ( PointerType *pointer = dynamic_cast< PointerType * >( object->get_type() ) ) { 611 forallFixer( pointer->get_base() ); 613 612 } // if 614 613 object->fixUniqueId(); … … 616 615 617 616 void ForallPointerDecay::previsit( FunctionDecl *func ) { 618 forallFixer( func-> type->forall, func);617 forallFixer( func->get_type() ); 619 618 func->fixUniqueId(); 620 619 } -
src/SynTree/Visitor.h
r1755226 r9bae71f 25 25 public: 26 26 // visit: Default implementation of all functions visits the children 27 // of the given syntax node, but performs no other action.27 // of the given syntax node, but performs no other action. 28 28 29 29 virtual void visit( ObjectDecl *objectDecl ); -
src/main.cc
r1755226 r9bae71f 239 239 } // if 240 240 241 // OPTPRINT( "Concurrency" ) 242 // Concurrency::applyKeywords( translationUnit ); 243 241 244 // add the assignment statement after the initialization of a type parameter 242 245 OPTPRINT( "validate" )
Note:
See TracChangeset
for help on using the changeset viewer.