Changeset b6838214 for src/Concurrency
- Timestamp:
- Jan 23, 2018, 5:46:43 PM (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:
- 258e6ad5
- Parents:
- b158d8f (diff), 15d248e (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/Concurrency
- Files:
-
- 2 edited
-
Keywords.cc (modified) (5 diffs)
-
Waitfor.cc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/Concurrency/Keywords.cc
rb158d8f rb6838214 257 257 // Generic keyword implementation 258 258 //============================================================================================= 259 void fixupGenerics(FunctionType * func, StructDecl * decl) { 260 cloneAll(decl->parameters, func->forall); 261 for ( TypeDecl * td : func->forall ) { 262 strict_dynamic_cast<StructInstType*>( 263 func->parameters.front()->get_type()->stripReferences() 264 )->parameters.push_back( 265 new TypeExpr( new TypeInstType( noQualifiers, td->name, td ) ) 266 ); 267 } 268 } 269 259 270 void ConcurrentSueKeyword::postvisit(StructDecl * decl) { 260 271 if( decl->name == type_name && decl->body ) { … … 301 312 ); 302 313 303 get_type->get_parameters().push_back( this_decl );314 get_type->get_parameters().push_back( this_decl->clone() ); 304 315 get_type->get_returnVals().push_back( 305 316 new ObjectDecl( … … 318 329 ) 319 330 ); 331 fixupGenerics(get_type, decl); 320 332 321 333 FunctionDecl * get_decl = new FunctionDecl( … … 343 355 nullptr 344 356 ); 345 } 357 fixupGenerics(main_type, decl); 358 } 359 360 delete this_decl; 346 361 347 362 declsToAddBefore.push_back( forward ); … … 377 392 new MemberExpr( 378 393 field, 379 UntypedExpr::createDeref( new VariableExpr( func->get_functionType()->get_parameters().front() ) ) 394 new CastExpr( 395 new VariableExpr( func->get_functionType()->get_parameters().front() ), 396 func->get_functionType()->get_parameters().front()->get_type()->stripReferences()->clone() 397 ) 380 398 ) 381 399 ) -
src/Concurrency/Waitfor.cc
rb158d8f rb6838214 507 507 new ListInit({ 508 508 new SingleInit( new AddressExpr( new VariableExpr( index ) ) ), 509 new SingleInit( new VariableExpr( acceptables ) ), 510 new SingleInit( new ConstantExpr( Constant::from_ulong( count ) ) ) 509 new ListInit({ 510 new SingleInit( new VariableExpr( acceptables ) ), 511 new SingleInit( new ConstantExpr( Constant::from_ulong( count ) ) ) 512 }) 511 513 }) 512 514 );
Note:
See TracChangeset
for help on using the changeset viewer.