Changeset 5dcb881 for src/SymTab
- Timestamp:
- Nov 12, 2021, 11:27:15 AM (3 years ago)
- Branches:
- ADT, ast-experimental, enum, forall-pointer-decay, master, pthread-emulation, qualifiedEnum
- Children:
- ce36b55
- Parents:
- 3249dd8b
- Location:
- src/SymTab
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SymTab/Validate.cc
r3249dd8b r5dcb881 9 9 // Author : Richard C. Bilson 10 10 // Created On : Sun May 17 21:50:04 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Fri Dec 13 23:43:34 201913 // Update Count : 36 311 // Last Modified By : Andrew Beach 12 // Last Modified On : Fri Nov 12 11:00:00 2021 13 // Update Count : 364 14 14 // 15 15 … … 334 334 }; 335 335 336 void validate ( std::list< Declaration * > &translationUnit, __attribute__((unused)) bool doDebug) {336 void validate_A( std::list< Declaration * > & translationUnit ) { 337 337 PassVisitor<EnumAndPointerDecay_old> epc; 338 PassVisitor<LinkReferenceToTypes_old> lrt( nullptr );339 PassVisitor<ResolveEnumInitializers> rei( nullptr );340 PassVisitor<ForallPointerDecay_old> fpd;341 PassVisitor<CompoundLiteral> compoundliteral;342 PassVisitor<ValidateGenericParameters> genericParams;343 PassVisitor<LabelAddressFixer> labelAddrFixer;344 338 PassVisitor<HoistTypeDecls> hoistDecls; 345 PassVisitor<FixQualifiedTypes> fixQual;346 347 339 { 348 340 Stats::Heap::newPass("validate-A"); … … 354 346 acceptAll( translationUnit, epc ); // must happen before VerifyCtorDtorAssign, because void return objects should not exist; before LinkReferenceToTypes_old because it is an indexer and needs correct types for mangling 355 347 } 348 } 349 350 void validate_B( std::list< Declaration * > & translationUnit ) { 351 PassVisitor<LinkReferenceToTypes_old> lrt( nullptr ); 352 PassVisitor<FixQualifiedTypes> fixQual; 356 353 { 357 354 Stats::Heap::newPass("validate-B"); … … 362 359 EliminateTypedef::eliminateTypedef( translationUnit ); 363 360 } 361 } 362 363 void validate_C( std::list< Declaration * > & translationUnit ) { 364 PassVisitor<ValidateGenericParameters> genericParams; 365 PassVisitor<ResolveEnumInitializers> rei( nullptr ); 364 366 { 365 367 Stats::Heap::newPass("validate-C"); … … 381 383 }); 382 384 } 385 } 386 387 void validate_D( std::list< Declaration * > & translationUnit ) { 388 PassVisitor<ForallPointerDecay_old> fpd; 383 389 { 384 390 Stats::Heap::newPass("validate-D"); … … 397 403 }); 398 404 } 405 } 406 407 void validate_E( std::list< Declaration * > & translationUnit ) { 408 PassVisitor<CompoundLiteral> compoundliteral; 399 409 { 400 410 Stats::Heap::newPass("validate-E"); … … 415 425 } 416 426 } 427 } 428 429 void validate_F( std::list< Declaration * > & translationUnit ) { 430 PassVisitor<LabelAddressFixer> labelAddrFixer; 417 431 { 418 432 Stats::Heap::newPass("validate-F"); … … 437 451 } 438 452 } 453 } 454 455 void validate( std::list< Declaration * > &translationUnit, __attribute__((unused)) bool doDebug ) { 456 validate_A( translationUnit ); 457 validate_B( translationUnit ); 458 validate_C( translationUnit ); 459 validate_D( translationUnit ); 460 validate_E( translationUnit ); 461 validate_F( translationUnit ); 439 462 } 440 463 -
src/SymTab/Validate.h
r3249dd8b r5dcb881 35 35 void validateType( Type *type, const Indexer *indexer ); 36 36 37 // Sub-passes of validate. 38 void validate_A( std::list< Declaration * > &translationUnit ); 39 void validate_B( std::list< Declaration * > &translationUnit ); 40 void validate_C( std::list< Declaration * > &translationUnit ); 41 void validate_D( std::list< Declaration * > &translationUnit ); 42 void validate_E( std::list< Declaration * > &translationUnit ); 43 void validate_F( std::list< Declaration * > &translationUnit ); 44 37 45 const ast::Type * validateType( 38 46 const CodeLocation & loc, const ast::Type * type, const ast::SymbolTable & symtab );
Note: See TracChangeset
for help on using the changeset viewer.