Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Pass.impl.hpp

    r7ff3e522 r37cdd97  
    2525        using namespace ast; \
    2626        /* back-up the visit children */ \
    27         __attribute__((unused)) ast::__pass::visit_children_guard guard1( ast::__pass::visit_children(core, 0) ); \
     27        __attribute__((unused)) ast::__pass::visit_children_guard guard1( ast::__pass::visit_children(pass, 0) ); \
    2828        /* setup the scope for passes that want to run code at exit */ \
    29         __attribute__((unused)) ast::__pass::guard_value          guard2( ast::__pass::at_cleanup    (core, 0) ); \
    30         /* begin tracing memory allocation if requested by this pass */ \
    31         __pass::beginTrace( core, 0 ); \
     29        __attribute__((unused)) ast::__pass::guard_value          guard2( ast::__pass::at_cleanup    (pass, 0) ); \
    3230        /* call the implementation of the previsit of this pass */ \
    33         __pass::previsit( core, node, 0 );
     31        __pass::previsit( pass, node, 0 );
    3432
    3533#define VISIT( code... ) \
     
    4240#define VISIT_END( type, node ) \
    4341        /* call the implementation of the postvisit of this pass */ \
    44         auto __return = __pass::postvisit( core, node, 0 ); \
     42        auto __return = __pass::postvisit( pass, node, 0 ); \
    4543        assertf(__return, "post visit should never return null"); \
    46         /* end tracing memory allocation if requested by this pass */ \
    47         __pass::endTrace( core, 0 ); \
    4844        return __return;
    4945
     
    123119        }
    124120
    125         template< typename core_t >
     121        template< typename pass_t >
    126122        template< typename node_t >
    127         auto ast::Pass< core_t >::call_accept( const node_t * node )
     123        auto ast::Pass< pass_t >::call_accept( const node_t * node )
    128124                -> typename std::enable_if<
    129125                                !std::is_base_of<ast::Expr, node_t>::value &&
     
    131127                        , decltype( node->accept(*this) )
    132128                >::type
     129
    133130        {
    134131                __pedantic_pass_assert( __visit_children() );
    135                 __pedantic_pass_assert( node );
     132                __pedantic_pass_assert( expr );
    136133
    137134                static_assert( !std::is_base_of<ast::Expr, node_t>::value, "ERROR");
     
    141138        }
    142139
    143         template< typename core_t >
    144         const ast::Expr * ast::Pass< core_t >::call_accept( const ast::Expr * expr ) {
     140        template< typename pass_t >
     141        const ast::Expr * ast::Pass< pass_t >::call_accept( const ast::Expr * expr ) {
    145142                __pedantic_pass_assert( __visit_children() );
    146143                __pedantic_pass_assert( expr );
    147144
    148                 const ast::TypeSubstitution ** env_ptr = __pass::env( core, 0);
     145                const ast::TypeSubstitution ** env_ptr = __pass::env( pass, 0);
    149146                if ( env_ptr && expr->env ) {
    150147                        *env_ptr = expr->env;
     
    154151        }
    155152
    156         template< typename core_t >
    157         const ast::Stmt * ast::Pass< core_t >::call_accept( const ast::Stmt * stmt ) {
     153        template< typename pass_t >
     154        const ast::Stmt * ast::Pass< pass_t >::call_accept( const ast::Stmt * stmt ) {
    158155                __pedantic_pass_assert( __visit_children() );
    159156                __pedantic_pass_assert( stmt );
     
    163160
    164161                // get the stmts/decls that will need to be spliced in
    165                 auto stmts_before = __pass::stmtsToAddBefore( core, 0);
    166                 auto stmts_after  = __pass::stmtsToAddAfter ( core, 0);
    167                 auto decls_before = __pass::declsToAddBefore( core, 0);
    168                 auto decls_after  = __pass::declsToAddAfter ( core, 0);
     162                auto stmts_before = __pass::stmtsToAddBefore( pass, 0);
     163                auto stmts_after  = __pass::stmtsToAddAfter ( pass, 0);
     164                auto decls_before = __pass::declsToAddBefore( pass, 0);
     165                auto decls_after  = __pass::declsToAddAfter ( pass, 0);
    169166
    170167                // These may be modified by subnode but most be restored once we exit this statemnet.
    171                 ValueGuardPtr< const ast::TypeSubstitution * > __old_env         ( __pass::env( core, 0) );
     168                ValueGuardPtr< const ast::TypeSubstitution * > __old_env         ( __pass::env( pass, 0) );
    172169                ValueGuardPtr< typename std::remove_pointer< decltype(stmts_before) >::type > __old_decls_before( stmts_before );
    173170                ValueGuardPtr< typename std::remove_pointer< decltype(stmts_after ) >::type > __old_decls_after ( stmts_after  );
     
    205202        }
    206203
    207         template< typename core_t >
     204        template< typename pass_t >
    208205        template< template <class...> class container_t >
    209         container_t< ptr<Stmt> > ast::Pass< core_t >::call_accept( const container_t< ptr<Stmt> > & statements ) {
     206        container_t< ptr<Stmt> > ast::Pass< pass_t >::call_accept( const container_t< ptr<Stmt> > & statements ) {
    210207                __pedantic_pass_assert( __visit_children() );
    211208                if( statements.empty() ) return {};
     
    218215
    219216                // get the stmts/decls that will need to be spliced in
    220                 auto stmts_before = __pass::stmtsToAddBefore( core, 0);
    221                 auto stmts_after  = __pass::stmtsToAddAfter ( core, 0);
    222                 auto decls_before = __pass::declsToAddBefore( core, 0);
    223                 auto decls_after  = __pass::declsToAddAfter ( core, 0);
     217                auto stmts_before = __pass::stmtsToAddBefore( pass, 0);
     218                auto stmts_after  = __pass::stmtsToAddAfter ( pass, 0);
     219                auto decls_before = __pass::declsToAddBefore( pass, 0);
     220                auto decls_after  = __pass::declsToAddAfter ( pass, 0);
    224221
    225222                // These may be modified by subnode but most be restored once we exit this statemnet.
     
    271268        }
    272269
    273         template< typename core_t >
     270        template< typename pass_t >
    274271        template< template <class...> class container_t, typename node_t >
    275         container_t< ast::ptr<node_t> > ast::Pass< core_t >::call_accept( const container_t< ast::ptr<node_t> > & container ) {
     272        container_t< ast::ptr<node_t> > ast::Pass< pass_t >::call_accept( const container_t< ast::ptr<node_t> > & container ) {
    276273                __pedantic_pass_assert( __visit_children() );
    277274                if( container.empty() ) return {};
     
    302299        }
    303300
    304         template< typename core_t >
     301        template< typename pass_t >
    305302        template<typename node_t, typename parent_t, typename child_t>
    306         void ast::Pass< core_t >::maybe_accept(
     303        void ast::Pass< pass_t >::maybe_accept(
    307304                const node_t * & parent,
    308305                child_t parent_t::*child
     
    326323        }
    327324
    328 
    329         template< typename core_t >
    330         template< typename node_t >
    331         void ast::Pass< core_t >::mutate_forall( const node_t *& node ) {
    332                 if ( auto subs = __pass::forall::subs( core, 0 ) ) {
    333                         // tracking TypeDecl substitution, full clone
    334                         if ( node->forall.empty() ) return;
    335 
    336                         node_t * mut = mutate( node );
    337                         mut->forall = subs->clone( node->forall, *this );
    338                         node = mut;
    339                 } else {
    340                         // not tracking TypeDecl substitution, just mutate
    341                         maybe_accept( node, &node_t::forall );
    342                 }
    343         }
    344325}
    345326
     
    352333//------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    353334
    354 template< typename core_t >
    355 inline void ast::accept_all( std::list< ast::ptr<ast::Decl> > & decls, ast::Pass< core_t > & visitor ) {
     335template< typename pass_t >
     336inline void ast::accept_all( std::list< ast::ptr<ast::Decl> > & decls, ast::Pass< pass_t > & visitor ) {
    356337        // We are going to aggregate errors for all these statements
    357338        SemanticErrorException errors;
     
    361342
    362343        // get the stmts/decls that will need to be spliced in
    363         auto decls_before = __pass::declsToAddBefore( visitor.core, 0);
    364         auto decls_after  = __pass::declsToAddAfter ( visitor.core, 0);
     344        auto decls_before = __pass::declsToAddBefore( visitor.pass, 0);
     345        auto decls_after  = __pass::declsToAddAfter ( visitor.pass, 0);
    365346
    366347        // update pass statitistics
     
    411392//--------------------------------------------------------------------------
    412393// ObjectDecl
    413 template< typename core_t >
    414 const ast::DeclWithType * ast::Pass< core_t >::visit( const ast::ObjectDecl * node ) {
     394template< typename pass_t >
     395const ast::DeclWithType * ast::Pass< pass_t >::visit( const ast::ObjectDecl * node ) {
    415396        VISIT_START( node );
    416397
     
    425406        )
    426407
    427         __pass::symtab::addId( core, 0, node );
     408        __pass::symtab::addId( pass, 0, node );
    428409
    429410        VISIT_END( DeclWithType, node );
     
    432413//--------------------------------------------------------------------------
    433414// FunctionDecl
    434 template< typename core_t >
    435 const ast::DeclWithType * ast::Pass< core_t >::visit( const ast::FunctionDecl * node ) {
    436         VISIT_START( node );
    437 
    438         __pass::symtab::addId( core, 0, node );
     415template< typename pass_t >
     416const ast::DeclWithType * ast::Pass< pass_t >::visit( const ast::FunctionDecl * node ) {
     417        VISIT_START( node );
     418
     419        __pass::symtab::addId( pass, 0, node );
    439420
    440421        VISIT(maybe_accept( node, &FunctionDecl::withExprs );)
     
    444425                // shadow with exprs and not the other way around.
    445426                guard_symtab guard { *this };
    446                 __pass::symtab::addWith( core, 0, node->withExprs, node );
     427                __pass::symtab::addWith( pass, 0, node->withExprs, node );
    447428                {
    448429                        guard_symtab guard { *this };
    449430                        // implicit add __func__ identifier as specified in the C manual 6.4.2.2
    450                         static ast::ptr< ast::ObjectDecl > func{ new ast::ObjectDecl{
    451                                 CodeLocation{}, "__func__",
    452                                 new ast::ArrayType{
    453                                         new ast::BasicType{ ast::BasicType::Char, ast::CV::Const },
     431                        static ast::ObjectDecl func(
     432                                node->location, "__func__",
     433                                new ast::ArrayType(
     434                                        new ast::BasicType( ast::BasicType::Char, ast::CV::Qualifiers( ast::CV::Const ) ),
    454435                                        nullptr, VariableLen, DynamicDim
    455                                 }
    456                         } };
    457                         __pass::symtab::addId( core, 0, func );
     436                                )
     437                        );
     438                        __pass::symtab::addId( pass, 0, &func );
    458439                        VISIT(
    459440                                maybe_accept( node, &FunctionDecl::type );
     
    473454//--------------------------------------------------------------------------
    474455// StructDecl
    475 template< typename core_t >
    476 const ast::Decl * ast::Pass< core_t >::visit( const ast::StructDecl * node ) {
     456template< typename pass_t >
     457const ast::Decl * ast::Pass< pass_t >::visit( const ast::StructDecl * node ) {
    477458        VISIT_START( node );
    478459
    479460        // make up a forward declaration and add it before processing the members
    480461        // needs to be on the heap because addStruct saves the pointer
    481         __pass::symtab::addStructFwd( core, 0, node );
     462        __pass::symtab::addStructFwd( pass, 0, node );
    482463
    483464        VISIT({
     
    488469
    489470        // this addition replaces the forward declaration
    490         __pass::symtab::addStruct( core, 0, node );
     471        __pass::symtab::addStruct( pass, 0, node );
    491472
    492473        VISIT_END( Decl, node );
     
    495476//--------------------------------------------------------------------------
    496477// UnionDecl
    497 template< typename core_t >
    498 const ast::Decl * ast::Pass< core_t >::visit( const ast::UnionDecl * node ) {
     478template< typename pass_t >
     479const ast::Decl * ast::Pass< pass_t >::visit( const ast::UnionDecl * node ) {
    499480        VISIT_START( node );
    500481
    501482        // make up a forward declaration and add it before processing the members
    502         __pass::symtab::addUnionFwd( core, 0, node );
     483        __pass::symtab::addUnionFwd( pass, 0, node );
    503484
    504485        VISIT({
     
    508489        })
    509490
    510         __pass::symtab::addUnion( core, 0, node );
     491        __pass::symtab::addUnion( pass, 0, node );
    511492
    512493        VISIT_END( Decl, node );
     
    515496//--------------------------------------------------------------------------
    516497// EnumDecl
    517 template< typename core_t >
    518 const ast::Decl * ast::Pass< core_t >::visit( const ast::EnumDecl * node ) {
    519         VISIT_START( node );
    520 
    521         __pass::symtab::addEnum( core, 0, node );
     498template< typename pass_t >
     499const ast::Decl * ast::Pass< pass_t >::visit( const ast::EnumDecl * node ) {
     500        VISIT_START( node );
     501
     502        __pass::symtab::addEnum( pass, 0, node );
    522503
    523504        VISIT(
     
    532513//--------------------------------------------------------------------------
    533514// TraitDecl
    534 template< typename core_t >
    535 const ast::Decl * ast::Pass< core_t >::visit( const ast::TraitDecl * node ) {
     515template< typename pass_t >
     516const ast::Decl * ast::Pass< pass_t >::visit( const ast::TraitDecl * node ) {
    536517        VISIT_START( node );
    537518
     
    542523        })
    543524
    544         __pass::symtab::addTrait( core, 0, node );
     525        __pass::symtab::addTrait( pass, 0, node );
    545526
    546527        VISIT_END( Decl, node );
     
    549530//--------------------------------------------------------------------------
    550531// TypeDecl
    551 template< typename core_t >
    552 const ast::Decl * ast::Pass< core_t >::visit( const ast::TypeDecl * node ) {
     532template< typename pass_t >
     533const ast::Decl * ast::Pass< pass_t >::visit( const ast::TypeDecl * node ) {
    553534        VISIT_START( node );
    554535
     
    562543        // note that assertions come after the type is added to the symtab, since they are not part of the type proper
    563544        // and may depend on the type itself
    564         __pass::symtab::addType( core, 0, node );
     545        __pass::symtab::addType( pass, 0, node );
    565546
    566547        VISIT(
     
    578559//--------------------------------------------------------------------------
    579560// TypedefDecl
    580 template< typename core_t >
    581 const ast::Decl * ast::Pass< core_t >::visit( const ast::TypedefDecl * node ) {
     561template< typename pass_t >
     562const ast::Decl * ast::Pass< pass_t >::visit( const ast::TypedefDecl * node ) {
    582563        VISIT_START( node );
    583564
     
    588569        })
    589570
    590         __pass::symtab::addType( core, 0, node );
     571        __pass::symtab::addType( pass, 0, node );
    591572
    592573        VISIT( maybe_accept( node, &TypedefDecl::assertions ); )
     
    597578//--------------------------------------------------------------------------
    598579// AsmDecl
    599 template< typename core_t >
    600 const ast::AsmDecl * ast::Pass< core_t >::visit( const ast::AsmDecl * node ) {
     580template< typename pass_t >
     581const ast::AsmDecl * ast::Pass< pass_t >::visit( const ast::AsmDecl * node ) {
    601582        VISIT_START( node );
    602583
     
    610591//--------------------------------------------------------------------------
    611592// StaticAssertDecl
    612 template< typename core_t >
    613 const ast::StaticAssertDecl * ast::Pass< core_t >::visit( const ast::StaticAssertDecl * node ) {
     593template< typename pass_t >
     594const ast::StaticAssertDecl * ast::Pass< pass_t >::visit( const ast::StaticAssertDecl * node ) {
    614595        VISIT_START( node );
    615596
     
    624605//--------------------------------------------------------------------------
    625606// CompoundStmt
    626 template< typename core_t >
    627 const ast::CompoundStmt * ast::Pass< core_t >::visit( const ast::CompoundStmt * node ) {
     607template< typename pass_t >
     608const ast::CompoundStmt * ast::Pass< pass_t >::visit( const ast::CompoundStmt * node ) {
    628609        VISIT_START( node );
    629610        VISIT({
    630611                // do not enter a new scope if inFunction is true - needs to check old state before the assignment
    631                 auto guard1 = makeFuncGuard( [this, inFunctionCpy = this->inFunction]() {
    632                         if ( ! inFunctionCpy ) __pass::symtab::enter(core, 0);
    633                 }, [this, inFunctionCpy = this->inFunction]() {
    634                         if ( ! inFunctionCpy ) __pass::symtab::leave(core, 0);
     612                auto guard1 = makeFuncGuard( [this, inFunction = this->inFunction]() {
     613                        if ( ! inFunction ) __pass::symtab::enter(pass, 0);
     614                }, [this, inFunction = this->inFunction]() {
     615                        if ( ! inFunction ) __pass::symtab::leave(pass, 0);
    635616                });
    636617                ValueGuard< bool > guard2( inFunction );
     
    644625//--------------------------------------------------------------------------
    645626// ExprStmt
    646 template< typename core_t >
    647 const ast::Stmt * ast::Pass< core_t >::visit( const ast::ExprStmt * node ) {
     627template< typename pass_t >
     628const ast::Stmt * ast::Pass< pass_t >::visit( const ast::ExprStmt * node ) {
    648629        VISIT_START( node );
    649630
     
    657638//--------------------------------------------------------------------------
    658639// AsmStmt
    659 template< typename core_t >
    660 const ast::Stmt * ast::Pass< core_t >::visit( const ast::AsmStmt * node ) {
     640template< typename pass_t >
     641const ast::Stmt * ast::Pass< pass_t >::visit( const ast::AsmStmt * node ) {
    661642        VISIT_START( node )
    662643
     
    673654//--------------------------------------------------------------------------
    674655// DirectiveStmt
    675 template< typename core_t >
    676 const ast::Stmt * ast::Pass< core_t >::visit( const ast::DirectiveStmt * node ) {
     656template< typename pass_t >
     657const ast::Stmt * ast::Pass< pass_t >::visit( const ast::DirectiveStmt * node ) {
    677658        VISIT_START( node )
    678659
     
    682663//--------------------------------------------------------------------------
    683664// IfStmt
    684 template< typename core_t >
    685 const ast::Stmt * ast::Pass< core_t >::visit( const ast::IfStmt * node ) {
     665template< typename pass_t >
     666const ast::Stmt * ast::Pass< pass_t >::visit( const ast::IfStmt * node ) {
    686667        VISIT_START( node );
    687668
     
    700681//--------------------------------------------------------------------------
    701682// WhileStmt
    702 template< typename core_t >
    703 const ast::Stmt * ast::Pass< core_t >::visit( const ast::WhileStmt * node ) {
     683template< typename pass_t >
     684const ast::Stmt * ast::Pass< pass_t >::visit( const ast::WhileStmt * node ) {
    704685        VISIT_START( node );
    705686
     
    717698//--------------------------------------------------------------------------
    718699// ForStmt
    719 template< typename core_t >
    720 const ast::Stmt * ast::Pass< core_t >::visit( const ast::ForStmt * node ) {
     700template< typename pass_t >
     701const ast::Stmt * ast::Pass< pass_t >::visit( const ast::ForStmt * node ) {
    721702        VISIT_START( node );
    722703
     
    735716//--------------------------------------------------------------------------
    736717// SwitchStmt
    737 template< typename core_t >
    738 const ast::Stmt * ast::Pass< core_t >::visit( const ast::SwitchStmt * node ) {
     718template< typename pass_t >
     719const ast::Stmt * ast::Pass< pass_t >::visit( const ast::SwitchStmt * node ) {
    739720        VISIT_START( node );
    740721
     
    749730//--------------------------------------------------------------------------
    750731// CaseStmt
    751 template< typename core_t >
    752 const ast::Stmt * ast::Pass< core_t >::visit( const ast::CaseStmt * node ) {
     732template< typename pass_t >
     733const ast::Stmt * ast::Pass< pass_t >::visit( const ast::CaseStmt * node ) {
    753734        VISIT_START( node );
    754735
     
    763744//--------------------------------------------------------------------------
    764745// BranchStmt
    765 template< typename core_t >
    766 const ast::Stmt * ast::Pass< core_t >::visit( const ast::BranchStmt * node ) {
     746template< typename pass_t >
     747const ast::Stmt * ast::Pass< pass_t >::visit( const ast::BranchStmt * node ) {
    767748        VISIT_START( node );
    768749        VISIT_END( Stmt, node );
     
    771752//--------------------------------------------------------------------------
    772753// ReturnStmt
    773 template< typename core_t >
    774 const ast::Stmt * ast::Pass< core_t >::visit( const ast::ReturnStmt * node ) {
     754template< typename pass_t >
     755const ast::Stmt * ast::Pass< pass_t >::visit( const ast::ReturnStmt * node ) {
    775756        VISIT_START( node );
    776757
     
    784765//--------------------------------------------------------------------------
    785766// ThrowStmt
    786 template< typename core_t >
    787 const ast::Stmt * ast::Pass< core_t >::visit( const ast::ThrowStmt * node ) {
     767template< typename pass_t >
     768const ast::Stmt * ast::Pass< pass_t >::visit( const ast::ThrowStmt * node ) {
    788769        VISIT_START( node );
    789770
     
    798779//--------------------------------------------------------------------------
    799780// TryStmt
    800 template< typename core_t >
    801 const ast::Stmt * ast::Pass< core_t >::visit( const ast::TryStmt * node ) {
     781template< typename pass_t >
     782const ast::Stmt * ast::Pass< pass_t >::visit( const ast::TryStmt * node ) {
    802783        VISIT_START( node );
    803784
     
    813794//--------------------------------------------------------------------------
    814795// CatchStmt
    815 template< typename core_t >
    816 const ast::Stmt * ast::Pass< core_t >::visit( const ast::CatchStmt * node ) {
     796template< typename pass_t >
     797const ast::Stmt * ast::Pass< pass_t >::visit( const ast::CatchStmt * node ) {
    817798        VISIT_START( node );
    818799
     
    830811//--------------------------------------------------------------------------
    831812// FinallyStmt
    832 template< typename core_t >
    833 const ast::Stmt * ast::Pass< core_t >::visit( const ast::FinallyStmt * node ) {
     813template< typename pass_t >
     814const ast::Stmt * ast::Pass< pass_t >::visit( const ast::FinallyStmt * node ) {
    834815        VISIT_START( node );
    835816
     
    843824//--------------------------------------------------------------------------
    844825// FinallyStmt
    845 template< typename core_t >
    846 const ast::Stmt * ast::Pass< core_t >::visit( const ast::SuspendStmt * node ) {
     826template< typename pass_t >
     827const ast::Stmt * ast::Pass< pass_t >::visit( const ast::SuspendStmt * node ) {
    847828        VISIT_START( node );
    848829
     
    856837//--------------------------------------------------------------------------
    857838// WaitForStmt
    858 template< typename core_t >
    859 const ast::Stmt * ast::Pass< core_t >::visit( const ast::WaitForStmt * node ) {
     839template< typename pass_t >
     840const ast::Stmt * ast::Pass< pass_t >::visit( const ast::WaitForStmt * node ) {
    860841        VISIT_START( node );
    861842                // for( auto & clause : node->clauses ) {
     
    925906//--------------------------------------------------------------------------
    926907// WithStmt
    927 template< typename core_t >
    928 const ast::Decl * ast::Pass< core_t >::visit( const ast::WithStmt * node ) {
     908template< typename pass_t >
     909const ast::Decl * ast::Pass< pass_t >::visit( const ast::WithStmt * node ) {
    929910        VISIT_START( node );
    930911
     
    934915                        // catch statements introduce a level of scope (for the caught exception)
    935916                        guard_symtab guard { *this };
    936                         __pass::symtab::addWith( core, 0, node->exprs, node );
     917                        __pass::symtab::addWith( pass, 0, node->exprs, node );
    937918                        maybe_accept( node, &WithStmt::stmt );
    938919                }
     
    943924//--------------------------------------------------------------------------
    944925// NullStmt
    945 template< typename core_t >
    946 const ast::NullStmt * ast::Pass< core_t >::visit( const ast::NullStmt * node ) {
     926template< typename pass_t >
     927const ast::NullStmt * ast::Pass< pass_t >::visit( const ast::NullStmt * node ) {
    947928        VISIT_START( node );
    948929        VISIT_END( NullStmt, node );
     
    951932//--------------------------------------------------------------------------
    952933// DeclStmt
    953 template< typename core_t >
    954 const ast::Stmt * ast::Pass< core_t >::visit( const ast::DeclStmt * node ) {
     934template< typename pass_t >
     935const ast::Stmt * ast::Pass< pass_t >::visit( const ast::DeclStmt * node ) {
    955936        VISIT_START( node );
    956937
     
    964945//--------------------------------------------------------------------------
    965946// ImplicitCtorDtorStmt
    966 template< typename core_t >
    967 const ast::Stmt * ast::Pass< core_t >::visit( const ast::ImplicitCtorDtorStmt * node ) {
     947template< typename pass_t >
     948const ast::Stmt * ast::Pass< pass_t >::visit( const ast::ImplicitCtorDtorStmt * node ) {
    968949        VISIT_START( node );
    969950
    970951        // For now this isn't visited, it is unclear if this causes problem
    971952        // if all tests are known to pass, remove this code
    972         VISIT(
    973                 maybe_accept( node, &ImplicitCtorDtorStmt::callStmt );
    974         )
     953        // VISIT(
     954        //      maybe_accept( node, &ImplicitCtorDtorStmt::callStmt );
     955        // )
    975956
    976957        VISIT_END( Stmt, node );
     
    979960//--------------------------------------------------------------------------
    980961// ApplicationExpr
    981 template< typename core_t >
    982 const ast::Expr * ast::Pass< core_t >::visit( const ast::ApplicationExpr * node ) {
     962template< typename pass_t >
     963const ast::Expr * ast::Pass< pass_t >::visit( const ast::ApplicationExpr * node ) {
    983964        VISIT_START( node );
    984965
     
    997978//--------------------------------------------------------------------------
    998979// UntypedExpr
    999 template< typename core_t >
    1000 const ast::Expr * ast::Pass< core_t >::visit( const ast::UntypedExpr * node ) {
     980template< typename pass_t >
     981const ast::Expr * ast::Pass< pass_t >::visit( const ast::UntypedExpr * node ) {
    1001982        VISIT_START( node );
    1002983
     
    1015996//--------------------------------------------------------------------------
    1016997// NameExpr
    1017 template< typename core_t >
    1018 const ast::Expr * ast::Pass< core_t >::visit( const ast::NameExpr * node ) {
     998template< typename pass_t >
     999const ast::Expr * ast::Pass< pass_t >::visit( const ast::NameExpr * node ) {
    10191000        VISIT_START( node );
    10201001
     
    10291010//--------------------------------------------------------------------------
    10301011// CastExpr
    1031 template< typename core_t >
    1032 const ast::Expr * ast::Pass< core_t >::visit( const ast::CastExpr * node ) {
     1012template< typename pass_t >
     1013const ast::Expr * ast::Pass< pass_t >::visit( const ast::CastExpr * node ) {
    10331014        VISIT_START( node );
    10341015
     
    10451026//--------------------------------------------------------------------------
    10461027// KeywordCastExpr
    1047 template< typename core_t >
    1048 const ast::Expr * ast::Pass< core_t >::visit( const ast::KeywordCastExpr * node ) {
     1028template< typename pass_t >
     1029const ast::Expr * ast::Pass< pass_t >::visit( const ast::KeywordCastExpr * node ) {
    10491030        VISIT_START( node );
    10501031
     
    10611042//--------------------------------------------------------------------------
    10621043// VirtualCastExpr
    1063 template< typename core_t >
    1064 const ast::Expr * ast::Pass< core_t >::visit( const ast::VirtualCastExpr * node ) {
     1044template< typename pass_t >
     1045const ast::Expr * ast::Pass< pass_t >::visit( const ast::VirtualCastExpr * node ) {
    10651046        VISIT_START( node );
    10661047
     
    10771058//--------------------------------------------------------------------------
    10781059// AddressExpr
    1079 template< typename core_t >
    1080 const ast::Expr * ast::Pass< core_t >::visit( const ast::AddressExpr * node ) {
     1060template< typename pass_t >
     1061const ast::Expr * ast::Pass< pass_t >::visit( const ast::AddressExpr * node ) {
    10811062        VISIT_START( node );
    10821063
     
    10931074//--------------------------------------------------------------------------
    10941075// LabelAddressExpr
    1095 template< typename core_t >
    1096 const ast::Expr * ast::Pass< core_t >::visit( const ast::LabelAddressExpr * node ) {
     1076template< typename pass_t >
     1077const ast::Expr * ast::Pass< pass_t >::visit( const ast::LabelAddressExpr * node ) {
    10971078        VISIT_START( node );
    10981079
     
    11071088//--------------------------------------------------------------------------
    11081089// UntypedMemberExpr
    1109 template< typename core_t >
    1110 const ast::Expr * ast::Pass< core_t >::visit( const ast::UntypedMemberExpr * node ) {
     1090template< typename pass_t >
     1091const ast::Expr * ast::Pass< pass_t >::visit( const ast::UntypedMemberExpr * node ) {
    11111092        VISIT_START( node );
    11121093
     
    11241105//--------------------------------------------------------------------------
    11251106// MemberExpr
    1126 template< typename core_t >
    1127 const ast::Expr * ast::Pass< core_t >::visit( const ast::MemberExpr * node ) {
     1107template< typename pass_t >
     1108const ast::Expr * ast::Pass< pass_t >::visit( const ast::MemberExpr * node ) {
    11281109        VISIT_START( node );
    11291110
     
    11401121//--------------------------------------------------------------------------
    11411122// VariableExpr
    1142 template< typename core_t >
    1143 const ast::Expr * ast::Pass< core_t >::visit( const ast::VariableExpr * node ) {
     1123template< typename pass_t >
     1124const ast::Expr * ast::Pass< pass_t >::visit( const ast::VariableExpr * node ) {
    11441125        VISIT_START( node );
    11451126
     
    11541135//--------------------------------------------------------------------------
    11551136// ConstantExpr
    1156 template< typename core_t >
    1157 const ast::Expr * ast::Pass< core_t >::visit( const ast::ConstantExpr * node ) {
     1137template< typename pass_t >
     1138const ast::Expr * ast::Pass< pass_t >::visit( const ast::ConstantExpr * node ) {
    11581139        VISIT_START( node );
    11591140
     
    11681149//--------------------------------------------------------------------------
    11691150// SizeofExpr
    1170 template< typename core_t >
    1171 const ast::Expr * ast::Pass< core_t >::visit( const ast::SizeofExpr * node ) {
     1151template< typename pass_t >
     1152const ast::Expr * ast::Pass< pass_t >::visit( const ast::SizeofExpr * node ) {
    11721153        VISIT_START( node );
    11731154
     
    11881169//--------------------------------------------------------------------------
    11891170// AlignofExpr
    1190 template< typename core_t >
    1191 const ast::Expr * ast::Pass< core_t >::visit( const ast::AlignofExpr * node ) {
     1171template< typename pass_t >
     1172const ast::Expr * ast::Pass< pass_t >::visit( const ast::AlignofExpr * node ) {
    11921173        VISIT_START( node );
    11931174
     
    12081189//--------------------------------------------------------------------------
    12091190// UntypedOffsetofExpr
    1210 template< typename core_t >
    1211 const ast::Expr * ast::Pass< core_t >::visit( const ast::UntypedOffsetofExpr * node ) {
     1191template< typename pass_t >
     1192const ast::Expr * ast::Pass< pass_t >::visit( const ast::UntypedOffsetofExpr * node ) {
    12121193        VISIT_START( node );
    12131194
     
    12241205//--------------------------------------------------------------------------
    12251206// OffsetofExpr
    1226 template< typename core_t >
    1227 const ast::Expr * ast::Pass< core_t >::visit( const ast::OffsetofExpr * node ) {
     1207template< typename pass_t >
     1208const ast::Expr * ast::Pass< pass_t >::visit( const ast::OffsetofExpr * node ) {
    12281209        VISIT_START( node );
    12291210
     
    12401221//--------------------------------------------------------------------------
    12411222// OffsetPackExpr
    1242 template< typename core_t >
    1243 const ast::Expr * ast::Pass< core_t >::visit( const ast::OffsetPackExpr * node ) {
     1223template< typename pass_t >
     1224const ast::Expr * ast::Pass< pass_t >::visit( const ast::OffsetPackExpr * node ) {
    12441225        VISIT_START( node );
    12451226
     
    12561237//--------------------------------------------------------------------------
    12571238// LogicalExpr
    1258 template< typename core_t >
    1259 const ast::Expr * ast::Pass< core_t >::visit( const ast::LogicalExpr * node ) {
     1239template< typename pass_t >
     1240const ast::Expr * ast::Pass< pass_t >::visit( const ast::LogicalExpr * node ) {
    12601241        VISIT_START( node );
    12611242
     
    12731254//--------------------------------------------------------------------------
    12741255// ConditionalExpr
    1275 template< typename core_t >
    1276 const ast::Expr * ast::Pass< core_t >::visit( const ast::ConditionalExpr * node ) {
     1256template< typename pass_t >
     1257const ast::Expr * ast::Pass< pass_t >::visit( const ast::ConditionalExpr * node ) {
    12771258        VISIT_START( node );
    12781259
     
    12911272//--------------------------------------------------------------------------
    12921273// CommaExpr
    1293 template< typename core_t >
    1294 const ast::Expr * ast::Pass< core_t >::visit( const ast::CommaExpr * node ) {
     1274template< typename pass_t >
     1275const ast::Expr * ast::Pass< pass_t >::visit( const ast::CommaExpr * node ) {
    12951276        VISIT_START( node );
    12961277
     
    13081289//--------------------------------------------------------------------------
    13091290// TypeExpr
    1310 template< typename core_t >
    1311 const ast::Expr * ast::Pass< core_t >::visit( const ast::TypeExpr * node ) {
     1291template< typename pass_t >
     1292const ast::Expr * ast::Pass< pass_t >::visit( const ast::TypeExpr * node ) {
    13121293        VISIT_START( node );
    13131294
     
    13241305//--------------------------------------------------------------------------
    13251306// AsmExpr
    1326 template< typename core_t >
    1327 const ast::Expr * ast::Pass< core_t >::visit( const ast::AsmExpr * node ) {
     1307template< typename pass_t >
     1308const ast::Expr * ast::Pass< pass_t >::visit( const ast::AsmExpr * node ) {
    13281309        VISIT_START( node );
    13291310
     
    13411322//--------------------------------------------------------------------------
    13421323// ImplicitCopyCtorExpr
    1343 template< typename core_t >
    1344 const ast::Expr * ast::Pass< core_t >::visit( const ast::ImplicitCopyCtorExpr * node ) {
     1324template< typename pass_t >
     1325const ast::Expr * ast::Pass< pass_t >::visit( const ast::ImplicitCopyCtorExpr * node ) {
    13451326        VISIT_START( node );
    13461327
     
    13571338//--------------------------------------------------------------------------
    13581339// ConstructorExpr
    1359 template< typename core_t >
    1360 const ast::Expr * ast::Pass< core_t >::visit( const ast::ConstructorExpr * node ) {
     1340template< typename pass_t >
     1341const ast::Expr * ast::Pass< pass_t >::visit( const ast::ConstructorExpr * node ) {
    13611342        VISIT_START( node );
    13621343
     
    13731354//--------------------------------------------------------------------------
    13741355// CompoundLiteralExpr
    1375 template< typename core_t >
    1376 const ast::Expr * ast::Pass< core_t >::visit( const ast::CompoundLiteralExpr * node ) {
     1356template< typename pass_t >
     1357const ast::Expr * ast::Pass< pass_t >::visit( const ast::CompoundLiteralExpr * node ) {
    13771358        VISIT_START( node );
    13781359
     
    13891370//--------------------------------------------------------------------------
    13901371// RangeExpr
    1391 template< typename core_t >
    1392 const ast::Expr * ast::Pass< core_t >::visit( const ast::RangeExpr * node ) {
     1372template< typename pass_t >
     1373const ast::Expr * ast::Pass< pass_t >::visit( const ast::RangeExpr * node ) {
    13931374        VISIT_START( node );
    13941375
     
    14061387//--------------------------------------------------------------------------
    14071388// UntypedTupleExpr
    1408 template< typename core_t >
    1409 const ast::Expr * ast::Pass< core_t >::visit( const ast::UntypedTupleExpr * node ) {
     1389template< typename pass_t >
     1390const ast::Expr * ast::Pass< pass_t >::visit( const ast::UntypedTupleExpr * node ) {
    14101391        VISIT_START( node );
    14111392
     
    14221403//--------------------------------------------------------------------------
    14231404// TupleExpr
    1424 template< typename core_t >
    1425 const ast::Expr * ast::Pass< core_t >::visit( const ast::TupleExpr * node ) {
     1405template< typename pass_t >
     1406const ast::Expr * ast::Pass< pass_t >::visit( const ast::TupleExpr * node ) {
    14261407        VISIT_START( node );
    14271408
     
    14381419//--------------------------------------------------------------------------
    14391420// TupleIndexExpr
    1440 template< typename core_t >
    1441 const ast::Expr * ast::Pass< core_t >::visit( const ast::TupleIndexExpr * node ) {
     1421template< typename pass_t >
     1422const ast::Expr * ast::Pass< pass_t >::visit( const ast::TupleIndexExpr * node ) {
    14421423        VISIT_START( node );
    14431424
     
    14541435//--------------------------------------------------------------------------
    14551436// TupleAssignExpr
    1456 template< typename core_t >
    1457 const ast::Expr * ast::Pass< core_t >::visit( const ast::TupleAssignExpr * node ) {
     1437template< typename pass_t >
     1438const ast::Expr * ast::Pass< pass_t >::visit( const ast::TupleAssignExpr * node ) {
    14581439        VISIT_START( node );
    14591440
     
    14701451//--------------------------------------------------------------------------
    14711452// StmtExpr
    1472 template< typename core_t >
    1473 const ast::Expr * ast::Pass< core_t >::visit( const ast::StmtExpr * node ) {
     1453template< typename pass_t >
     1454const ast::Expr * ast::Pass< pass_t >::visit( const ast::StmtExpr * node ) {
    14741455        VISIT_START( node );
    14751456
    14761457        VISIT(// don't want statements from outer CompoundStmts to be added to this StmtExpr
    14771458                // get the stmts that will need to be spliced in
    1478                 auto stmts_before = __pass::stmtsToAddBefore( core, 0);
    1479                 auto stmts_after  = __pass::stmtsToAddAfter ( core, 0);
     1459                auto stmts_before = __pass::stmtsToAddBefore( pass, 0);
     1460                auto stmts_after  = __pass::stmtsToAddAfter ( pass, 0);
    14801461
    14811462                // These may be modified by subnode but most be restored once we exit this statemnet.
    1482                 ValueGuardPtr< const ast::TypeSubstitution * > __old_env( __pass::env( core, 0) );
     1463                ValueGuardPtr< const ast::TypeSubstitution * > __old_env( __pass::env( pass, 0) );
    14831464                ValueGuardPtr< typename std::remove_pointer< decltype(stmts_before) >::type > __old_decls_before( stmts_before );
    14841465                ValueGuardPtr< typename std::remove_pointer< decltype(stmts_after ) >::type > __old_decls_after ( stmts_after  );
     
    14981479//--------------------------------------------------------------------------
    14991480// UniqueExpr
    1500 template< typename core_t >
    1501 const ast::Expr * ast::Pass< core_t >::visit( const ast::UniqueExpr * node ) {
     1481template< typename pass_t >
     1482const ast::Expr * ast::Pass< pass_t >::visit( const ast::UniqueExpr * node ) {
    15021483        VISIT_START( node );
    15031484
     
    15141495//--------------------------------------------------------------------------
    15151496// UntypedInitExpr
    1516 template< typename core_t >
    1517 const ast::Expr * ast::Pass< core_t >::visit( const ast::UntypedInitExpr * node ) {
     1497template< typename pass_t >
     1498const ast::Expr * ast::Pass< pass_t >::visit( const ast::UntypedInitExpr * node ) {
    15181499        VISIT_START( node );
    15191500
     
    15311512//--------------------------------------------------------------------------
    15321513// InitExpr
    1533 template< typename core_t >
    1534 const ast::Expr * ast::Pass< core_t >::visit( const ast::InitExpr * node ) {
     1514template< typename pass_t >
     1515const ast::Expr * ast::Pass< pass_t >::visit( const ast::InitExpr * node ) {
    15351516        VISIT_START( node );
    15361517
     
    15481529//--------------------------------------------------------------------------
    15491530// DeletedExpr
    1550 template< typename core_t >
    1551 const ast::Expr * ast::Pass< core_t >::visit( const ast::DeletedExpr * node ) {
     1531template< typename pass_t >
     1532const ast::Expr * ast::Pass< pass_t >::visit( const ast::DeletedExpr * node ) {
    15521533        VISIT_START( node );
    15531534
     
    15651546//--------------------------------------------------------------------------
    15661547// DefaultArgExpr
    1567 template< typename core_t >
    1568 const ast::Expr * ast::Pass< core_t >::visit( const ast::DefaultArgExpr * node ) {
     1548template< typename pass_t >
     1549const ast::Expr * ast::Pass< pass_t >::visit( const ast::DefaultArgExpr * node ) {
    15691550        VISIT_START( node );
    15701551
     
    15811562//--------------------------------------------------------------------------
    15821563// GenericExpr
    1583 template< typename core_t >
    1584 const ast::Expr * ast::Pass< core_t >::visit( const ast::GenericExpr * node ) {
     1564template< typename pass_t >
     1565const ast::Expr * ast::Pass< pass_t >::visit( const ast::GenericExpr * node ) {
    15851566        VISIT_START( node );
    15861567
     
    16211602//--------------------------------------------------------------------------
    16221603// VoidType
    1623 template< typename core_t >
    1624 const ast::Type * ast::Pass< core_t >::visit( const ast::VoidType * node ) {
     1604template< typename pass_t >
     1605const ast::Type * ast::Pass< pass_t >::visit( const ast::VoidType * node ) {
    16251606        VISIT_START( node );
    16261607
     
    16301611//--------------------------------------------------------------------------
    16311612// BasicType
    1632 template< typename core_t >
    1633 const ast::Type * ast::Pass< core_t >::visit( const ast::BasicType * node ) {
     1613template< typename pass_t >
     1614const ast::Type * ast::Pass< pass_t >::visit( const ast::BasicType * node ) {
    16341615        VISIT_START( node );
    16351616
     
    16391620//--------------------------------------------------------------------------
    16401621// PointerType
    1641 template< typename core_t >
    1642 const ast::Type * ast::Pass< core_t >::visit( const ast::PointerType * node ) {
     1622template< typename pass_t >
     1623const ast::Type * ast::Pass< pass_t >::visit( const ast::PointerType * node ) {
    16431624        VISIT_START( node );
    16441625
     
    16531634//--------------------------------------------------------------------------
    16541635// ArrayType
    1655 template< typename core_t >
    1656 const ast::Type * ast::Pass< core_t >::visit( const ast::ArrayType * node ) {
     1636template< typename pass_t >
     1637const ast::Type * ast::Pass< pass_t >::visit( const ast::ArrayType * node ) {
    16571638        VISIT_START( node );
    16581639
     
    16671648//--------------------------------------------------------------------------
    16681649// ReferenceType
    1669 template< typename core_t >
    1670 const ast::Type * ast::Pass< core_t >::visit( const ast::ReferenceType * node ) {
     1650template< typename pass_t >
     1651const ast::Type * ast::Pass< pass_t >::visit( const ast::ReferenceType * node ) {
    16711652        VISIT_START( node );
    16721653
     
    16801661//--------------------------------------------------------------------------
    16811662// QualifiedType
    1682 template< typename core_t >
    1683 const ast::Type * ast::Pass< core_t >::visit( const ast::QualifiedType * node ) {
     1663template< typename pass_t >
     1664const ast::Type * ast::Pass< pass_t >::visit( const ast::QualifiedType * node ) {
    16841665        VISIT_START( node );
    16851666
     
    16941675//--------------------------------------------------------------------------
    16951676// FunctionType
    1696 template< typename core_t >
    1697 const ast::Type * ast::Pass< core_t >::visit( const ast::FunctionType * node ) {
    1698         VISIT_START( node );
    1699 
    1700         VISIT({
    1701                 guard_forall_subs forall_guard { *this, node };
    1702                 mutate_forall( node );
     1677template< typename pass_t >
     1678const ast::Type * ast::Pass< pass_t >::visit( const ast::FunctionType * node ) {
     1679        VISIT_START( node );
     1680
     1681        VISIT(
     1682                maybe_accept( node, &FunctionType::forall  );
    17031683                maybe_accept( node, &FunctionType::returns );
    17041684                maybe_accept( node, &FunctionType::params  );
    1705         })
     1685        )
    17061686
    17071687        VISIT_END( Type, node );
     
    17101690//--------------------------------------------------------------------------
    17111691// StructInstType
    1712 template< typename core_t >
    1713 const ast::Type * ast::Pass< core_t >::visit( const ast::StructInstType * node ) {
    1714         VISIT_START( node );
    1715 
    1716         __pass::symtab::addStruct( core, 0, node->name );
     1692template< typename pass_t >
     1693const ast::Type * ast::Pass< pass_t >::visit( const ast::StructInstType * node ) {
     1694        VISIT_START( node );
     1695
     1696        __pass::symtab::addStruct( pass, 0, node->name );
    17171697
    17181698        VISIT({
    17191699                guard_symtab guard { *this };
    1720                 guard_forall_subs forall_guard { *this, node };
    1721                 mutate_forall( node );
     1700                maybe_accept( node, &StructInstType::forall );
    17221701                maybe_accept( node, &StructInstType::params );
    17231702        })
     
    17281707//--------------------------------------------------------------------------
    17291708// UnionInstType
    1730 template< typename core_t >
    1731 const ast::Type * ast::Pass< core_t >::visit( const ast::UnionInstType * node ) {
    1732         VISIT_START( node );
    1733 
    1734         __pass::symtab::addUnion( core, 0, node->name );
    1735 
    1736         VISIT({
     1709template< typename pass_t >
     1710const ast::Type * ast::Pass< pass_t >::visit( const ast::UnionInstType * node ) {
     1711        VISIT_START( node );
     1712
     1713        __pass::symtab::addStruct( pass, 0, node->name );
     1714
     1715        {
    17371716                guard_symtab guard { *this };
    1738                 guard_forall_subs forall_guard { *this, node };
    1739                 mutate_forall( node );
     1717                maybe_accept( node, &UnionInstType::forall );
    17401718                maybe_accept( node, &UnionInstType::params );
    1741         })
     1719        }
    17421720
    17431721        VISIT_END( Type, node );
     
    17461724//--------------------------------------------------------------------------
    17471725// EnumInstType
    1748 template< typename core_t >
    1749 const ast::Type * ast::Pass< core_t >::visit( const ast::EnumInstType * node ) {
    1750         VISIT_START( node );
    1751 
    1752         VISIT({
    1753                 guard_forall_subs forall_guard { *this, node };
    1754                 mutate_forall( node );
     1726template< typename pass_t >
     1727const ast::Type * ast::Pass< pass_t >::visit( const ast::EnumInstType * node ) {
     1728        VISIT_START( node );
     1729
     1730        VISIT(
     1731                maybe_accept( node, &EnumInstType::forall );
    17551732                maybe_accept( node, &EnumInstType::params );
    1756         })
     1733        )
    17571734
    17581735        VISIT_END( Type, node );
     
    17611738//--------------------------------------------------------------------------
    17621739// TraitInstType
    1763 template< typename core_t >
    1764 const ast::Type * ast::Pass< core_t >::visit( const ast::TraitInstType * node ) {
    1765         VISIT_START( node );
    1766 
    1767         VISIT({
    1768                 guard_forall_subs forall_guard { *this, node };
    1769                 mutate_forall( node );
     1740template< typename pass_t >
     1741const ast::Type * ast::Pass< pass_t >::visit( const ast::TraitInstType * node ) {
     1742        VISIT_START( node );
     1743
     1744        VISIT(
     1745                maybe_accept( node, &TraitInstType::forall );
    17701746                maybe_accept( node, &TraitInstType::params );
    1771         })
     1747        )
    17721748
    17731749        VISIT_END( Type, node );
     
    17761752//--------------------------------------------------------------------------
    17771753// TypeInstType
    1778 template< typename core_t >
    1779 const ast::Type * ast::Pass< core_t >::visit( const ast::TypeInstType * node ) {
    1780         VISIT_START( node );
    1781 
    1782         VISIT(
    1783                 {
    1784                         guard_forall_subs forall_guard { *this, node };
    1785                         mutate_forall( node );
    1786                         maybe_accept( node, &TypeInstType::params );
    1787                 }
    1788                 // ensure that base re-bound if doing substitution
    1789                 __pass::forall::replace( core, 0, node );
     1754template< typename pass_t >
     1755const ast::Type * ast::Pass< pass_t >::visit( const ast::TypeInstType * node ) {
     1756        VISIT_START( node );
     1757
     1758        VISIT(
     1759                maybe_accept( node, &TypeInstType::forall );
     1760                maybe_accept( node, &TypeInstType::params );
    17901761        )
    17911762
     
    17951766//--------------------------------------------------------------------------
    17961767// TupleType
    1797 template< typename core_t >
    1798 const ast::Type * ast::Pass< core_t >::visit( const ast::TupleType * node ) {
     1768template< typename pass_t >
     1769const ast::Type * ast::Pass< pass_t >::visit( const ast::TupleType * node ) {
    17991770        VISIT_START( node );
    18001771
     
    18091780//--------------------------------------------------------------------------
    18101781// TypeofType
    1811 template< typename core_t >
    1812 const ast::Type * ast::Pass< core_t >::visit( const ast::TypeofType * node ) {
     1782template< typename pass_t >
     1783const ast::Type * ast::Pass< pass_t >::visit( const ast::TypeofType * node ) {
    18131784        VISIT_START( node );
    18141785
     
    18221793//--------------------------------------------------------------------------
    18231794// VarArgsType
    1824 template< typename core_t >
    1825 const ast::Type * ast::Pass< core_t >::visit( const ast::VarArgsType * node ) {
     1795template< typename pass_t >
     1796const ast::Type * ast::Pass< pass_t >::visit( const ast::VarArgsType * node ) {
    18261797        VISIT_START( node );
    18271798
     
    18311802//--------------------------------------------------------------------------
    18321803// ZeroType
    1833 template< typename core_t >
    1834 const ast::Type * ast::Pass< core_t >::visit( const ast::ZeroType * node ) {
     1804template< typename pass_t >
     1805const ast::Type * ast::Pass< pass_t >::visit( const ast::ZeroType * node ) {
    18351806        VISIT_START( node );
    18361807
     
    18401811//--------------------------------------------------------------------------
    18411812// OneType
    1842 template< typename core_t >
    1843 const ast::Type * ast::Pass< core_t >::visit( const ast::OneType * node ) {
     1813template< typename pass_t >
     1814const ast::Type * ast::Pass< pass_t >::visit( const ast::OneType * node ) {
    18441815        VISIT_START( node );
    18451816
     
    18491820//--------------------------------------------------------------------------
    18501821// GlobalScopeType
    1851 template< typename core_t >
    1852 const ast::Type * ast::Pass< core_t >::visit( const ast::GlobalScopeType * node ) {
     1822template< typename pass_t >
     1823const ast::Type * ast::Pass< pass_t >::visit( const ast::GlobalScopeType * node ) {
    18531824        VISIT_START( node );
    18541825
     
    18591830//--------------------------------------------------------------------------
    18601831// Designation
    1861 template< typename core_t >
    1862 const ast::Designation * ast::Pass< core_t >::visit( const ast::Designation * node ) {
     1832template< typename pass_t >
     1833const ast::Designation * ast::Pass< pass_t >::visit( const ast::Designation * node ) {
    18631834        VISIT_START( node );
    18641835
     
    18701841//--------------------------------------------------------------------------
    18711842// SingleInit
    1872 template< typename core_t >
    1873 const ast::Init * ast::Pass< core_t >::visit( const ast::SingleInit * node ) {
     1843template< typename pass_t >
     1844const ast::Init * ast::Pass< pass_t >::visit( const ast::SingleInit * node ) {
    18741845        VISIT_START( node );
    18751846
     
    18831854//--------------------------------------------------------------------------
    18841855// ListInit
    1885 template< typename core_t >
    1886 const ast::Init * ast::Pass< core_t >::visit( const ast::ListInit * node ) {
     1856template< typename pass_t >
     1857const ast::Init * ast::Pass< pass_t >::visit( const ast::ListInit * node ) {
    18871858        VISIT_START( node );
    18881859
     
    18971868//--------------------------------------------------------------------------
    18981869// ConstructorInit
    1899 template< typename core_t >
    1900 const ast::Init * ast::Pass< core_t >::visit( const ast::ConstructorInit * node ) {
     1870template< typename pass_t >
     1871const ast::Init * ast::Pass< pass_t >::visit( const ast::ConstructorInit * node ) {
    19011872        VISIT_START( node );
    19021873
     
    19121883//--------------------------------------------------------------------------
    19131884// Attribute
    1914 template< typename core_t >
    1915 const ast::Attribute * ast::Pass< core_t >::visit( const ast::Attribute * node  )  {
     1885template< typename pass_t >
     1886const ast::Attribute * ast::Pass< pass_t >::visit( const ast::Attribute * node  )  {
    19161887        VISIT_START( node );
    19171888
     
    19251896//--------------------------------------------------------------------------
    19261897// TypeSubstitution
    1927 template< typename core_t >
    1928 const ast::TypeSubstitution * ast::Pass< core_t >::visit( const ast::TypeSubstitution * node ) {
     1898template< typename pass_t >
     1899const ast::TypeSubstitution * ast::Pass< pass_t >::visit( const ast::TypeSubstitution * node ) {
    19291900        VISIT_START( node );
    19301901
     
    19361907                                guard_symtab guard { *this };
    19371908                                auto new_node = p.second->accept( *this );
    1938                                 if (new_node != p.second) mutated = true;
     1909                                if (new_node != p.second) mutated = false;
    19391910                                new_map.insert({ p.first, new_node });
    19401911                        }
     
    19521923                                guard_symtab guard { *this };
    19531924                                auto new_node = p.second->accept( *this );
    1954                                 if (new_node != p.second) mutated = true;
     1925                                if (new_node != p.second) mutated = false;
    19551926                                new_map.insert({ p.first, new_node });
    19561927                        }
Note: See TracChangeset for help on using the changeset viewer.