Changeset 9e2c1f0 for src/InitTweak
- Timestamp:
- May 6, 2016, 4:28:50 PM (9 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, 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:
- ec79847
- Parents:
- 99ee64d (diff), 03e5d14 (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/InitTweak
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/InitTweak/GenInit.cc ¶
r99ee64d r9e2c1f0 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Rob Schluntz 12 // Last Modified On : Thu Apr 28 12:26:47201612 // Last Modified On : Fri May 06 16:11:15 2016 13 13 // Update Count : 166 14 14 // … … 129 129 } 130 130 131 bool tryConstruct( ObjectDecl * objDecl ) { 132 // xxx - handle designations 133 return ! LinkageSpec::isBuiltin( objDecl->get_linkage() ) && 134 (objDecl->get_init() == NULL || 135 ( objDecl->get_init() != NULL && objDecl->get_init()->get_maybeConstructed() )); 136 } 131 137 namespace { 132 bool tryConstruct( ObjectDecl * objDecl ) {133 // xxx - handle designations134 return ! LinkageSpec::isBuiltin( objDecl->get_linkage() ) &&135 (objDecl->get_init() == NULL ||136 ( objDecl->get_init() != NULL && objDecl->get_init()->get_maybeConstructed() ));137 }138 138 139 139 Expression * makeCtorDtorExpr( std::string name, ObjectDecl * objDecl, std::list< Expression * > args ) { … … 209 209 objDecl->set_init( new ConstructorInit( ctorStmt, dtorStmt, objDecl->get_init() ) ); 210 210 } 211 } else {212 // xxx - find a way to construct/destruct globals213 // hack: implicit "static" initialization routine for each struct type? or something similar?214 // --ties into module system215 // this can be done by mangling main and replacing it with our own main which calls each216 // module initialization routine in some decided order (order given in link command?)217 // and finally calls mangled main218 211 } 219 212 } -
TabularUnified src/InitTweak/GenInit.h ¶
r99ee64d r9e2c1f0 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Rob Schluntz 12 // Last Modified On : Thu Apr 28 12:22:09201612 // Last Modified On : Fri May 06 16:18:22 2016 13 13 // Update Count : 3 14 14 // … … 27 27 /// Adds return value temporaries and wraps Initializers in ConstructorInit nodes 28 28 void genInit( std::list< Declaration * > & translationUnit ); 29 /// True if the resolver should try to construct objDecl 30 bool tryConstruct( ObjectDecl * objDecl ); 29 31 } // namespace 30 32 31 #endif // GENPOLY_POLYMUTATOR_H33 #endif // INITTWEAK_GENINIT_H 32 34 33 35 // Local Variables: // -
TabularUnified src/InitTweak/module.mk ¶
r99ee64d r9e2c1f0 11 11 ## Created On : Mon Jun 1 17:49:17 2015 12 12 ## Last Modified By : Rob Schluntz 13 ## Last Modified On : Thu Apr 28 12:23:17 201613 ## Last Modified On : Fri May 06 15:59:27 2016 14 14 ## Update Count : 3 15 15 ############################################################################### 16 16 17 17 SRC += InitTweak/GenInit.cc \ 18 InitTweak/FixInit.cc 18 InitTweak/FixInit.cc \ 19 InitTweak/FixGlobalInit.cc 20
Note: See TracChangeset
for help on using the changeset viewer.