Ignore:
Timestamp:
Sep 13, 2017, 2:13:59 PM (6 years ago)
Author:
Thierry Delisle <tdelisle@…>
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:
9f5ecf5
Parents:
aa72198
Message:

Clean pass visitor and enabled indexer features

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Common/PassVisitor.impl.h

    raa72198 r9dcb653  
    807807
    808808        maybeAccept( node->block       , *this );
    809         maybeAccept  ( node->handlers    , *this );
     809        maybeAccept( node->handlers    , *this );
    810810        maybeAccept( node->finallyBlock, *this );
    811811
     
    818818
    819819        maybeMutateRef( node->block       , *this );
    820         maybeMutateRef     ( node->handlers    , *this );
     820        maybeMutateRef( node->handlers    , *this );
    821821        maybeMutateRef( node->finallyBlock, *this );
    822822
     
    918918        indexerScopedAccept( node->result  , *this );
    919919        maybeAccept        ( node->function, *this );
    920         maybeAccept          ( node->args    , *this );
     920        maybeAccept        ( node->args    , *this );
    921921
    922922        VISIT_END( node );
     
    930930        indexerScopedMutate( node->result  , *this );
    931931        maybeMutateRef     ( node->function, *this );
    932         maybeMutateRef          ( node->args    , *this );
     932        maybeMutateRef     ( node->args    , *this );
    933933
    934934        MUTATE_END( Expression, node );
     
    14671467        indexerScopedAccept( node->result     , *this );
    14681468        maybeAccept        ( node->callExpr   , *this );
    1469         maybeAccept          ( node->tempDecls  , *this );
    1470         maybeAccept          ( node->returnDecls, *this );
    1471         maybeAccept          ( node->dtors      , *this );
     1469        maybeAccept        ( node->tempDecls  , *this );
     1470        maybeAccept        ( node->returnDecls, *this );
     1471        maybeAccept        ( node->dtors      , *this );
    14721472
    14731473        VISIT_END( node );
     
    14811481        indexerScopedMutate( node->result     , *this );
    14821482        maybeMutateRef     ( node->callExpr   , *this );
    1483         maybeMutateRef          ( node->tempDecls  , *this );
    1484         maybeMutateRef          ( node->returnDecls, *this );
    1485         maybeMutateRef          ( node->dtors      , *this );
     1483        maybeMutateRef     ( node->tempDecls  , *this );
     1484        maybeMutateRef     ( node->returnDecls, *this );
     1485        maybeMutateRef     ( node->dtors      , *this );
    14861486
    14871487        MUTATE_END( Expression, node );
     
    15661566
    15671567        indexerScopedAccept( node->result, *this );
     1568        maybeAccept        ( node->exprs , *this );
     1569
     1570        VISIT_END( node );
     1571}
     1572
     1573template< typename pass_type >
     1574Expression * PassVisitor< pass_type >::mutate( UntypedTupleExpr * node ) {
     1575        MUTATE_START( node );
     1576
     1577        indexerScopedMutate( node->env   , *this );
     1578        indexerScopedMutate( node->result, *this );
     1579        maybeMutateRef     ( node->exprs , *this );
     1580
     1581        MUTATE_END( Expression, node );
     1582}
     1583
     1584//--------------------------------------------------------------------------
     1585// TupleExpr
     1586template< typename pass_type >
     1587void PassVisitor< pass_type >::visit( TupleExpr * node ) {
     1588        VISIT_START( node );
     1589
     1590        indexerScopedAccept( node->result, *this );
    15681591        maybeAccept          ( node->exprs , *this );
    15691592
     
    15721595
    15731596template< typename pass_type >
    1574 Expression * PassVisitor< pass_type >::mutate( UntypedTupleExpr * node ) {
    1575         MUTATE_START( node );
    1576 
    1577         indexerScopedMutate( node->env   , *this );
    1578         indexerScopedMutate( node->result, *this );
    1579         maybeMutateRef          ( node->exprs , *this );
    1580 
    1581         MUTATE_END( Expression, node );
    1582 }
    1583 
    1584 //--------------------------------------------------------------------------
    1585 // TupleExpr
    1586 template< typename pass_type >
    1587 void PassVisitor< pass_type >::visit( TupleExpr * node ) {
    1588         VISIT_START( node );
    1589 
    1590         indexerScopedAccept( node->result, *this );
    1591         maybeAccept          ( node->exprs , *this );
    1592 
    1593         VISIT_END( node );
    1594 }
    1595 
    1596 template< typename pass_type >
    15971597Expression * PassVisitor< pass_type >::mutate( TupleExpr * node ) {
    15981598        MUTATE_START( node );
     
    16001600        indexerScopedMutate( node->env   , *this );
    16011601        indexerScopedMutate( node->result, *this );
    1602         maybeMutateRef          ( node->exprs , *this );
     1602        maybeMutateRef     ( node->exprs , *this );
    16031603
    16041604        MUTATE_END( Expression, node );
     
    16641664        indexerScopedAccept( node->result     , *this );
    16651665        maybeAccept        ( node->statements , *this );
    1666         maybeAccept          ( node->returnDecls, *this );
    1667         maybeAccept          ( node->dtors      , *this );
     1666        maybeAccept        ( node->returnDecls, *this );
     1667        maybeAccept        ( node->dtors      , *this );
    16681668
    16691669        VISIT_END( node );
     
    16811681        indexerScopedMutate( node->result     , *this );
    16821682        maybeMutateRef     ( node->statements , *this );
    1683         maybeMutateRef          ( node->returnDecls, *this );
    1684         maybeMutateRef          ( node->dtors      , *this );
     1683        maybeMutateRef     ( node->returnDecls, *this );
     1684        maybeMutateRef     ( node->dtors      , *this );
    16851685
    16861686        MUTATE_END( Expression, node );
Note: See TracChangeset for help on using the changeset viewer.