Changeset bcda04c for src/SymTab
- Timestamp:
- Mar 23, 2017, 11:37:27 AM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- bd4d011
- Parents:
- 578b637
- Location:
- src/SymTab
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/SymTab/Autogen.cc ¶
r578b637 rbcda04c 218 218 219 219 /// generates a function (?{}, ?=?, ^?{}) based on the data argument and members. If function is generated, inserts the type into the map. 220 void gen( const FuncData & data ) {220 void gen( const FuncData & data, bool concurrent_type ) { 221 221 if ( ! shouldGenerate( data.map, aggregateDecl ) ) return; 222 222 FunctionType * ftype = data.genType( refType ); 223 224 if(concurrent_type && InitTweak::isDestructor( data.fname )) { 225 ftype->get_parameters().front()->get_type()->set_mutex( true ); 226 } 227 223 228 cloneAll( typeParams, ftype->get_forall() ); 224 229 *out++ = genFunc( data.fname, ftype, functionNesting ); … … 403 408 auto generator = makeFuncGenerator( aggregateDecl, refType, functionNesting, typeParams, back_inserter( newFuncs ) ); 404 409 for ( const FuncData & d : data ) { 405 generator.gen( d ); 406 } 410 generator.gen( d, aggregateDecl->is_thread() || aggregateDecl->is_monitor() ); 411 } 412 407 413 // field ctors are only generated if default constructor and copy constructor are both generated 408 414 unsigned numCtors = std::count_if( newFuncs.begin(), newFuncs.end(), [](FunctionDecl * dcl) { return InitTweak::isConstructor( dcl->get_name() ); } ); -
TabularUnified src/SymTab/Validate.cc ¶
r578b637 rbcda04c 43 43 #include "Common/utility.h" 44 44 #include "Common/UniqueName.h" 45 #include "Concurrency/Keywords.h" 45 46 #include "Validate.h" 46 47 #include "SynTree/Visitor.h" … … 225 226 ReturnTypeFixer::fix( translationUnit ); // must happen before autogen 226 227 acceptAll( translationUnit, lrt ); // must happen before autogen, because sized flag needs to propagate to generated functions 228 Concurrency::applyKeywords( translationUnit ); 227 229 autogenerateRoutines( translationUnit ); // moved up, used to be below compoundLiteral - currently needs EnumAndPointerDecayPass 230 Concurrency::implementMutexFuncs( translationUnit ); 231 Concurrency::implementThreadStarter( translationUnit ); 228 232 acceptAll( translationUnit, epc ); 229 233 ReturnChecker::checkFunctionReturns( translationUnit );
Note: See TracChangeset
for help on using the changeset viewer.