Changeset 9e2c1f0 for src/InitTweak/GenInit.cc
- Timestamp:
- May 6, 2016, 4:28:50 PM (8 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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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 }
Note: See TracChangeset
for help on using the changeset viewer.