Changes in src/Concurrency/Keywords.cc [2db79e5:ba3706f]
- File:
-
- 1 edited
-
src/Concurrency/Keywords.cc (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Concurrency/Keywords.cc
r2db79e5 rba3706f 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 270 259 void ConcurrentSueKeyword::postvisit(StructDecl * decl) { 271 260 if( decl->name == type_name && decl->body ) { … … 312 301 ); 313 302 314 get_type->get_parameters().push_back( this_decl ->clone());303 get_type->get_parameters().push_back( this_decl ); 315 304 get_type->get_returnVals().push_back( 316 305 new ObjectDecl( … … 329 318 ) 330 319 ); 331 fixupGenerics(get_type, decl);332 320 333 321 FunctionDecl * get_decl = new FunctionDecl( … … 355 343 nullptr 356 344 ); 357 fixupGenerics(main_type, decl); 358 } 359 360 delete this_decl; 345 } 361 346 362 347 declsToAddBefore.push_back( forward ); … … 392 377 new MemberExpr( 393 378 field, 394 new CastExpr( 395 new VariableExpr( func->get_functionType()->get_parameters().front() ), 396 func->get_functionType()->get_parameters().front()->get_type()->stripReferences()->clone() 397 ) 379 UntypedExpr::createDeref( new VariableExpr( func->get_functionType()->get_parameters().front() ) ) 398 380 ) 399 381 )
Note:
See TracChangeset
for help on using the changeset viewer.