Changeset 37eef7a


Ignore:
Timestamp:
May 22, 2019, 1:36:01 PM (5 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
d8938622, dd6d7c6
Parents:
4073b16 (diff), 0f740d6 (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

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • doc/proposals/vtable.md

    r4073b16 r37eef7a  
    220220    trait iterator(otype T, otype Item) {
    221221        bool has_next(T const &);
    222         Item get_next(T const *);
     222        Item get_next(T &);
    223223    }
    224224
  • src/AST/Convert.cpp

    r4073b16 r37eef7a  
    12871287
    12881288        const ast::Designation * visit( const ast::Designation * node ) override final {
    1289                 (void)node;
     1289                auto designation = new Designation( get<Expression>().acceptL( node->designators ) );
     1290                designation->location = node->location;
     1291                this->node = designation;
    12901292                return nullptr;
    12911293        }
    12921294
    12931295        const ast::Init * visit( const ast::SingleInit * node ) override final {
    1294                 (void)node;
     1296                auto init = new SingleInit(
     1297                        get<Expression>().accept1( node->value ),
     1298                        ast::MaybeConstruct == node->maybeConstructed
     1299                );
     1300                init->location = node->location;
     1301                this->node = init;
    12951302                return nullptr;
    12961303        }
    12971304
    12981305        const ast::Init * visit( const ast::ListInit * node ) override final {
    1299                 (void)node;
     1306                auto init = new ListInit(
     1307                        get<Initializer>().acceptL( node->initializers ),
     1308                        get<Designation>().acceptL( node->designations ),
     1309                        ast::MaybeConstruct == node->maybeConstructed
     1310                );
     1311                init->location = node->location;
     1312                this->node = init;
    13001313                return nullptr;
    13011314        }
    13021315
    13031316        const ast::Init * visit( const ast::ConstructorInit * node ) override final {
    1304                 (void)node;
     1317                auto init = new ConstructorInit(
     1318                        get<Statement>().accept1( node->ctor ),
     1319                        get<Statement>().accept1( node->dtor ),
     1320                        get<Initializer>().accept1( node->init )
     1321                );
     1322                init->location = node->location;
     1323                this->node = init;
    13051324                return nullptr;
    13061325        }
     
    26172636        }
    26182637
    2619         virtual void visit( Designation * ) override final {
    2620 
    2621         }
    2622 
    2623         virtual void visit( SingleInit * ) override final {
    2624 
    2625         }
    2626 
    2627         virtual void visit( ListInit * ) override final {
    2628 
    2629         }
    2630 
    2631         virtual void visit( ConstructorInit * ) override final {
    2632 
     2638        virtual void visit( Designation * old ) override final {
     2639                this->node = new ast::Designation(
     2640                        old->location,
     2641                        GET_ACCEPT_V(designators, Expr)
     2642                );
     2643        }
     2644
     2645        virtual void visit( SingleInit * old ) override final {
     2646                this->node = new ast::SingleInit(
     2647                        old->location,
     2648                        GET_ACCEPT_1(value, Expr),
     2649                        (old->get_maybeConstructed()) ? ast::MaybeConstruct : ast::DoConstruct
     2650                );
     2651        }
     2652
     2653        virtual void visit( ListInit * old ) override final {
     2654                this->node = new ast::ListInit(
     2655                        old->location,
     2656                        GET_ACCEPT_V(initializers, Init),
     2657                        GET_ACCEPT_V(designations, Designation),
     2658                        (old->get_maybeConstructed()) ? ast::MaybeConstruct : ast::DoConstruct
     2659                );
     2660        }
     2661
     2662        virtual void visit( ConstructorInit * old ) override final {
     2663                this->node = new ast::ConstructorInit(
     2664                        old->location,
     2665                        GET_ACCEPT_1(ctor, Stmt),
     2666                        GET_ACCEPT_1(dtor, Stmt),
     2667                        GET_ACCEPT_1(init, Init)
     2668                );
    26332669        }
    26342670
  • src/AST/Stmt.hpp

    r4073b16 r37eef7a  
    9696};
    9797
     98/// Assembly statement `asm ... ( "..." : ... )`
    9899class AsmStmt final : public Stmt {
    99100public:
     
    118119};
    119120
     121/// C-preprocessor directive `#...`
    120122class DirectiveStmt final : public Stmt {
    121123public:
     
    132134};
    133135
     136/// If conditional statement `if (...) ... else ...`
    134137class IfStmt final : public Stmt {
    135138public:
     
    151154};
    152155
     156/// Switch or choose conditional statement `switch (...) { ... }`
    153157class SwitchStmt final : public Stmt {
    154158public:
     
    166170};
    167171
     172/// Case label `case ...:` `default:`
    168173class CaseStmt final : public Stmt {
    169174public:
     
    183188};
    184189
     190/// While loop `while (...) ...` `do ... while (...);
    185191class WhileStmt final : public Stmt {
    186192public:
     
    201207};
    202208
     209/// For loop `for (... ; ... ; ...) ...`
    203210class ForStmt final : public Stmt {
    204211public:
     
    219226};
    220227
     228/// Branch control flow statement `goto ...` `break` `continue` `fallthru`
    221229class BranchStmt final : public Stmt {
    222230public:
     
    246254};
    247255
     256/// Return statement `return ...`
    248257class ReturnStmt final : public Stmt {
    249258public:
     
    259268};
    260269
     270/// Throw statement `throw ...`
    261271class ThrowStmt final : public Stmt {
    262272public:
     
    277287};
    278288
     289/// Try statement `try { ... } ...`
    279290class TryStmt final : public Stmt {
    280291public:
     
    294305};
    295306
     307/// Catch clause of try statement
    296308class CatchStmt final : public Stmt {
    297309public:
     
    313325};
    314326
     327/// Finally clause of try statement
    315328class FinallyStmt final : public Stmt {
    316329public:
     
    327340};
    328341
     342/// Wait for concurrency statement `when (...) waitfor (... , ...) ... timeout(...) ... else ...`
    329343class WaitForStmt final : public Stmt {
    330344public:
     
    364378};
    365379
     380/// With statement `with (...) ...`
    366381class WithStmt final : public Stmt {
    367382public:
     
    379394};
    380395
     396/// Any declaration in a (compound) statement.
    381397class DeclStmt final : public Stmt {
    382398public:
     
    392408};
    393409
     410/// Represents an implicit application of a constructor or destructor.
    394411class ImplicitCtorDtorStmt final : public Stmt {
    395412public:
Note: See TracChangeset for help on using the changeset viewer.