Changeset b09ca2b for src/Concurrency/Waituntil.cpp
- Timestamp:
- May 25, 2023, 12:18:53 PM (15 months ago)
- Branches:
- ast-experimental, master
- Children:
- a01faa98
- Parents:
- 382467f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Concurrency/Waituntil.cpp
r382467f rb09ca2b 938 938 } 939 939 940 // C_TODO: will remove this commented code later. Currently it isn't needed but may switch to a modified version of this later if it has better performance941 // std::vector<ptr<CaseClause>> switchCases;942 943 // int idx = 0;944 // for ( const auto & clause: stmt->clauses ) {945 // const CodeLocation & cLoc = clause->location;946 // switchCases.push_back(947 // new CaseClause( cLoc,948 // new CastExpr( cLoc,949 // new AddressExpr( cLoc, new NameExpr( cLoc, data.at(idx)->targetName ) ),950 // new BasicType( BasicType::Kind::LongUnsignedInt ), GeneratedFlag::ExplicitCast951 // ),952 // {953 // new CompoundStmt( cLoc,954 // {955 // ast::deepCopy( clause->stmt ),956 // new BranchStmt( cLoc, BranchStmt::Kind::Break, Label( cLoc ) )957 // }958 // )959 // }960 // )961 // );962 // idx++;963 // }964 965 940 return new CompoundStmt( loc, 966 941 { 967 942 new ExprStmt( loc, new UntypedExpr( loc, new NameExpr( loc, "park" ) ) ), 968 943 outerIf 969 // new SwitchStmt( loc,970 // new NameExpr( loc, statusName ),971 // std::move( switchCases )972 // )973 944 } 974 945 ); … … 1013 984 const CodeLocation & cLoc = stmt->clauses.at(idx)->location; 1014 985 986 Expr * baseCond = genSelectTraitCall( stmt->clauses.at(idx), data.at(idx), "register_select" ); 1015 987 Expr * ifCond; 1016 988 … … 1023 995 ), 1024 996 new CastExpr( cLoc, 1025 genSelectTraitCall( stmt->clauses.at(idx), data.at(idx), "register_select" ),997 baseCond, 1026 998 new BasicType( BasicType::Kind::Bool ), GeneratedFlag::ExplicitCast 1027 999 ), 1028 1000 LogicalFlag::AndExpr 1029 1001 ); 1030 } else ifCond = genSelectTraitCall( stmt->clauses.at(idx), data.at(idx), "register_select" );1002 } else ifCond = baseCond; 1031 1003 1032 1004 return new CompoundStmt( cLoc,
Note: See TracChangeset
for help on using the changeset viewer.