Changes in src/Concurrency/Waitfor.cc [ba3706f:0cf5b79]
- File:
-
- 1 edited
-
src/Concurrency/Waitfor.cc (modified) (18 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Concurrency/Waitfor.cc
rba3706f r0cf5b79 100 100 101 101 namespace Concurrency { 102 103 namespace { 104 const std::list<Label> noLabels; 105 const std::list< Attribute * > noAttributes; 106 Type::StorageClasses noStorage; 107 Type::Qualifiers noQualifiers; 108 } 109 102 110 //============================================================================================= 103 111 // Pass declarations … … 195 203 ResolvExpr::findVoidExpression( expr, indexer ); 196 204 197 return new ExprStmt( expr );205 return new ExprStmt( noLabels, expr ); 198 206 } 199 207 … … 251 259 if( !decl_monitor || !decl_acceptable || !decl_mask ) throw SemanticError( "waitfor keyword requires monitors to be in scope, add #include <monitor>", waitfor ); 252 260 253 CompoundStmt * stmt = new CompoundStmt( );261 CompoundStmt * stmt = new CompoundStmt( noLabels ); 254 262 255 263 ObjectDecl * acceptables = declare( waitfor->clauses.size(), stmt ); … … 273 281 ); 274 282 275 CompoundStmt * compound = new CompoundStmt( );283 CompoundStmt * compound = new CompoundStmt( noLabels ); 276 284 stmt->push_back( new IfStmt( 285 noLabels, 277 286 safeCond( new VariableExpr( flag ) ), 278 287 compound, … … 304 313 ); 305 314 306 stmt->push_back( new DeclStmt( acceptables) );315 stmt->push_back( new DeclStmt( noLabels, acceptables) ); 307 316 308 317 Expression * set = new UntypedExpr( … … 317 326 ResolvExpr::findVoidExpression( set, indexer ); 318 327 319 stmt->push_back( new ExprStmt( set ) );328 stmt->push_back( new ExprStmt( noLabels, set ) ); 320 329 321 330 return acceptables; … … 332 341 ); 333 342 334 stmt->push_back( new DeclStmt( flag) );343 stmt->push_back( new DeclStmt( noLabels, flag) ); 335 344 336 345 return flag; … … 348 357 ResolvExpr::findVoidExpression( expr, indexer ); 349 358 350 return new ExprStmt( expr );359 return new ExprStmt( noLabels, expr ); 351 360 } 352 361 … … 390 399 ); 391 400 392 stmt->push_back( new DeclStmt( mon) );401 stmt->push_back( new DeclStmt( noLabels, mon) ); 393 402 394 403 return mon; … … 402 411 403 412 stmt->push_back( new IfStmt( 413 noLabels, 404 414 safeCond( clause.condition ), 405 415 new CompoundStmt({ … … 437 447 ); 438 448 439 stmt->push_back( new DeclStmt( timeout ) );449 stmt->push_back( new DeclStmt( noLabels, timeout ) ); 440 450 441 451 if( time ) { 442 452 stmt->push_back( new IfStmt( 453 noLabels, 443 454 safeCond( time_cond ), 444 455 new CompoundStmt({ 445 456 new ExprStmt( 457 noLabels, 446 458 makeOpAssign( 447 459 new VariableExpr( timeout ), … … 459 471 if( has_else ) { 460 472 stmt->push_back( new IfStmt( 473 noLabels, 461 474 safeCond( else_cond ), 462 475 new CompoundStmt({ 463 476 new ExprStmt( 477 noLabels, 464 478 makeOpAssign( 465 479 new VariableExpr( timeout ), … … 497 511 ); 498 512 499 stmt->push_back( new DeclStmt( index ) );513 stmt->push_back( new DeclStmt( noLabels, index ) ); 500 514 501 515 ObjectDecl * mask = ObjectDecl::newObject( … … 512 526 ); 513 527 514 stmt->push_back( new DeclStmt( mask ) );528 stmt->push_back( new DeclStmt( noLabels, mask ) ); 515 529 516 530 stmt->push_back( new ExprStmt( 531 noLabels, 517 532 new ApplicationExpr( 518 533 VariableExpr::functionPointer( decl_waitfor ), … … 542 557 ) { 543 558 SwitchStmt * swtch = new SwitchStmt( 559 noLabels, 544 560 result, 545 561 std::list<Statement *>() … … 550 566 swtch->statements.push_back( 551 567 new CaseStmt( 568 noLabels, 552 569 new ConstantExpr( Constant::from_ulong( i++ ) ), 553 570 { 554 571 clause.statement, 555 572 new BranchStmt( 573 noLabels, 556 574 "", 557 575 BranchStmt::Break … … 565 583 swtch->statements.push_back( 566 584 new CaseStmt( 585 noLabels, 567 586 new ConstantExpr( Constant::from_int( -2 ) ), 568 587 { 569 588 waitfor->timeout.statement, 570 589 new BranchStmt( 590 noLabels, 571 591 "", 572 592 BranchStmt::Break … … 580 600 swtch->statements.push_back( 581 601 new CaseStmt( 602 noLabels, 582 603 new ConstantExpr( Constant::from_int( -1 ) ), 583 604 { 584 605 waitfor->orelse.statement, 585 606 new BranchStmt( 607 noLabels, 586 608 "", 587 609 BranchStmt::Break
Note:
See TracChangeset
for help on using the changeset viewer.