Ignore:
Timestamp:
Nov 30, 2017, 4:43:59 PM (7 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
c50d54d
Parents:
4429b04
Message:

Remove label lists from various Statement constructors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Concurrency/Waitfor.cc

    r4429b04 rba3706f  
    100100
    101101namespace 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 
    110102        //=============================================================================================
    111103        // Pass declarations
     
    203195                        ResolvExpr::findVoidExpression( expr, indexer );
    204196
    205                         return new ExprStmt( noLabels, expr );
     197                        return new ExprStmt( expr );
    206198                }
    207199
     
    259251                if( !decl_monitor || !decl_acceptable || !decl_mask ) throw SemanticError( "waitfor keyword requires monitors to be in scope, add #include <monitor>", waitfor );
    260252
    261                 CompoundStmt * stmt = new CompoundStmt( noLabels );
     253                CompoundStmt * stmt = new CompoundStmt();
    262254
    263255                ObjectDecl * acceptables = declare( waitfor->clauses.size(), stmt );
     
    281273                );
    282274
    283                 CompoundStmt * compound = new CompoundStmt( noLabels );
     275                CompoundStmt * compound = new CompoundStmt();
    284276                stmt->push_back( new IfStmt(
    285                         noLabels,
    286277                        safeCond( new VariableExpr( flag ) ),
    287278                        compound,
     
    313304                );
    314305
    315                 stmt->push_back( new DeclStmt( noLabels, acceptables) );
     306                stmt->push_back( new DeclStmt( acceptables) );
    316307
    317308                Expression * set = new UntypedExpr(
     
    326317                ResolvExpr::findVoidExpression( set, indexer );
    327318
    328                 stmt->push_back( new ExprStmt( noLabels, set ) );
     319                stmt->push_back( new ExprStmt( set ) );
    329320
    330321                return acceptables;
     
    341332                );
    342333
    343                 stmt->push_back( new DeclStmt( noLabels, flag) );
     334                stmt->push_back( new DeclStmt( flag) );
    344335
    345336                return flag;
     
    357348                ResolvExpr::findVoidExpression( expr, indexer );
    358349
    359                 return new ExprStmt( noLabels, expr );
     350                return new ExprStmt( expr );
    360351        }
    361352
     
    399390                );
    400391
    401                 stmt->push_back( new DeclStmt( noLabels, mon) );
     392                stmt->push_back( new DeclStmt( mon) );
    402393
    403394                return mon;
     
    411402
    412403                stmt->push_back( new IfStmt(
    413                         noLabels,
    414404                        safeCond( clause.condition ),
    415405                        new CompoundStmt({
     
    447437                );
    448438
    449                 stmt->push_back( new DeclStmt( noLabels, timeout ) );
     439                stmt->push_back( new DeclStmt( timeout ) );
    450440
    451441                if( time ) {
    452442                        stmt->push_back( new IfStmt(
    453                                 noLabels,
    454443                                safeCond( time_cond ),
    455444                                new CompoundStmt({
    456445                                        new ExprStmt(
    457                                                 noLabels,
    458446                                                makeOpAssign(
    459447                                                        new VariableExpr( timeout ),
     
    471459                if( has_else ) {
    472460                        stmt->push_back( new IfStmt(
    473                                 noLabels,
    474461                                safeCond( else_cond ),
    475462                                new CompoundStmt({
    476463                                        new ExprStmt(
    477                                                 noLabels,
    478464                                                makeOpAssign(
    479465                                                        new VariableExpr( timeout ),
     
    511497                );
    512498
    513                 stmt->push_back( new DeclStmt( noLabels, index ) );
     499                stmt->push_back( new DeclStmt( index ) );
    514500
    515501                ObjectDecl * mask = ObjectDecl::newObject(
     
    526512                );
    527513
    528                 stmt->push_back( new DeclStmt( noLabels, mask ) );
     514                stmt->push_back( new DeclStmt( mask ) );
    529515
    530516                stmt->push_back( new ExprStmt(
    531                         noLabels,
    532517                        new ApplicationExpr(
    533518                                VariableExpr::functionPointer( decl_waitfor ),
     
    557542        ) {
    558543                SwitchStmt * swtch = new SwitchStmt(
    559                         noLabels,
    560544                        result,
    561545                        std::list<Statement *>()
     
    566550                        swtch->statements.push_back(
    567551                                new CaseStmt(
    568                                         noLabels,
    569552                                        new ConstantExpr( Constant::from_ulong( i++ ) ),
    570553                                        {
    571554                                                clause.statement,
    572555                                                new BranchStmt(
    573                                                         noLabels,
    574556                                                        "",
    575557                                                        BranchStmt::Break
     
    583565                        swtch->statements.push_back(
    584566                                new CaseStmt(
    585                                         noLabels,
    586567                                        new ConstantExpr( Constant::from_int( -2 ) ),
    587568                                        {
    588569                                                waitfor->timeout.statement,
    589570                                                new BranchStmt(
    590                                                         noLabels,
    591571                                                        "",
    592572                                                        BranchStmt::Break
     
    600580                        swtch->statements.push_back(
    601581                                new CaseStmt(
    602                                         noLabels,
    603582                                        new ConstantExpr( Constant::from_int( -1 ) ),
    604583                                        {
    605584                                                waitfor->orelse.statement,
    606585                                                new BranchStmt(
    607                                                         noLabels,
    608586                                                        "",
    609587                                                        BranchStmt::Break
Note: See TracChangeset for help on using the changeset viewer.