- Timestamp:
- Nov 17, 2023, 3:23:15 PM (9 months ago)
- Branches:
- master
- Children:
- f7f997a
- Parents:
- 0f6d2884
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Concurrency/Waituntil.cpp
r0f6d2884 r16e0dcb 492 492 // the predicate expr used inside the predicate functions 493 493 Expr * genPredExpr( const CodeLocation & loc, WaitUntilStmt::ClauseNode * currNode, int & idx, GenLeafExpr genLeaf ) { 494 Expr * leftExpr, * rightExpr; 494 495 switch (currNode->op) { 495 496 case WaitUntilStmt::ClauseNode::AND: 497 leftExpr = genPredExpr( loc, currNode->left, idx, genLeaf ); 498 rightExpr = genPredExpr( loc, currNode->right, idx, genLeaf ); 496 499 return new LogicalExpr( loc, 497 new CastExpr( loc, genPredExpr( loc, currNode->left, idx, genLeaf ), new BasicType( BasicType::Kind::Bool ), GeneratedFlag::ExplicitCast ),498 new CastExpr( loc, genPredExpr( loc, currNode->right, idx, genLeaf ), new BasicType( BasicType::Kind::Bool ), GeneratedFlag::ExplicitCast ),500 new CastExpr( loc, leftExpr, new BasicType( BasicType::Kind::Bool ), GeneratedFlag::ExplicitCast ), 501 new CastExpr( loc, rightExpr, new BasicType( BasicType::Kind::Bool ), GeneratedFlag::ExplicitCast ), 499 502 LogicalFlag::AndExpr 500 503 ); 504 break; 501 505 case WaitUntilStmt::ClauseNode::OR: 506 leftExpr = genPredExpr( loc, currNode->left, idx, genLeaf ); 507 rightExpr = genPredExpr( loc, currNode->right, idx, genLeaf ); 502 508 return new LogicalExpr( loc, 503 new CastExpr( loc, genPredExpr( loc, currNode->left, idx, genLeaf ), new BasicType( BasicType::Kind::Bool ), GeneratedFlag::ExplicitCast ),504 new CastExpr( loc, genPredExpr( loc, currNode->right, idx, genLeaf ), new BasicType( BasicType::Kind::Bool ), GeneratedFlag::ExplicitCast ),509 new CastExpr( loc, leftExpr, new BasicType( BasicType::Kind::Bool ), GeneratedFlag::ExplicitCast ), 510 new CastExpr( loc, rightExpr, new BasicType( BasicType::Kind::Bool ), GeneratedFlag::ExplicitCast ), 505 511 LogicalFlag::OrExpr ); 512 break; 506 513 case WaitUntilStmt::ClauseNode::LEAF: 507 514 return genLeaf( loc, idx ); 515 break; 508 516 default: 509 assertf(false, "Unreachable waituntil clause node type. How did you get here???"); 510 } 517 assertf(false, "Unreachable waituntil clause node type. How did you get here???");\ 518 return nullptr; 519 break; 520 } 521 return nullptr; 511 522 } 512 523
Note: See TracChangeset
for help on using the changeset viewer.