Changeset ce8c12f for src/Concurrency/Keywords.cc
- Timestamp:
- May 15, 2017, 11:30:26 AM (7 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:
- d36c117
- Parents:
- 65aca88
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Concurrency/Keywords.cc
r65aca88 rce8c12f 322 322 if( needs_main ) { 323 323 FunctionType * main_type = new FunctionType( noQualifiers, false ); 324 324 325 325 main_type->get_parameters().push_back( this_decl->clone() ); 326 326 … … 361 361 void ConcurrentSueKeyword::addRoutines( StructDecl * decl, ObjectDecl * field, FunctionDecl * func ) { 362 362 CompoundStmt * statement = new CompoundStmt( noLabels ); 363 statement->push_back( 363 statement->push_back( 364 364 new ReturnStmt( 365 365 noLabels, … … 386 386 //============================================================================================= 387 387 void MutexKeyword::visit(FunctionDecl* decl) { 388 Visitor::visit(decl); 388 Visitor::visit(decl); 389 389 390 390 std::list<DeclarationWithType*> mutexArgs = findMutexArgs( decl ); … … 510 510 void ThreadStarter::visit(FunctionDecl * decl) { 511 511 Visitor::visit(decl); 512 512 513 513 if( ! InitTweak::isConstructor(decl->get_name()) ) return; 514 514 515 515 DeclarationWithType * param = decl->get_functionType()->get_parameters().front(); 516 auto ptr = dynamic_cast< PointerType * >( param->get_type() ); 517 // if( ptr ) std::cerr << "FRED1" << std::endl; 518 auto type = dynamic_cast< StructInstType * >( ptr->get_base() ); 516 auto type = dynamic_cast< StructInstType * >( InitTweak::getPointerBase( param->get_type() ) ); 519 517 // if( type ) std::cerr << "FRED2" << std::endl; 520 518 if( type && type->get_baseStruct()->is_thread() ) { … … 528 526 if( ! stmt ) return; 529 527 530 stmt->push_back( 528 stmt->push_back( 531 529 new ExprStmt( 532 530 noLabels,
Note: See TracChangeset
for help on using the changeset viewer.