Changeset 273ff10 for src


Ignore:
Timestamp:
Jan 16, 2019, 6:13:39 PM (5 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
Children:
ec7f50a
Parents:
def9d4e (diff), 3c54a71 (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

Location:
src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • src/Concurrency/Keywords.cc

    rdef9d4e r273ff10  
    575575
    576576                //in reverse order :
    577                 // monitor_guard_t __guard = { __monitors, #, func };
     577                // monitor_dtor_guard_t __guard = { __monitors, func };
    578578                body->push_front(
    579579                        new DeclStmt( new ObjectDecl(
     
    634634                assert(generic_func);
    635635
    636                 //in reverse order :
     636                // in reverse order :
    637637                // monitor_guard_t __guard = { __monitors, #, func };
    638638                body->push_front(
  • src/Concurrency/Waitfor.cc

    rdef9d4e r273ff10  
    6666void foo() {
    6767        while( true ) {
    68 
    69                 acceptable_t acceptables[3];
    70                 if( a < 1 ) {
    71                         acceptables[0].func = f;
    72                         acceptables[0].mon = a;
    73                 }
    74                 acceptables[1].func = g;
    75                 acceptables[1].mon = a;
    76 
    77                 acceptables[2].func = f;
    78                 acceptables[2].mon = a;
    79                 acceptables[2].is_dtor = true;
    80 
    81                 int ret = waitfor_internal( acceptables, swagl() );
    82 
    83                 switch( ret ) {
    84                         case 0:
    85                         {
    86                                 bar();
     68                {
     69                        acceptable_t acceptables[3];
     70                        if( a < 1 ) {
     71                                acceptables[0].func = f;
     72                                acceptables[0].mon = a;
    8773                        }
    88                         case 1:
    89                         {
    90                                 baz();
     74                        acceptables[1].func = g;
     75                        acceptables[1].mon = a;
     76
     77                        acceptables[2].func = f;
     78                        acceptables[2].mon = a;
     79                        acceptables[2].is_dtor = true;
     80
     81                        int ret = waitfor_internal( acceptables, swagl() );
     82
     83                        switch( ret ) {
     84                                case 0:
     85                                {
     86                                        bar();
     87                                }
     88                                case 1:
     89                                {
     90                                        baz();
     91                                }
     92                                case 2:
     93                                        signal(a);
     94                                        {
     95                                                break;
     96                                        }
    9197                        }
    92                         case 2:
    93                                 signal(a);
    94                                 {
    95                                         break;
    96                                 }
    9798                }
    9899        }
     
    555556                                        new ConstantExpr( Constant::from_ulong( i++ ) ),
    556557                                        {
    557                                                 clause.statement,
    558                                                 new BranchStmt(
    559                                                         "",
    560                                                         BranchStmt::Break
    561                                                 )
     558                                                new CompoundStmt({
     559                                                        clause.statement,
     560                                                        new BranchStmt(
     561                                                                "",
     562                                                                BranchStmt::Break
     563                                                        )
     564                                                })
    562565                                        }
    563566                                )
     
    570573                                        new ConstantExpr( Constant::from_int( -2 ) ),
    571574                                        {
    572                                                 waitfor->timeout.statement,
    573                                                 new BranchStmt(
    574                                                         "",
    575                                                         BranchStmt::Break
    576                                                 )
     575                                                new CompoundStmt({
     576                                                        waitfor->timeout.statement,
     577                                                        new BranchStmt(
     578                                                                "",
     579                                                                BranchStmt::Break
     580                                                        )
     581                                                })
    577582                                        }
    578583                                )
     
    585590                                        new ConstantExpr( Constant::from_int( -1 ) ),
    586591                                        {
    587                                                 waitfor->orelse.statement,
    588                                                 new BranchStmt(
    589                                                         "",
    590                                                         BranchStmt::Break
    591                                                 )
     592                                                new CompoundStmt({
     593                                                        waitfor->orelse.statement,
     594                                                        new BranchStmt(
     595                                                                "",
     596                                                                BranchStmt::Break
     597                                                        )
     598                                                })
    592599                                        }
    593600                                )
  • src/Parser/TypeData.cc

    rdef9d4e r273ff10  
    322322                        function.params->printList( os, indent + 4 );
    323323                } else {
    324                         os << string( indent + 2, ' ' ) << "with no parameters " << endl;
     324                        os << string( indent + 2, ' ' ) << "with no parameters" << endl;
    325325                } // if
    326326                if ( function.idList ) {
     
    347347                os << DeclarationNode::aggregateNames[ aggregate.kind ] << ' ' << *aggregate.name << endl;
    348348                if ( aggregate.params ) {
    349                         os << string( indent + 2, ' ' ) << "with type parameters " << endl;
     349                        os << string( indent + 2, ' ' ) << "with type parameters" << endl;
    350350                        aggregate.params->printList( os, indent + 4 );
    351351                } // if
    352352                if ( aggregate.actuals ) {
    353                         os << string( indent + 2, ' ' ) << "instantiated with actual parameters " << endl;
     353                        os << string( indent + 2, ' ' ) << "instantiated with actual parameters" << endl;
    354354                        aggregate.actuals->printList( os, indent + 4 );
    355355                } // if
    356356                if ( aggregate.fields ) {
    357                         os << string( indent + 2, ' ' ) << "with members " << endl;
     357                        os << string( indent + 2, ' ' ) << "with members" << endl;
    358358                        aggregate.fields->printList( os, indent + 4 );
    359359                } // if
    360360                if ( aggregate.body ) {
    361                         os << string( indent + 2, ' ' ) << " with body " << endl;
     361                        os << string( indent + 2, ' ' ) << " with body" << endl;
    362362                } // if
    363363                break;
     
    370370                } // if
    371371                if ( aggInst.params ) {
    372                         os << string( indent + 2, ' ' ) << "with parameters " << endl;
     372                        os << string( indent + 2, ' ' ) << "with parameters" << endl;
    373373                        aggInst.params->printList( os, indent + 2 );
    374374                } // if
     
    381381                } // if
    382382                if ( enumeration.body ) {
    383                         os << string( indent + 2, ' ' ) << " with body " << endl;
     383                        os << string( indent + 2, ' ' ) << " with body" << endl;
    384384                } // if
    385385                break;
     
    418418                os << "tuple ";
    419419                if ( tuple ) {
    420                         os << "with members " << endl;
     420                        os << "with members" << endl;
    421421                        tuple->printList( os, indent + 2 );
    422422                } // if
     
    942942        assert( td->typeexpr );
    943943        // assert( td->typeexpr->expr );
    944         return new TypeofType{ 
     944        return new TypeofType{
    945945                buildQualifiers( td ), td->typeexpr->build(), td->kind == TypeData::Basetypeof };
    946946} // buildTypeof
  • src/SynTree/Expression.cc

    rdef9d4e r273ff10  
    456456
    457457void UntypedExpr::print( std::ostream &os, Indenter indent ) const {
    458         os << "Applying untyped: " << std::endl;
     458        os << "Applying untyped:" << std::endl;
    459459        os << indent+1;
    460460        function->print(os, indent+1);
    461         os << std::endl << indent << "...to: " << std::endl;
     461        os << std::endl << indent << "...to:" << std::endl;
    462462        printAll(args, os, indent+1);
    463463        Expression::print( os, indent );
  • src/SynTree/ReferenceToType.cc

    rdef9d4e r273ff10  
    205205
    206206        Type::print( os, indent );
    207         os << "instance of " << typeString() << " " << get_name() << " (" << ( isFtype ? "" : "not" ) << " function type) ";
     207        os << "instance of " << typeString() << " " << get_name() << " (" << ( isFtype ? "" : "not" ) << " function type)";
    208208        if ( ! parameters.empty() ) {
    209209                os << endl << indent << "... with parameters" << endl;
  • src/SynTree/Type.cc

    rdef9d4e r273ff10  
    118118
    119119void QualifiedType::print( std::ostream & os, Indenter indent ) const {
    120         os << "Qualified Type: " << endl;
     120        os << "Qualified Type:" << endl;
    121121        os << indent+1;
    122122        parent->print( os, indent+1 );
Note: See TracChangeset for help on using the changeset viewer.