Ignore:
Timestamp:
May 30, 2023, 5:35:57 PM (3 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ast-experimental, master
Children:
dd3baf4
Parents:
44198fb9 (diff), 8913de4 (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.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Concurrency/Waituntil.cpp

    r44198fb9 r2cb8bf71  
    940940        }
    941941
    942     // 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 performance
    943     // std::vector<ptr<CaseClause>> switchCases;
    944 
    945     // int idx = 0;
    946     // for ( const auto & clause: stmt->clauses ) {
    947     //     const CodeLocation & cLoc = clause->location;
    948     //     switchCases.push_back(
    949     //         new CaseClause( cLoc,
    950     //             new CastExpr( cLoc,
    951     //                 new AddressExpr( cLoc, new NameExpr( cLoc, data.at(idx)->targetName ) ),
    952     //                 new BasicType( BasicType::Kind::LongUnsignedInt ), GeneratedFlag::ExplicitCast
    953     //             ),
    954     //             {
    955     //                 new CompoundStmt( cLoc,
    956     //                     {
    957     //                         ast::deepCopy( clause->stmt ),
    958     //                         new BranchStmt( cLoc, BranchStmt::Kind::Break, Label( cLoc ) )
    959     //                     }
    960     //                 )
    961     //             }
    962     //         )
    963     //     );
    964     //     idx++;
    965     // }
    966 
    967942    return new CompoundStmt( loc,
    968943        {
    969944            new ExprStmt( loc, new UntypedExpr( loc, new NameExpr( loc, "park" ) ) ),
    970945            outerIf
    971             // new SwitchStmt( loc,
    972             //     new NameExpr( loc, statusName ),
    973             //     std::move( switchCases )
    974             // )
    975946        }
    976947    );
     
    1015986    const CodeLocation & cLoc = stmt->clauses.at(idx)->location;
    1016987
     988    Expr * baseCond = genSelectTraitCall( stmt->clauses.at(idx), data.at(idx), "register_select" );
    1017989    Expr * ifCond;
    1018990
     
    1025997            ),
    1026998            new CastExpr( cLoc,
    1027                 genSelectTraitCall( stmt->clauses.at(idx), data.at(idx), "register_select" ),
     999                baseCond,
    10281000                new BasicType( BasicType::Kind::Bool ), GeneratedFlag::ExplicitCast
    10291001            ),
    10301002            LogicalFlag::AndExpr
    10311003        );
    1032     } else ifCond = genSelectTraitCall( stmt->clauses.at(idx), data.at(idx), "register_select" );
     1004    } else ifCond = baseCond;
    10331005
    10341006    return new CompoundStmt( cLoc,
Note: See TracChangeset for help on using the changeset viewer.