Changeset 65197c2 for src/Common


Ignore:
Timestamp:
Dec 5, 2017, 2:17:17 PM (8 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, stuck-waitfor-destruct, with_gc
Children:
971d9f2, a85e44c, c13e8dc8
Parents:
12d2dc8 (diff), 866f560 (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/Common
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/Common/PassVisitor.h

    r12d2dc8 r65197c2  
    8181        virtual void visit( FinallyStmt * finallyStmt ) override final;
    8282        virtual void visit( WaitForStmt * waitforStmt ) override final;
     83        virtual void visit( WithStmt * withStmt ) override final;
    8384        virtual void visit( NullStmt * nullStmt ) override final;
    8485        virtual void visit( DeclStmt * declStmt ) override final;
     
    172173        virtual Statement * mutate( FinallyStmt * finallyStmt ) override final;
    173174        virtual Statement * mutate( WaitForStmt * waitforStmt ) override final;
     175        virtual Statement * mutate( WithStmt * withStmt ) override final;
    174176        virtual NullStmt * mutate( NullStmt * nullStmt ) override final;
    175177        virtual Statement * mutate( DeclStmt * declStmt ) override final;
     
    296298        void indexerAddUnionFwd ( UnionDecl           * node ) { indexer_impl_addUnionFwd ( pass, 0, node ); }
    297299        void indexerAddTrait    ( TraitDecl           * node ) { indexer_impl_addTrait    ( pass, 0, node ); }
     300        void indexerAddWith     ( WithStmt            * node ) { indexer_impl_addWith    ( pass, 0, node ); }
     301
    298302
    299303        template< typename TreeType, typename VisitorType >
  • src/Common/PassVisitor.impl.h

    r12d2dc8 r65197c2  
    985985}
    986986
     987
     988
     989//--------------------------------------------------------------------------
     990// NullStmt
     991template< typename pass_type >
     992void PassVisitor< pass_type >::visit( WithStmt * node ) {
     993        VISIT_START( node );
     994        maybeAccept_impl( node->exprs, *this );
     995        {
     996                // catch statements introduce a level of scope (for the caught exception)
     997                auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } );
     998                indexerAddWith( node );
     999                maybeAccept_impl( node->stmt, *this );
     1000        }
     1001        VISIT_END( node );
     1002}
     1003
     1004template< typename pass_type >
     1005Statement * PassVisitor< pass_type >::mutate( WithStmt * node ) {
     1006        MUTATE_START( node );
     1007        maybeMutate_impl( node->exprs, *this );
     1008        {
     1009                // catch statements introduce a level of scope (for the caught exception)
     1010                auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } );
     1011                indexerAddWith( node );
     1012                maybeMutate_impl( node->stmt, *this );
     1013        }
     1014        MUTATE_END( Statement, node );
     1015}
     1016
    9871017//--------------------------------------------------------------------------
    9881018// NullStmt
  • src/Common/PassVisitor.proto.h

    r12d2dc8 r65197c2  
    208208INDEXER_FUNC( addUnion  , UnionDecl *           );
    209209INDEXER_FUNC( addTrait  , TraitDecl *           );
     210INDEXER_FUNC( addWith   , WithStmt *            );
    210211
    211212
Note: See TracChangeset for help on using the changeset viewer.