Changes in src/SymTab/Validate.cc [3ff4c1e:954c954]
- File:
-
- 1 edited
-
src/SymTab/Validate.cc (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/SymTab/Validate.cc
r3ff4c1e r954c954 64 64 #include "Common/UniqueName.h" // for UniqueName 65 65 #include "Common/utility.h" // for operator+, cloneAll, deleteAll 66 #include "CompilationState.h" // skip some passes in new-ast build67 66 #include "Concurrency/Keywords.h" // for applyKeywords 68 67 #include "FixFunction.h" // for FixFunction … … 369 368 mutateAll( translationUnit, compoundliteral ); 370 369 }); 371 if (!useNewAST) { 372 Stats::Time::TimeBlock("Resolve With Expressions", [&]() { 373 ResolvExpr::resolveWithExprs( translationUnit ); // must happen before FixObjectType because user-code is resolved and may contain with variables 374 }); 375 } 370 Stats::Time::TimeBlock("Resolve With Expressions", [&]() { 371 ResolvExpr::resolveWithExprs( translationUnit ); // must happen before FixObjectType because user-code is resolved and may contain with variables 372 }); 376 373 } 377 374 { 378 375 Stats::Heap::newPass("validate-F"); 379 376 Stats::Time::BlockGuard guard("validate-F"); 380 if (!useNewAST) { 381 Stats::Time::TimeCall("Fix Object Type", 382 FixObjectType::fix, translationUnit); 383 } 377 Stats::Time::TimeCall("Fix Object Type", 378 FixObjectType::fix, translationUnit); 384 379 Stats::Time::TimeCall("Array Length", 385 380 ArrayLength::computeLength, translationUnit); … … 388 383 Stats::Time::TimeCall("Fix Label Address", 389 384 mutateAll<LabelAddressFixer>, translationUnit, labelAddrFixer); 390 if (!useNewAST) { 391 Stats::Time::TimeCall("Handle Attributes", 392 Validate::handleAttributes, translationUnit); 393 } 385 Stats::Time::TimeCall("Handle Attributes", 386 Validate::handleAttributes, translationUnit); 394 387 } 395 388 } … … 1347 1340 1348 1341 void ArrayLength::previsit( ArrayType * type ) { 1349 if (!useNewAST) { 1350 if ( type->dimension ) { 1351 // need to resolve array dimensions early so that constructor code can correctly determine 1352 // if a type is a VLA (and hence whether its elements need to be constructed) 1353 ResolvExpr::findSingleExpression( type->dimension, Validate::SizeType->clone(), indexer ); 1354 1355 // must re-evaluate whether a type is a VLA, now that more information is available 1356 // (e.g. the dimension may have been an enumerator, which was unknown prior to this step) 1357 type->isVarLen = ! InitTweak::isConstExpr( type->dimension ); 1358 } 1342 if ( type->dimension ) { 1343 // need to resolve array dimensions early so that constructor code can correctly determine 1344 // if a type is a VLA (and hence whether its elements need to be constructed) 1345 ResolvExpr::findSingleExpression( type->dimension, Validate::SizeType->clone(), indexer ); 1346 1347 // must re-evaluate whether a type is a VLA, now that more information is available 1348 // (e.g. the dimension may have been an enumerator, which was unknown prior to this step) 1349 type->isVarLen = ! InitTweak::isConstExpr( type->dimension ); 1359 1350 } 1360 1351 }
Note:
See TracChangeset
for help on using the changeset viewer.