Changeset 9cb2742


Ignore:
Timestamp:
Jul 17, 2023, 1:47:25 PM (16 months ago)
Author:
caparsons <caparson@…>
Branches:
master
Children:
f3c02ea
Parents:
c2c1717
Message:

refactored some waituntil code gen to be more concise

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Concurrency/Waituntil.cpp

    rc2c1717 r9cb2742  
    625625CompoundStmt * GenerateWaitUntilCore::genStmtBlock( const WhenClause * clause, const ClauseData * data ) {
    626626    const CodeLocation & cLoc = clause->location;
     627    // return new CompoundStmt( cLoc, // OLD
     628    //     {
     629    //         new ExprStmt( cLoc,
     630    //             genSelectTraitCall( clause, data, "on_selected" )
     631    //         ),
     632    //         ast::deepCopy( clause->stmt )
     633    //     }
     634    // );
    627635    return new CompoundStmt( cLoc,
    628636        {
    629             new ExprStmt( cLoc,
    630                 genSelectTraitCall( clause, data, "on_selected" )
    631             ),
    632             ast::deepCopy( clause->stmt )
     637            new IfStmt( cLoc,
     638                genSelectTraitCall( clause, data, "on_selected" ),
     639                ast::deepCopy( clause->stmt )
     640            )
    633641        }
    634642    );
     
    819827    );
    820828}
    821 
     829// C_TODO remove unused param if change kept
    822830Stmt * GenerateWaitUntilCore::genNoElseClauseBranch( const WaitUntilStmt * stmt, string & satName, string & runName, string & arrName, string & pCountName, vector<ClauseData *> & clauseData ) {
    823831    CompoundStmt * whileBody = new CompoundStmt( stmt->location );
     
    834842    );
    835843
    836     whileBody->push_back( genStatusCheckFor( stmt, clauseData, satName ) );
     844    whileBody->push_back( genStatusCheckFor( stmt, clauseData, runName ) );
     845    // whileBody->push_back( genStatusCheckFor( stmt, clauseData, satName ) ); // OLD
    837846
    838847    return new CompoundStmt( loc,
    839848        {
    840849            new WhileDoStmt( loc,
    841                 genNotSatExpr( stmt, satName, arrName ),
     850                genNotSatExpr( stmt, runName, arrName ),
     851                // genNotSatExpr( stmt, satName, arrName ), // OLD
    842852                whileBody,  // body
    843853                {}          // no inits
    844             ),
    845             genStatusCheckFor( stmt, clauseData, runName )
     854            )
     855            // , // OLD
     856            // genStatusCheckFor( stmt, clauseData, runName ) // OLD
    846857        }
    847858    );
Note: See TracChangeset for help on using the changeset viewer.