Changeset 4a60488 for src/SymTab
- Timestamp:
- Sep 27, 2019, 3:35:46 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 90ce35aa
- Parents:
- 8e1467d (diff), 849720f (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- src/SymTab
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SymTab/Demangle.cc
r8e1467d r4a60488 9 9 // Author : Rob Schluntz 10 10 // Created On : Thu Jul 19 12:52:41 2018 11 // Last Modified By : Rob Schluntz12 // Last Modified On : T hu Jul 19 12:54:35 201813 // Update Count : 211 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Jul 30 13:46:33 2019 13 // Update Count : 3 14 14 // 15 15 … … 313 313 typeString = "_Atomic " + typeString; 314 314 } // if 315 if ( type->get_lvalue() ) {316 // when not generating C code, print lvalue for debugging.317 typeString = "lvalue " + typeString;318 }319 315 } 320 316 } -
src/SymTab/Mangler.cc
r8e1467d r4a60488 10 10 // Created On : Sun May 17 21:40:29 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Sep 25 15:49:26 201713 // Update Count : 2 312 // Last Modified On : Tue Jul 30 13:46:10 2019 13 // Update Count : 26 14 14 // 15 15 #include "Mangler.h" … … 377 377 mangleName << Encoding::qualifiers.at(Type::Mutex); 378 378 } // if 379 if ( type->get_lvalue() ) {380 // mangle based on whether the type is lvalue, so that the resolver can differentiate lvalues and rvalues381 mangleName << Encoding::qualifiers.at(Type::Lvalue);382 }383 384 379 if ( inFunctionType ) { 385 380 // turn off inFunctionType so that types can be differentiated for nested qualifiers … … 724 719 mangleName << Encoding::qualifiers.at(Type::Mutex); 725 720 } // if 726 if ( type->is_lvalue() ) {727 // mangle based on whether the type is lvalue, so that the resolver can differentiate lvalues and rvalues728 mangleName << Encoding::qualifiers.at(Type::Lvalue);729 }730 731 721 if ( inFunctionType ) { 732 722 // turn off inFunctionType so that types can be differentiated for nested qualifiers -
src/SymTab/Validate.cc
r8e1467d r4a60488 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 : Mon Aug 28 13:47:23 201713 // Update Count : 3 5911 // Last Modified By : Andrew Beach 12 // Last Modified On : Wed Aug 7 6:42:00 2019 13 // Update Count : 360 14 14 // 15 15 … … 81 81 #include "SynTree/Label.h" // for operator==, Label 82 82 #include "SynTree/Mutator.h" // for Mutator 83 #include "SynTree/TopLvalue.h" // for assertTopLvalue, clearInnerLvalue 83 84 #include "SynTree/Type.h" // for Type, TypeInstType, EnumInstType 84 85 #include "SynTree/TypeSubstitution.h" // for TypeSubstitution … … 308 309 PassVisitor<FixQualifiedTypes> fixQual; 309 310 311 assertTopLvalue( translationUnit ); 310 312 { 311 313 Stats::Heap::newPass("validate-A"); … … 316 318 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 317 319 } 320 assertTopLvalue( translationUnit ); 318 321 { 319 322 Stats::Heap::newPass("validate-B"); 320 323 Stats::Time::BlockGuard guard("validate-B"); 324 assertTopLvalue( translationUnit ); 321 325 Stats::Time::TimeBlock("Link Reference To Types", [&]() { 322 326 acceptAll( translationUnit, lrt ); // must happen before autogen, because sized flag needs to propagate to generated functions 323 327 }); 328 clearInnerLvalue( translationUnit ); 329 assertTopLvalue( translationUnit ); 324 330 Stats::Time::TimeBlock("Fix Qualified Types", [&]() { 325 331 mutateAll( translationUnit, fixQual ); // must happen after LinkReferenceToTypes_old, because aggregate members are accessed 326 332 }); 333 assertTopLvalue( translationUnit ); 327 334 Stats::Time::TimeBlock("Hoist Structs", [&]() { 328 335 HoistStruct::hoistStruct( translationUnit ); // must happen after EliminateTypedef, so that aggregate typedefs occur in the correct order 329 336 }); 337 assertTopLvalue( translationUnit ); 330 338 Stats::Time::TimeBlock("Eliminate Typedefs", [&]() { 331 339 EliminateTypedef::eliminateTypedef( translationUnit ); // 332 340 }); 333 341 } 342 assertTopLvalue( translationUnit ); 334 343 { 335 344 Stats::Heap::newPass("validate-C"); … … 340 349 InitTweak::fixReturnStatements( translationUnit ); // must happen before autogen 341 350 } 351 assertTopLvalue( translationUnit ); 342 352 { 343 353 Stats::Heap::newPass("validate-D"); 344 354 Stats::Time::BlockGuard guard("validate-D"); 355 assertTopLvalue( translationUnit ); 345 356 Stats::Time::TimeBlock("Apply Concurrent Keywords", [&]() { 346 357 Concurrency::applyKeywords( translationUnit ); 347 358 }); 359 clearInnerLvalue( translationUnit ); 360 assertTopLvalue( translationUnit ); 348 361 Stats::Time::TimeBlock("Forall Pointer Decay", [&]() { 349 362 acceptAll( translationUnit, fpd ); // must happen before autogenerateRoutines, after Concurrency::applyKeywords because uniqueIds must be set on declaration before resolution 350 363 }); 364 assertTopLvalue( translationUnit ); 351 365 Stats::Time::TimeBlock("Hoist Control Declarations", [&]() { 352 366 ControlStruct::hoistControlDecls( translationUnit ); // hoist initialization out of for statements; must happen before autogenerateRoutines 353 367 }); 368 assertTopLvalue( translationUnit ); 354 369 Stats::Time::TimeBlock("Generate Autogen routines", [&]() { 355 370 autogenerateRoutines( translationUnit ); // moved up, used to be below compoundLiteral - currently needs EnumAndPointerDecay_old 356 371 }); 357 } 372 clearInnerLvalue( translationUnit ); 373 } 374 assertTopLvalue( translationUnit ); 358 375 { 359 376 Stats::Heap::newPass("validate-E"); 360 377 Stats::Time::BlockGuard guard("validate-E"); 378 assertTopLvalue( translationUnit ); 361 379 Stats::Time::TimeBlock("Implement Mutex Func", [&]() { 362 380 Concurrency::implementMutexFuncs( translationUnit ); 363 381 }); 382 clearInnerLvalue( translationUnit ); 383 assertTopLvalue( translationUnit ); 364 384 Stats::Time::TimeBlock("Implement Thread Start", [&]() { 365 385 Concurrency::implementThreadStarter( translationUnit ); 366 386 }); 387 assertTopLvalue( translationUnit ); 367 388 Stats::Time::TimeBlock("Compound Literal", [&]() { 368 389 mutateAll( translationUnit, compoundliteral ); 369 390 }); 391 assertTopLvalue( translationUnit ); 370 392 Stats::Time::TimeBlock("Resolve With Expressions", [&]() { 371 393 ResolvExpr::resolveWithExprs( translationUnit ); // must happen before FixObjectType because user-code is resolved and may contain with variables 372 394 }); 373 } 395 clearInnerLvalue( translationUnit ); 396 } 397 assertTopLvalue( translationUnit ); 374 398 { 375 399 Stats::Heap::newPass("validate-F"); 376 400 Stats::Time::BlockGuard guard("validate-F"); 401 assertTopLvalue( translationUnit ); 377 402 Stats::Time::TimeBlock("Fix Object Type", [&]() { 378 403 FixObjectType::fix( translationUnit ); 379 404 }); 405 assertTopLvalue( translationUnit ); 380 406 Stats::Time::TimeBlock("Array Length", [&]() { 381 407 ArrayLength::computeLength( translationUnit ); 382 408 }); 409 clearInnerLvalue( translationUnit ); 410 assertTopLvalue( translationUnit ); 383 411 Stats::Time::TimeBlock("Find Special Declarations", [&]() { 384 412 Validate::findSpecialDecls( translationUnit ); 385 413 }); 414 assertTopLvalue( translationUnit ); 386 415 Stats::Time::TimeBlock("Fix Label Address", [&]() { 387 416 mutateAll( translationUnit, labelAddrFixer ); 388 417 }); 418 assertTopLvalue( translationUnit ); 389 419 Stats::Time::TimeBlock("Handle Attributes", [&]() { 390 420 Validate::handleAttributes( translationUnit ); 391 421 }); 392 422 } 423 assertTopLvalue( translationUnit ); 393 424 } 394 425
Note: See TracChangeset
for help on using the changeset viewer.