Changeset 4670c79 for src/Common


Ignore:
Timestamp:
Jan 31, 2018, 4:50:37 PM (6 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:
c28a038d
Parents:
574894d
Message:

Change Indexer::addWith to take a list of expressions instead of a WithStmt?

Location:
src/Common
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/Common/PassVisitor.h

    r574894d r4670c79  
    291291        bool_ref * get_visit_children_ptr() { return visit_children_impl(pass, 0); }
    292292
    293         void indexerScopeEnter  ()                             { indexer_impl_enterScope  ( pass, 0       ); }
    294         void indexerScopeLeave  ()                             { indexer_impl_leaveScope  ( pass, 0       ); }
    295         void indexerAddId       ( DeclarationWithType * node ) { indexer_impl_addId       ( pass, 0, node ); }
    296         void indexerAddType     ( NamedTypeDecl       * node ) { indexer_impl_addType     ( pass, 0, node ); }
    297         void indexerAddStruct   ( const std::string   & id   ) { indexer_impl_addStruct   ( pass, 0, id   ); }
    298         void indexerAddStruct   ( StructDecl          * node ) { indexer_impl_addStruct   ( pass, 0, node ); }
    299         void indexerAddStructFwd( StructDecl          * node ) { indexer_impl_addStructFwd( pass, 0, node ); }
    300         void indexerAddEnum     ( EnumDecl            * node ) { indexer_impl_addEnum     ( pass, 0, node ); }
    301         void indexerAddUnion    ( const std::string   & id   ) { indexer_impl_addUnion    ( pass, 0, id   ); }
    302         void indexerAddUnion    ( UnionDecl           * node ) { indexer_impl_addUnion    ( pass, 0, node ); }
    303         void indexerAddUnionFwd ( UnionDecl           * node ) { indexer_impl_addUnionFwd ( pass, 0, node ); }
    304         void indexerAddTrait    ( TraitDecl           * node ) { indexer_impl_addTrait    ( pass, 0, node ); }
    305         void indexerAddWith     ( WithStmt            * node ) { indexer_impl_addWith    ( pass, 0, node ); }
     293        void indexerScopeEnter  ()                                    { indexer_impl_enterScope  ( pass, 0       ); }
     294        void indexerScopeLeave  ()                                    { indexer_impl_leaveScope  ( pass, 0       ); }
     295        void indexerAddId       ( DeclarationWithType       * node ) { indexer_impl_addId       ( pass, 0, node ); }
     296        void indexerAddType     ( NamedTypeDecl             * node ) { indexer_impl_addType     ( pass, 0, node ); }
     297        void indexerAddStruct   ( const std::string         & id    ) { indexer_impl_addStruct   ( pass, 0, id   ); }
     298        void indexerAddStruct   ( StructDecl                * node ) { indexer_impl_addStruct   ( pass, 0, node ); }
     299        void indexerAddStructFwd( StructDecl                * node ) { indexer_impl_addStructFwd( pass, 0, node ); }
     300        void indexerAddEnum     ( EnumDecl                  * node ) { indexer_impl_addEnum     ( pass, 0, node ); }
     301        void indexerAddUnion    ( const std::string         & id    ) { indexer_impl_addUnion    ( pass, 0, id   ); }
     302        void indexerAddUnion    ( UnionDecl                 * node ) { indexer_impl_addUnion    ( pass, 0, node ); }
     303        void indexerAddUnionFwd ( UnionDecl                 * node ) { indexer_impl_addUnionFwd ( pass, 0, node ); }
     304        void indexerAddTrait    ( TraitDecl                 * node ) { indexer_impl_addTrait    ( pass, 0, node ); }
     305        void indexerAddWith     ( std::list< Expression * > & exprs ) { indexer_impl_addWith     ( pass, 0, exprs ); }
    306306
    307307
  • src/Common/PassVisitor.impl.h

    r574894d r4670c79  
    994994                // catch statements introduce a level of scope (for the caught exception)
    995995                auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } );
    996                 indexerAddWith( node );
     996                indexerAddWith( node->exprs );
    997997                maybeAccept_impl( node->stmt, *this );
    998998        }
     
    10071007                // catch statements introduce a level of scope (for the caught exception)
    10081008                auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } );
    1009                 indexerAddWith( node );
     1009                indexerAddWith( node->exprs );
    10101010                maybeMutate_impl( node->stmt, *this );
    10111011        }
  • src/Common/PassVisitor.proto.h

    r574894d r4670c79  
    202202static inline void indexer_impl_##func ( pass_type &, long, type ) { }                                                          \
    203203
    204 INDEXER_FUNC( addId     , DeclarationWithType * );
    205 INDEXER_FUNC( addType   , NamedTypeDecl *       );
    206 INDEXER_FUNC( addStruct , StructDecl *          );
    207 INDEXER_FUNC( addEnum   , EnumDecl *            );
    208 INDEXER_FUNC( addUnion  , UnionDecl *           );
    209 INDEXER_FUNC( addTrait  , TraitDecl *           );
    210 INDEXER_FUNC( addWith   , WithStmt *            );
     204INDEXER_FUNC( addId     , DeclarationWithType *       );
     205INDEXER_FUNC( addType   , NamedTypeDecl *             );
     206INDEXER_FUNC( addStruct , StructDecl *                );
     207INDEXER_FUNC( addEnum   , EnumDecl *                  );
     208INDEXER_FUNC( addUnion  , UnionDecl *                 );
     209INDEXER_FUNC( addTrait  , TraitDecl *                 );
     210INDEXER_FUNC( addWith   , std::list< Expression * > & );
    211211
    212212
Note: See TracChangeset for help on using the changeset viewer.