Changeset b9f8274
- Timestamp:
- Jul 12, 2022, 3:40:38 PM (2 years ago)
- Branches:
- ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
- Children:
- d4b37ab
- Parents:
- 1931bb01
- Location:
- src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/CandidateFinder.cpp
r1931bb01 rb9f8274 41 41 #include "Common/utility.h" // for move, copy 42 42 #include "SymTab/Mangler.h" 43 #include "SymTab/Validate.h" // for validateType44 43 #include "Tuples/Tuples.h" // for handleTupleAssignment 45 44 #include "InitTweak/InitTweak.h" // for getPointerBase … … 1091 1090 assert( toType ); 1092 1091 toType = resolveTypeof( toType, context ); 1093 // toType = SymTab::validateType( castExpr->location, toType, symtab );1094 1092 toType = adjustExprType( toType, tenv, symtab ); 1095 1093 … … 1582 1580 // calculate target type 1583 1581 const ast::Type * toType = resolveTypeof( initAlt.type, context ); 1584 // toType = SymTab::validateType( initExpr->location, toType, symtab );1585 1582 toType = adjustExprType( toType, tenv, symtab ); 1586 1583 // The call to find must occur inside this loop, otherwise polymorphic return -
src/SymTab/Validate.cc
r1931bb01 rb9f8274 10 10 // Created On : Sun May 17 21:50:04 2015 11 11 // Last Modified By : Andrew Beach 12 // Last Modified On : Tue May 17 14:36:00 202213 // Update Count : 36 612 // Last Modified On : Tue Jul 12 15:00:00 2022 13 // Update Count : 367 14 14 // 15 15 … … 294 294 }; 295 295 296 void validate _A( std::list< Declaration * > & translationUnit) {296 void validate( std::list< Declaration * > &translationUnit, __attribute__((unused)) bool doDebug ) { 297 297 PassVisitor<HoistTypeDecls> hoistDecls; 298 298 { … … 305 305 decayEnumsAndPointers( translationUnit ); // 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 306 306 } 307 }308 309 void validate_B( std::list< Declaration * > & translationUnit ) {310 307 PassVisitor<FixQualifiedTypes> fixQual; 311 308 { … … 317 314 EliminateTypedef::eliminateTypedef( translationUnit ); 318 315 } 319 }320 321 void validate_C( std::list< Declaration * > & translationUnit ) {322 316 PassVisitor<ValidateGenericParameters> genericParams; 323 317 PassVisitor<ResolveEnumInitializers> rei( nullptr ); … … 343 337 }); 344 338 } 345 }346 347 void validate_D( std::list< Declaration * > & translationUnit ) {348 339 { 349 340 Stats::Heap::newPass("validate-D"); … … 362 353 }); 363 354 } 364 }365 366 void validate_E( std::list< Declaration * > & translationUnit ) {367 355 PassVisitor<CompoundLiteral> compoundliteral; 368 356 { … … 384 372 } 385 373 } 386 }387 388 void validate_F( std::list< Declaration * > & translationUnit ) {389 374 PassVisitor<LabelAddressFixer> labelAddrFixer; 390 375 { … … 410 395 } 411 396 } 412 }413 414 void validate( std::list< Declaration * > &translationUnit, __attribute__((unused)) bool doDebug ) {415 validate_A( translationUnit );416 validate_B( translationUnit );417 validate_C( translationUnit );418 validate_D( translationUnit );419 validate_E( translationUnit );420 validate_F( translationUnit );421 397 } 422 398 -
src/SymTab/Validate.h
r1931bb01 rb9f8274 11 11 // Created On : Sun May 17 21:53:34 2015 12 12 // Last Modified By : Andrew Beach 13 // Last Modified On : Tue May 17 14:35:00 202214 // Update Count : 513 // Last Modified On : Tue Jul 12 15:30:00 2022 14 // Update Count : 6 15 15 // 16 16 … … 19 19 #include <list> // for list 20 20 21 struct CodeLocation; 22 class Declaration; 23 class Type; 24 25 namespace ast { 26 class Type; 27 class SymbolTable; 28 } 21 class Declaration; 29 22 30 23 namespace SymTab { 31 class Indexer;32 33 24 /// Normalizes struct and function declarations 34 25 void validate( std::list< Declaration * > &translationUnit, bool doDebug = false ); 35 36 // Sub-passes of validate.37 void validate_A( std::list< Declaration * > &translationUnit );38 void validate_B( std::list< Declaration * > &translationUnit );39 void validate_C( std::list< Declaration * > &translationUnit );40 void validate_D( std::list< Declaration * > &translationUnit );41 void validate_E( std::list< Declaration * > &translationUnit );42 void validate_F( std::list< Declaration * > &translationUnit );43 26 } // namespace SymTab 44 27 -
src/main.cc
r1931bb01 rb9f8274 474 474 } else { 475 475 // add the assignment statement after the initialization of a type parameter 476 PASS( "Validate-A", SymTab::validate_A( translationUnit ) ); 477 PASS( "Validate-B", SymTab::validate_B( translationUnit ) ); 478 PASS( "Validate-C", SymTab::validate_C( translationUnit ) ); 479 PASS( "Validate-D", SymTab::validate_D( translationUnit ) ); 480 PASS( "Validate-E", SymTab::validate_E( translationUnit ) ); 481 PASS( "Validate-F", SymTab::validate_F( translationUnit ) ); 476 PASS( "Validate", SymTab::validate( translationUnit ) ); 482 477 483 478 if ( symtabp ) {
Note: See TracChangeset
for help on using the changeset viewer.