Changeset d1b9d78 for src/SymTab/Validate.cc
- Timestamp:
- Jul 13, 2016, 1:44:00 PM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 9c791dd
- Parents:
- 8884112 (diff), ed9ecda (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SymTab/Validate.cc
r8884112 rd1b9d78 9 9 // Author : Richard C. Bilson 10 10 // Created On : Sun May 17 21:50:04 2015 11 // Last Modified By : Rob Schluntz12 // Last Modified On : Wed May 11 13:17:52201613 // Update Count : 29 711 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Jul 12 17:49:21 2016 13 // Update Count : 298 14 14 // 15 15 … … 74 74 virtual void visit( CompoundStmt *compoundStmt ); 75 75 virtual void visit( SwitchStmt *switchStmt ); 76 virtual void visit( ChooseStmt *chooseStmt );77 // virtual void visit( CaseStmt *caseStmt );78 76 private: 79 77 HoistStruct(); … … 268 266 addVisit( switchStmt, *this ); 269 267 } 270 271 void HoistStruct::visit( ChooseStmt *switchStmt ) {272 addVisit( switchStmt, *this );273 }274 275 // void HoistStruct::visit( CaseStmt *caseStmt ) {276 // addVisit( caseStmt, *this );277 // }278 268 279 269 void Pass1::visit( EnumDecl *enumDecl ) { … … 551 541 if ( StructInstType *aggDecl = dynamic_cast< StructInstType * >( tyDecl->get_base() ) ) { 552 542 return new StructDecl( aggDecl->get_name() ); 543 // return aggDecl->get_baseStruct(); 553 544 } else if ( UnionInstType *aggDecl = dynamic_cast< UnionInstType * >( tyDecl->get_base() ) ) { 554 545 return new UnionDecl( aggDecl->get_name() ); … … 645 636 } // if 646 637 } 638 647 639 Declaration *EliminateTypedef::mutate( StructDecl * structDecl ) { 648 640 addImplicitTypedef( structDecl ); … … 691 683 692 684 Visitor::visit( funcDecl ); 693 // original idea: modify signature of ctor/dtors and insert appropriate return statements694 // to cause desired behaviour695 // new idea: add comma exprs to every ctor call to produce first parameter.696 // this requires some memoization of the first parameter, because it can be a697 // complicated expression with side effects (see: malloc). idea: add temporary variable698 // that is assigned address of constructed object in ctor argument position and699 // return the temporary. It should also be done after all implicit ctors are700 // added, so not in this pass!701 685 } 702 686
Note: See TracChangeset
for help on using the changeset viewer.