Changeset 3c0d4cd for src/SymTab
- Timestamp:
- Mar 5, 2019, 2:17:45 PM (6 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, persistent-indexer, pthread-emulation, qualifiedEnum
- Children:
- c884f2d
- Parents:
- 79eaeb7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SymTab/Validate.cc
r79eaeb7 r3c0d4cd 304 304 PassVisitor<FixQualifiedTypes> fixQual; 305 305 306 Stats::Heap::newPass("validate-A"); 307 acceptAll( translationUnit, hoistDecls ); 308 ReplaceTypedef::replaceTypedef( translationUnit ); 309 ReturnTypeFixer::fix( translationUnit ); // must happen before autogen 310 acceptAll( translationUnit, epc ); // must happen before VerifyCtorDtorAssign, because void return objects should not exist; before LinkReferenceToTypes because it is an indexer and needs correct types for mangling 311 Stats::Heap::newPass("validate-B"); 312 acceptAll( translationUnit, lrt ); // must happen before autogen, because sized flag needs to propagate to generated functions 313 mutateAll( translationUnit, fixQual ); // must happen after LinkReferenceToTypes, because aggregate members are accessed 314 HoistStruct::hoistStruct( translationUnit ); // must happen after EliminateTypedef, so that aggregate typedefs occur in the correct order 315 EliminateTypedef::eliminateTypedef( translationUnit ); // 316 Stats::Heap::newPass("validate-C"); 317 acceptAll( translationUnit, genericParams ); // check as early as possible - can't happen before LinkReferenceToTypes 318 VerifyCtorDtorAssign::verify( translationUnit ); // must happen before autogen, because autogen examines existing ctor/dtors 319 ReturnChecker::checkFunctionReturns( translationUnit ); 320 InitTweak::fixReturnStatements( translationUnit ); // must happen before autogen 321 Stats::Heap::newPass("validate-D"); 322 Concurrency::applyKeywords( translationUnit ); 323 acceptAll( translationUnit, fpd ); // must happen before autogenerateRoutines, after Concurrency::applyKeywords because uniqueIds must be set on declaration before resolution 324 ControlStruct::hoistControlDecls( translationUnit ); // hoist initialization out of for statements; must happen before autogenerateRoutines 325 autogenerateRoutines( translationUnit ); // moved up, used to be below compoundLiteral - currently needs EnumAndPointerDecay 326 Stats::Heap::newPass("validate-E"); 327 Concurrency::implementMutexFuncs( translationUnit ); 328 Concurrency::implementThreadStarter( translationUnit ); 329 mutateAll( translationUnit, compoundliteral ); 330 ResolvExpr::resolveWithExprs( translationUnit ); // must happen before FixObjectType because user-code is resolved and may contain with variables 331 Stats::Heap::newPass("validate-F"); 332 FixObjectType::fix( translationUnit ); 333 ArrayLength::computeLength( translationUnit ); 334 acceptAll( translationUnit, finder ); // xxx - remove this pass soon 335 mutateAll( translationUnit, labelAddrFixer ); 336 Validate::handleAttributes( translationUnit ); 306 { 307 Stats::Heap::newPass("validate-A"); 308 Stats::Time::BlockGuard guard("validate-A"); 309 acceptAll( translationUnit, hoistDecls ); 310 ReplaceTypedef::replaceTypedef( translationUnit ); 311 ReturnTypeFixer::fix( translationUnit ); // must happen before autogen 312 acceptAll( translationUnit, epc ); // must happen before VerifyCtorDtorAssign, because void return objects should not exist; before LinkReferenceToTypes because it is an indexer and needs correct types for mangling 313 } 314 { 315 Stats::Heap::newPass("validate-B"); 316 Stats::Time::BlockGuard guard("validate-B"); 317 acceptAll( translationUnit, lrt ); // must happen before autogen, because sized flag needs to propagate to generated functions 318 mutateAll( translationUnit, fixQual ); // must happen after LinkReferenceToTypes, because aggregate members are accessed 319 HoistStruct::hoistStruct( translationUnit ); // must happen after EliminateTypedef, so that aggregate typedefs occur in the correct order 320 EliminateTypedef::eliminateTypedef( translationUnit ); // 321 } 322 { 323 Stats::Heap::newPass("validate-C"); 324 Stats::Time::BlockGuard guard("validate-C"); 325 acceptAll( translationUnit, genericParams ); // check as early as possible - can't happen before LinkReferenceToTypes 326 VerifyCtorDtorAssign::verify( translationUnit ); // must happen before autogen, because autogen examines existing ctor/dtors 327 ReturnChecker::checkFunctionReturns( translationUnit ); 328 InitTweak::fixReturnStatements( translationUnit ); // must happen before autogen 329 } 330 { 331 Stats::Heap::newPass("validate-D"); 332 Stats::Time::BlockGuard guard("validate-D"); 333 Concurrency::applyKeywords( translationUnit ); 334 acceptAll( translationUnit, fpd ); // must happen before autogenerateRoutines, after Concurrency::applyKeywords because uniqueIds must be set on declaration before resolution 335 ControlStruct::hoistControlDecls( translationUnit ); // hoist initialization out of for statements; must happen before autogenerateRoutines 336 autogenerateRoutines( translationUnit ); // moved up, used to be below compoundLiteral - currently needs EnumAndPointerDecay 337 } 338 { 339 Stats::Heap::newPass("validate-E"); 340 Stats::Time::BlockGuard guard("validate-E"); 341 Concurrency::implementMutexFuncs( translationUnit ); 342 Concurrency::implementThreadStarter( translationUnit ); 343 mutateAll( translationUnit, compoundliteral ); 344 ResolvExpr::resolveWithExprs( translationUnit ); // must happen before FixObjectType because user-code is resolved and may contain with variables 345 } 346 { 347 Stats::Heap::newPass("validate-F"); 348 Stats::Time::BlockGuard guard("validate-F"); 349 FixObjectType::fix( translationUnit ); 350 ArrayLength::computeLength( translationUnit ); 351 acceptAll( translationUnit, finder ); // xxx - remove this pass soon 352 mutateAll( translationUnit, labelAddrFixer ); 353 Validate::handleAttributes( translationUnit ); 354 } 337 355 } 338 356
Note: See TracChangeset
for help on using the changeset viewer.