Changes in / [e1ff775:1155718]


Ignore:
Location:
src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • src/Common/PassVisitor.h

    re1ff775 r1155718  
    44
    55#include <stack>
    6 
    7 #include "Common/utility.h"
    86
    97#include "SynTree/Mutator.h"
     
    241239        template<typename pass_t> friend void acceptAll( std::list< Declaration* > &decls, PassVisitor< pass_t >& visitor );
    242240        template<typename pass_t> friend void mutateAll( std::list< Declaration* > &decls, PassVisitor< pass_t >& visitor );
    243         template< typename TreeType, typename pass_t > friend void maybeAccept_impl( TreeType * tree, PassVisitor< pass_t > & visitor );
    244         template< typename TreeType, typename pass_t > friend void maybeMutate_impl( TreeType *& tree, PassVisitor< pass_t > & mutator );
    245         template< typename Container, typename pass_t > friend void maybeAccept_impl( Container & container, PassVisitor< pass_t > & visitor );
    246         template< typename Container, typename pass_t > friend void maybeMutate_impl( Container & container, PassVisitor< pass_t > & mutator );
    247241
    248242        template<typename node_type> void call_previsit ( node_type * node ) { previsit_impl ( pass, node, 0 ); }
     
    279273        std::list< Declaration* > *     get_afterDecls () { return declsToAddAfter_impl ( pass, 0); }
    280274
    281         bool       get_visit_children    () { bool_ref * ptr = visit_children_impl(pass, 0); return ptr ? *ptr : true; }
    282         bool_ref * get_visit_children_ptr() { return visit_children_impl(pass, 0); }
     275        void set_visit_children( bool& ref ) { bool_ref * ptr = visit_children_impl(pass, 0); if(ptr) ptr->set( ref ); }
    283276
    284277        void indexerScopeEnter  ()                             { indexer_impl_enterScope  ( pass, 0       ); }
  • src/Common/PassVisitor.impl.h

    re1ff775 r1155718  
    22// IWYU pragma: private, include "PassVisitor.h"
    33
    4 #define VISIT_START( node )                                     \
    5         __attribute__((unused))                                   \
    6         ChildrenGuard children_guard( get_visit_children_ptr() ); \
    7         __attribute__((unused))                                   \
     4#define VISIT_START( node )                     \
     5        __attribute__((unused))                   \
    86        guard_value_impl guard( at_cleanup_impl(pass, 0) );       \
    9         call_previsit( node );                                    \
     7        bool visit_children = true;               \
     8        set_visit_children( visit_children );   \
     9        call_previsit( node );                    \
     10        if( visit_children ) {                    \
    1011
    1112#define VISIT_END( node )                       \
     13        }                                         \
    1214        call_postvisit( node );                   \
    1315
    14 #define MUTATE_START( node )                                    \
    15         __attribute__((unused))                                   \
    16         ChildrenGuard children_guard( get_visit_children_ptr() ); \
    17         __attribute__((unused))                                   \
     16#define MUTATE_START( node )                    \
     17        __attribute__((unused))                   \
    1818        guard_value_impl guard( at_cleanup_impl(pass, 0) );       \
    19         call_premutate( node );                                   \
     19        bool visit_children = true;               \
     20        set_visit_children( visit_children );   \
     21        call_premutate( node );                   \
     22        if( visit_children ) {                    \
    2023
    2124#define MUTATE_END( type, node )                \
     25        }                                         \
    2226        return call_postmutate< type * >( node ); \
    2327
    2428
    25 #define VISIT_BODY( node )          \
    26         VISIT_START( node );          \
    27         if( children_guard ) {        \
    28                 Visitor::visit( node ); \
    29         }                             \
    30         VISIT_END( node );            \
    31 
    32 
    33 #define MUTATE_BODY( type, node )    \
    34         MUTATE_START( node );          \
    35         if( children_guard ) {         \
    36                 Mutator::mutate( node ); \
    37         }                              \
    38         MUTATE_END( type, node );      \
     29#define VISIT_BODY( node )        \
     30        VISIT_START( node );        \
     31        Visitor::visit( node );     \
     32        VISIT_END( node );          \
     33
     34
     35#define MUTATE_BODY( type, node ) \
     36        MUTATE_START( node );       \
     37        Mutator::mutate( node );    \
     38        MUTATE_END( type, node );   \
    3939
    4040
     
    6363template< typename pass_type >
    6464static inline void acceptAll( std::list< Declaration* > &decls, PassVisitor< pass_type >& visitor ) {
     65
    6566        DeclList_t* beforeDecls = visitor.get_beforeDecls();
    6667        DeclList_t* afterDecls  = visitor.get_afterDecls();
     
    7576                try {
    7677                        // run visitor on declaration
    77                         maybeAccept_impl( *i, visitor );
     78                        maybeAccept( *i, visitor );
    7879                } catch( SemanticError &e ) {
    7980                        e.set_location( (*i)->location );
     
    9192template< typename pass_type >
    9293static inline void mutateAll( std::list< Declaration* > &decls, PassVisitor< pass_type >& mutator ) {
     94
    9395        DeclList_t* beforeDecls = mutator.get_beforeDecls();
    9496        DeclList_t* afterDecls  = mutator.get_afterDecls();
     
    102104                try {
    103105                        // run mutator on declaration
    104                         maybeMutate_impl( *i, mutator );
     106                        *i = maybeMutate( *i, mutator );
    105107                } catch( SemanticError &e ) {
    106108                        e.set_location( (*i)->location );
     
    116118}
    117119
    118 template< typename TreeType, typename pass_type >
    119 inline void maybeAccept_impl( TreeType * tree, PassVisitor< pass_type > & visitor ) {
    120         if ( ! visitor.get_visit_children() ) return;
    121         if ( tree ) {
    122                 tree->accept( visitor );
    123         }
    124 }
    125 
    126 template< typename Container, typename pass_type >
    127 inline void maybeAccept_impl( Container & container, PassVisitor< pass_type > & visitor ) {
    128         if ( ! visitor.get_visit_children() ) return;
     120template< typename Container, typename VisitorType >
     121inline void maybeAccept( Container &container, VisitorType &visitor ) {
    129122        SemanticError errors;
    130123        for ( typename Container::iterator i = container.begin(); i != container.end(); ++i ) {
     
    143136}
    144137
    145 template< typename TreeType, typename pass_type >
    146 inline void maybeMutate_impl( TreeType *& tree, PassVisitor< pass_type > & mutator ) {
    147         if ( ! mutator.get_visit_children() ) return;
    148 
    149         if ( tree ) {
    150                 tree = strict_dynamic_cast< TreeType * >( tree->acceptMutator( mutator ) );
    151         }
    152 }
    153 
    154 template< typename Container, typename pass_type >
    155 inline void maybeMutate_impl( Container & container, PassVisitor< pass_type > & mutator ) {
    156         if ( ! mutator.get_visit_children() ) return;
     138template< typename Container, typename MutatorType >
     139inline void maybeMutateRef( Container &container, MutatorType &mutator ) {
    157140        SemanticError errors;
    158141        for ( typename Container::iterator i = container.begin(); i != container.end(); ++i ) {
    159142                try {
    160143                        if ( *i ) {
     144///                 *i = (*i)->acceptMutator( mutator );
    161145                                *i = dynamic_cast< typename Container::value_type >( (*i)->acceptMutator( mutator ) );
    162146                                assert( *i );
     
    175159template< typename func_t >
    176160void PassVisitor< pass_type >::handleStatementList( std::list< Statement * > & statements, func_t func ) {
    177         if ( ! get_visit_children() ) return;
    178161        SemanticError errors;
    179162
     
    216199void PassVisitor< pass_type >::visitStatementList( std::list< Statement * > & statements ) {
    217200        handleStatementList( statements, [this]( Statement * stmt) {
    218                 maybeAccept_impl( stmt, *this );
     201                stmt->accept( *this );
    219202        });
    220203}
     
    223206void PassVisitor< pass_type >::mutateStatementList( std::list< Statement * > & statements ) {
    224207        handleStatementList( statements, [this]( Statement *& stmt) {
    225                 maybeMutate_impl( stmt, *this );
     208                stmt = stmt->acceptMutator( *this );
    226209        });
    227210}
     
    231214template< typename func_t >
    232215Statement * PassVisitor< pass_type >::handleStatement( Statement * stmt, func_t func ) {
    233         if ( ! get_visit_children() ) return stmt;
    234 
    235216        // don't want statements from outer CompoundStmts to be added to this CompoundStmt
    236217        ValueGuardPtr< TypeSubstitution * >  oldEnv        ( get_env_ptr    () );
     
    263244Statement * PassVisitor< pass_type >::visitStatement( Statement * stmt ) {
    264245        return handleStatement( stmt, [this]( Statement * stmt ) {
    265                 maybeAccept_impl( stmt, *this );
     246                maybeAccept( stmt, *this );
    266247                return stmt;
    267248        });
     
    271252Statement * PassVisitor< pass_type >::mutateStatement( Statement * stmt ) {
    272253        return handleStatement( stmt, [this]( Statement * stmt ) {
    273                 maybeMutate_impl( stmt, *this );
    274                 return stmt;
     254                return maybeMutate( stmt, *this );
    275255        });
    276256}
     
    279259template< typename func_t >
    280260Expression * PassVisitor< pass_type >::handleExpression( Expression * expr, func_t func ) {
    281         if ( ! get_visit_children() ) return expr;
    282261        if( !expr ) return nullptr;
    283262
     
    287266        }
    288267
    289         // should env be moved onto the result of the mutate?
     268        // should env be cloned (or moved) onto the result of the mutate?
    290269        return func( expr );
    291270}
     
    294273Expression * PassVisitor< pass_type >::visitExpression( Expression * expr ) {
    295274        return handleExpression(expr, [this]( Expression * expr ) {
    296                 maybeAccept_impl( expr, *this );
     275                expr->accept( *this );
    297276                return expr;
    298277        });
     
    302281Expression * PassVisitor< pass_type >::mutateExpression( Expression * expr ) {
    303282        return handleExpression(expr, [this]( Expression * expr ) {
    304                 maybeMutate_impl( expr, *this );
    305                 return expr;
     283                return expr->acceptMutator( *this );
    306284        });
    307 }
    308 
    309 template< typename TreeType, typename VisitorType >
    310 inline void indexerScopedAccept( TreeType * tree, VisitorType & visitor ) {
    311         if ( ! visitor.get_visit_children() ) return;
    312         auto guard = makeFuncGuard(
    313                 [&visitor]() { visitor.indexerScopeEnter(); },
    314                 [&visitor]() { visitor.indexerScopeLeave(); }
    315         );
    316         maybeAccept_impl( tree, visitor );
    317 }
    318 
    319 template< typename TreeType, typename MutatorType >
    320 inline void indexerScopedMutate( TreeType *& tree, MutatorType & mutator ) {
    321         if ( ! mutator.get_visit_children() ) return;
    322         auto guard = makeFuncGuard(
    323                 [&mutator]() { mutator.indexerScopeEnter(); },
    324                 [&mutator]() { mutator.indexerScopeLeave(); }
    325         );
    326         maybeMutate_impl( tree, mutator );
    327285}
    328286
     
    361319
    362320        indexerScopedAccept( node->type         , *this );
    363         maybeAccept_impl   ( node->init         , *this );
    364         maybeAccept_impl   ( node->bitfieldWidth, *this );
    365         maybeAccept_impl   ( node->attributes   , *this );
     321        maybeAccept        ( node->init         , *this );
     322        maybeAccept        ( node->bitfieldWidth, *this );
     323        maybeAccept        ( node->attributes   , *this );
    366324
    367325        if ( node->name != "" ) {
     
    377335
    378336        indexerScopedMutate( node->type         , *this );
    379         maybeMutate_impl   ( node->init         , *this );
    380         maybeMutate_impl   ( node->bitfieldWidth, *this );
    381         maybeMutate_impl   ( node->attributes   , *this );
     337        maybeMutateRef     ( node->init         , *this );
     338        maybeMutateRef     ( node->bitfieldWidth, *this );
     339        maybeMutateRef     ( node->attributes   , *this );
    382340
    383341        if ( node->name != "" ) {
     
    400358        {
    401359                auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } );
    402                 maybeAccept_impl( node->type, *this );
    403                 maybeAccept_impl( node->statements, *this );
    404                 maybeAccept_impl( node->attributes, *this );
     360                maybeAccept( node->type, *this );
     361                maybeAccept( node->statements, *this );
     362                maybeAccept( node->attributes, *this );
    405363        }
    406364
     
    418376        {
    419377                auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } );
    420                 maybeMutate_impl( node->type, *this );
    421                 maybeMutate_impl( node->statements, *this );
    422                 maybeMutate_impl( node->attributes, *this );
     378                maybeMutateRef( node->type, *this );
     379                maybeMutateRef( node->statements, *this );
     380                maybeMutateRef( node->attributes, *this );
    423381        }
    424382
     
    438396        {
    439397                auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } );
    440                 maybeAccept_impl( node->parameters, *this );
    441                 maybeAccept_impl( node->members   , *this );
     398                maybeAccept( node->parameters, *this );
     399                maybeAccept( node->members   , *this );
    442400        }
    443401
     
    458416        {
    459417                auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } );
    460                 maybeMutate_impl( node->parameters, *this );
    461                 maybeMutate_impl( node->members   , *this );
     418                maybeMutateRef( node->parameters, *this );
     419                maybeMutateRef( node->members   , *this );
    462420        }
    463421
     
    479437        {
    480438                auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } );
    481                 maybeAccept_impl( node->parameters, *this );
    482                 maybeAccept_impl( node->members   , *this );
     439                maybeAccept( node->parameters, *this );
     440                maybeAccept( node->members   , *this );
    483441        }
    484442
     
    497455        {
    498456                auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } );
    499                 maybeMutate_impl( node->parameters, *this );
    500                 maybeMutate_impl( node->members   , *this );
     457                maybeMutateRef( node->parameters, *this );
     458                maybeMutateRef( node->members   , *this );
    501459        }
    502460
     
    515473
    516474        // unlike structs, traits, and unions, enums inject their members into the global scope
    517         maybeAccept_impl( node->parameters, *this );
    518         maybeAccept_impl( node->members   , *this );
     475        maybeAccept( node->parameters, *this );
     476        maybeAccept( node->members   , *this );
    519477
    520478        VISIT_END( node );
     
    528486
    529487        // unlike structs, traits, and unions, enums inject their members into the global scope
    530         maybeMutate_impl( node->parameters, *this );
    531         maybeMutate_impl( node->members   , *this );
     488        maybeMutateRef( node->parameters, *this );
     489        maybeMutateRef( node->members   , *this );
    532490
    533491        MUTATE_END( Declaration, node );
     
    542500        {
    543501                auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } );
    544                 maybeAccept_impl( node->parameters, *this );
    545                 maybeAccept_impl( node->members   , *this );
     502                maybeAccept( node->parameters, *this );
     503                maybeAccept( node->members   , *this );
    546504        }
    547505
     
    557515        {
    558516                auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } );
    559                 maybeMutate_impl( node->parameters, *this );
    560                 maybeMutate_impl( node->members   , *this );
     517                maybeMutateRef( node->parameters, *this );
     518                maybeMutateRef( node->members   , *this );
    561519        }
    562520
     
    574532        {
    575533                auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } );
    576                 maybeAccept_impl( node->parameters, *this );
    577                 maybeAccept_impl( node->base      , *this );
     534                maybeAccept( node->parameters, *this );
     535                maybeAccept( node->base      , *this );
    578536        }
    579537
     
    583541        indexerAddType( node );
    584542
    585         maybeAccept_impl( node->assertions, *this );
     543        maybeAccept( node->assertions, *this );
    586544
    587545        indexerScopedAccept( node->init, *this );
     
    596554        {
    597555                auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } );
    598                 maybeMutate_impl( node->parameters, *this );
    599                 maybeMutate_impl( node->base      , *this );
     556                maybeMutateRef( node->parameters, *this );
     557                maybeMutateRef( node->base      , *this );
    600558        }
    601559
     
    605563        indexerAddType( node );
    606564
    607         maybeMutate_impl( node->assertions, *this );
     565        maybeMutateRef( node->assertions, *this );
    608566
    609567        indexerScopedMutate( node->init, *this );
     
    620578        {
    621579                auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } );
    622                 maybeAccept_impl( node->parameters, *this );
    623                 maybeAccept_impl( node->base      , *this );
     580                maybeAccept( node->parameters, *this );
     581                maybeAccept( node->base      , *this );
    624582        }
    625583
    626584        indexerAddType( node );
    627585
    628         maybeAccept_impl( node->assertions, *this );
     586        maybeAccept( node->assertions, *this );
    629587
    630588        VISIT_END( node );
     
    637595        {
    638596                auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } );
    639                 maybeMutate_impl( node->parameters, *this );
    640                 maybeMutate_impl( node->base      , *this );
     597                maybeMutateRef     ( node->parameters, *this );
     598                maybeMutateRef( node->base      , *this );
    641599        }
    642600
    643601        indexerAddType( node );
    644602
    645         maybeMutate_impl( node->assertions, *this );
     603        maybeMutateRef( node->assertions, *this );
    646604
    647605        MUTATE_END( Declaration, node );
     
    654612        VISIT_START( node );
    655613
    656         maybeAccept_impl( node->stmt, *this );
     614        maybeAccept( node->stmt, *this );
    657615
    658616        VISIT_END( node );
     
    663621        MUTATE_START( node );
    664622
    665         maybeMutate_impl( node->stmt, *this );
     623        maybeMutateRef( node->stmt, *this );
    666624
    667625        MUTATE_END( AsmDecl, node );
     
    732690                // if statements introduce a level of scope (for the initialization)
    733691                auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } );
    734                 maybeAccept_impl( node->get_initialization(), *this );
    735                 visitExpression ( node->condition );
     692                acceptAll( node->get_initialization(), *this );
     693                visitExpression( node->condition );
    736694                node->thenPart = visitStatement( node->thenPart );
    737695                node->elsePart = visitStatement( node->elsePart );
     
    746704                // if statements introduce a level of scope (for the initialization)
    747705                auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } );
    748                 maybeMutate_impl( node->get_initialization(), *this );
     706                maybeMutateRef( node->get_initialization(), *this );
    749707                node->condition = mutateExpression( node->condition );
    750708                node->thenPart  = mutateStatement ( node->thenPart  );
     
    784742                // for statements introduce a level of scope (for the initialization)
    785743                auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } );
    786                 maybeAccept_impl( node->initialization, *this );
     744                maybeAccept( node->initialization, *this );
    787745                visitExpression( node->condition );
    788746                visitExpression( node->increment );
     
    798756                // for statements introduce a level of scope (for the initialization)
    799757                auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } );
    800                 maybeMutate_impl( node->initialization, *this );
     758                maybeMutateRef( node->initialization, *this );
    801759                node->condition = mutateExpression( node->condition );
    802760                node->increment = mutateExpression( node->increment );
     
    901859        VISIT_START( node );
    902860
    903         maybeAccept_impl( node->block       , *this );
    904         maybeAccept_impl( node->handlers    , *this );
    905         maybeAccept_impl( node->finallyBlock, *this );
     861        maybeAccept( node->block       , *this );
     862        maybeAccept( node->handlers    , *this );
     863        maybeAccept( node->finallyBlock, *this );
    906864
    907865        VISIT_END( node );
     
    912870        MUTATE_START( node );
    913871
    914         maybeMutate_impl( node->block       , *this );
    915         maybeMutate_impl( node->handlers    , *this );
    916         maybeMutate_impl( node->finallyBlock, *this );
     872        maybeMutateRef( node->block       , *this );
     873        maybeMutateRef( node->handlers    , *this );
     874        maybeMutateRef( node->finallyBlock, *this );
    917875
    918876        MUTATE_END( Statement, node );
     
    927885                // catch statements introduce a level of scope (for the caught exception)
    928886                auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } );
    929                 maybeAccept_impl( node->decl, *this );
     887                maybeAccept( node->decl, *this );
    930888                node->cond = visitExpression( node->cond );
    931889                node->body = visitStatement ( node->body );
     
    940898                // catch statements introduce a level of scope (for the caught exception)
    941899                auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } );
    942                 maybeMutate_impl( node->decl, *this );
     900                maybeMutateRef( node->decl, *this );
    943901                node->cond = mutateExpression( node->cond );
    944902                node->body = mutateStatement ( node->body );
     
    1014972
    1015973        indexerScopedAccept( node->result  , *this );
    1016         maybeAccept_impl        ( node->function, *this );
    1017         maybeAccept_impl        ( node->args    , *this );
     974        maybeAccept        ( node->function, *this );
     975        maybeAccept        ( node->args    , *this );
    1018976
    1019977        VISIT_END( node );
     
    1026984        indexerScopedMutate( node->env     , *this );
    1027985        indexerScopedMutate( node->result  , *this );
    1028         maybeMutate_impl   ( node->function, *this );
    1029         maybeMutate_impl   ( node->args    , *this );
     986        maybeMutateRef     ( node->function, *this );
     987        maybeMutateRef     ( node->args    , *this );
    1030988
    1031989        MUTATE_END( Expression, node );
     
    1038996        VISIT_START( node );
    1039997
    1040         // maybeAccept_impl( node->get_env(), *this );
     998        // maybeAccept( node->get_env(), *this );
    1041999        indexerScopedAccept( node->result, *this );
    10421000
     
    10901048
    10911049        indexerScopedAccept( node->result, *this );
    1092         maybeAccept_impl        ( node->arg   , *this );
     1050        maybeAccept        ( node->arg   , *this );
    10931051
    10941052        VISIT_END( node );
     
    11011059        indexerScopedMutate( node->env   , *this );
    11021060        indexerScopedMutate( node->result, *this );
    1103         maybeMutate_impl   ( node->arg   , *this );
     1061        maybeMutateRef     ( node->arg   , *this );
    11041062
    11051063        MUTATE_END( Expression, node );
     
    11131071
    11141072        indexerScopedAccept( node->result, *this );
    1115         maybeAccept_impl( node->arg, *this );
     1073        maybeAccept( node->arg, *this );
    11161074
    11171075        VISIT_END( node );
     
    11241082        indexerScopedMutate( node->env   , *this );
    11251083        indexerScopedMutate( node->result, *this );
    1126         maybeMutate_impl   ( node->arg   , *this );
     1084        maybeMutateRef     ( node->arg   , *this );
    11271085
    11281086        MUTATE_END( Expression, node );
     
    11361094
    11371095        indexerScopedAccept( node->result, *this );
    1138         maybeAccept_impl   ( node->arg   , *this );
     1096        maybeAccept        ( node->arg   , *this );
    11391097
    11401098        VISIT_END( node );
     
    11471105        indexerScopedMutate( node->env   , *this );
    11481106        indexerScopedMutate( node->result, *this );
    1149         maybeMutate_impl   ( node->arg   , *this );
     1107        maybeMutateRef     ( node->arg   , *this );
    11501108
    11511109        MUTATE_END( Expression, node );
     
    11801138
    11811139        indexerScopedAccept( node->result   , *this );
    1182         maybeAccept_impl   ( node->aggregate, *this );
    1183         maybeAccept_impl   ( node->member   , *this );
     1140        maybeAccept        ( node->aggregate, *this );
     1141        maybeAccept        ( node->member   , *this );
    11841142
    11851143        VISIT_END( node );
     
    11921150        indexerScopedMutate( node->env      , *this );
    11931151        indexerScopedMutate( node->result   , *this );
    1194         maybeMutate_impl   ( node->aggregate, *this );
    1195         maybeMutate_impl   ( node->member   , *this );
     1152        maybeMutateRef     ( node->aggregate, *this );
     1153        maybeMutateRef     ( node->member   , *this );
    11961154
    11971155        MUTATE_END( Expression, node );
     
    12051163
    12061164        indexerScopedAccept( node->result   , *this );
    1207         maybeAccept_impl   ( node->aggregate, *this );
     1165        maybeAccept        ( node->aggregate, *this );
    12081166
    12091167        VISIT_END( node );
     
    12161174        indexerScopedMutate( node->env      , *this );
    12171175        indexerScopedMutate( node->result   , *this );
    1218         maybeMutate_impl   ( node->aggregate, *this );
     1176        maybeMutateRef     ( node->aggregate, *this );
    12191177
    12201178        MUTATE_END( Expression, node );
     
    12491207
    12501208        indexerScopedAccept( node->result   , *this );
    1251         maybeAccept_impl   ( &node->constant, *this );
     1209        maybeAccept        ( &node->constant, *this );
    12521210
    12531211        VISIT_END( node );
     
    12601218        indexerScopedMutate( node->env   , *this );
    12611219        indexerScopedMutate( node->result, *this );
    1262         Constant * ptr = &node->constant;
    1263         maybeMutate_impl( ptr, *this );
    1264         node->constant = *ptr;
     1220        node->constant = *maybeMutate( &node->constant, *this );
    12651221
    12661222        MUTATE_END( Expression, node );
     
    12751231        indexerScopedAccept( node->result, *this );
    12761232        if ( node->get_isType() ) {
    1277                 maybeAccept_impl( node->type, *this );
     1233                maybeAccept( node->type, *this );
    12781234        } else {
    1279                 maybeAccept_impl( node->expr, *this );
     1235                maybeAccept( node->expr, *this );
    12801236        }
    12811237
     
    12901246        indexerScopedMutate( node->result, *this );
    12911247        if ( node->get_isType() ) {
    1292                 maybeMutate_impl( node->type, *this );
     1248                maybeMutateRef( node->type, *this );
    12931249        } else {
    1294                 maybeMutate_impl( node->expr, *this );
     1250                maybeMutateRef( node->expr, *this );
    12951251        }
    12961252
     
    13061262        indexerScopedAccept( node->result, *this );
    13071263        if ( node->get_isType() ) {
    1308                 maybeAccept_impl( node->type, *this );
     1264                maybeAccept( node->type, *this );
    13091265        } else {
    1310                 maybeAccept_impl( node->expr, *this );
     1266                maybeAccept( node->expr, *this );
    13111267        }
    13121268
     
    13211277        indexerScopedMutate( node->result, *this );
    13221278        if ( node->get_isType() ) {
    1323                 maybeMutate_impl( node->type, *this );
     1279                maybeMutateRef( node->type, *this );
    13241280        } else {
    1325                 maybeMutate_impl( node->expr, *this );
     1281                maybeMutateRef( node->expr, *this );
    13261282        }
    13271283
     
    13361292
    13371293        indexerScopedAccept( node->result, *this );
    1338         maybeAccept_impl   ( node->type  , *this );
     1294        maybeAccept        ( node->type  , *this );
    13391295
    13401296        VISIT_END( node );
     
    13471303        indexerScopedMutate( node->env   , *this );
    13481304        indexerScopedMutate( node->result, *this );
    1349         maybeMutate_impl   ( node->type  , *this );
     1305        maybeMutateRef     ( node->type  , *this );
    13501306
    13511307        MUTATE_END( Expression, node );
     
    13591315
    13601316        indexerScopedAccept( node->result, *this );
    1361         maybeAccept_impl   ( node->type  , *this );
    1362         maybeAccept_impl   ( node->member, *this );
     1317        maybeAccept        ( node->type  , *this );
     1318        maybeAccept        ( node->member, *this );
    13631319
    13641320        VISIT_END( node );
     
    13711327        indexerScopedMutate( node->env   , *this );
    13721328        indexerScopedMutate( node->result, *this );
    1373         maybeMutate_impl   ( node->type  , *this );
    1374         maybeMutate_impl   ( node->member, *this );
     1329        maybeMutateRef     ( node->type  , *this );
     1330        maybeMutateRef     ( node->member, *this );
    13751331
    13761332        MUTATE_END( Expression, node );
     
    13841340
    13851341        indexerScopedAccept( node->result, *this );
    1386         maybeAccept_impl   ( node->type  , *this );
     1342        maybeAccept        ( node->type  , *this );
    13871343
    13881344        VISIT_END( node );
     
    13951351        indexerScopedMutate( node->env   , *this );
    13961352        indexerScopedMutate( node->result, *this );
    1397         maybeMutate_impl   ( node->type  , *this );
     1353        maybeMutateRef     ( node->type  , *this );
    13981354
    13991355        MUTATE_END( Expression, node );
     
    14081364        indexerScopedAccept( node->result, *this );
    14091365        if ( node->get_isType() ) {
    1410                 maybeAccept_impl( node->type, *this );
     1366                maybeAccept( node->type, *this );
    14111367        } else {
    1412                 maybeAccept_impl( node->expr, *this );
     1368                maybeAccept( node->expr, *this );
    14131369        }
    14141370
     
    14231379        indexerScopedMutate( node->result, *this );
    14241380        if ( node->get_isType() ) {
    1425                 maybeMutate_impl( node->type, *this );
     1381                maybeMutateRef( node->type, *this );
    14261382        } else {
    1427                 maybeMutate_impl( node->expr, *this );
     1383                maybeMutateRef( node->expr, *this );
    14281384        }
    14291385
     
    14381394
    14391395        indexerScopedAccept( node->result, *this );
    1440         maybeAccept_impl   ( node->arg1  , *this );
    1441         maybeAccept_impl   ( node->arg2  , *this );
     1396        maybeAccept        ( node->arg1  , *this );
     1397        maybeAccept        ( node->arg2  , *this );
    14421398
    14431399        VISIT_END( node );
     
    14501406        indexerScopedMutate( node->env   , *this );
    14511407        indexerScopedMutate( node->result, *this );
    1452         maybeMutate_impl   ( node->arg1  , *this );
    1453         maybeMutate_impl   ( node->arg2  , *this );
     1408        maybeMutateRef     ( node->arg1  , *this );
     1409        maybeMutateRef     ( node->arg2  , *this );
    14541410
    14551411        MUTATE_END( Expression, node );
     
    14631419
    14641420        indexerScopedAccept( node->result, *this );
    1465         maybeAccept_impl        ( node->arg1  , *this );
    1466         maybeAccept_impl        ( node->arg2  , *this );
    1467         maybeAccept_impl        ( node->arg3  , *this );
     1421        maybeAccept        ( node->arg1  , *this );
     1422        maybeAccept        ( node->arg2  , *this );
     1423        maybeAccept        ( node->arg3  , *this );
    14681424
    14691425        VISIT_END( node );
     
    14761432        indexerScopedMutate( node->env   , *this );
    14771433        indexerScopedMutate( node->result, *this );
    1478         maybeMutate_impl   ( node->arg1  , *this );
    1479         maybeMutate_impl   ( node->arg2  , *this );
    1480         maybeMutate_impl   ( node->arg3  , *this );
     1434        maybeMutateRef     ( node->arg1  , *this );
     1435        maybeMutateRef     ( node->arg2  , *this );
     1436        maybeMutateRef     ( node->arg3  , *this );
    14811437
    14821438        MUTATE_END( Expression, node );
     
    14901446
    14911447        indexerScopedAccept( node->result, *this );
    1492         maybeAccept_impl   ( node->arg1  , *this );
    1493         maybeAccept_impl   ( node->arg2  , *this );
     1448        maybeAccept        ( node->arg1  , *this );
     1449        maybeAccept        ( node->arg2  , *this );
    14941450
    14951451        VISIT_END( node );
     
    15021458        indexerScopedMutate( node->env   , *this );
    15031459        indexerScopedMutate( node->result, *this );
    1504         maybeMutate_impl   ( node->arg1  , *this );
    1505         maybeMutate_impl   ( node->arg2  , *this );
     1460        maybeMutateRef     ( node->arg1  , *this );
     1461        maybeMutateRef     ( node->arg2  , *this );
    15061462
    15071463        MUTATE_END( Expression, node );
     
    15151471
    15161472        indexerScopedAccept( node->result, *this );
    1517         maybeAccept_impl   ( node->type, *this );
     1473        maybeAccept        ( node->type, *this );
    15181474
    15191475        VISIT_END( node );
     
    15261482        indexerScopedMutate( node->env   , *this );
    15271483        indexerScopedMutate( node->result, *this );
    1528         maybeMutate_impl   ( node->type  , *this );
     1484        maybeMutateRef     ( node->type  , *this );
    15291485
    15301486        MUTATE_END( Expression, node );
     
    15381494
    15391495        indexerScopedAccept( node->result    , *this );
    1540         maybeAccept_impl   ( node->inout     , *this );
    1541         maybeAccept_impl   ( node->constraint, *this );
    1542         maybeAccept_impl   ( node->operand   , *this );
     1496        maybeAccept        ( node->inout     , *this );
     1497        maybeAccept        ( node->constraint, *this );
     1498        maybeAccept        ( node->operand   , *this );
    15431499
    15441500        VISIT_END( node );
     
    15511507        indexerScopedMutate( node->env       , *this );
    15521508        indexerScopedMutate( node->result    , *this );
    1553         maybeMutate_impl   ( node->inout     , *this );
    1554         maybeMutate_impl   ( node->constraint, *this );
    1555         maybeMutate_impl   ( node->operand   , *this );
     1509        maybeMutateRef     ( node->inout     , *this );
     1510        maybeMutateRef     ( node->constraint, *this );
     1511        maybeMutateRef     ( node->operand   , *this );
    15561512
    15571513        MUTATE_END( Expression, node );
     
    15651521
    15661522        indexerScopedAccept( node->result     , *this );
    1567         maybeAccept_impl   ( node->callExpr   , *this );
    1568         maybeAccept_impl   ( node->tempDecls  , *this );
    1569         maybeAccept_impl   ( node->returnDecls, *this );
    1570         maybeAccept_impl   ( node->dtors      , *this );
     1523        maybeAccept        ( node->callExpr   , *this );
     1524        maybeAccept        ( node->tempDecls  , *this );
     1525        maybeAccept        ( node->returnDecls, *this );
     1526        maybeAccept        ( node->dtors      , *this );
    15711527
    15721528        VISIT_END( node );
     
    15791535        indexerScopedMutate( node->env        , *this );
    15801536        indexerScopedMutate( node->result     , *this );
    1581         maybeMutate_impl   ( node->callExpr   , *this );
    1582         maybeMutate_impl   ( node->tempDecls  , *this );
    1583         maybeMutate_impl   ( node->returnDecls, *this );
    1584         maybeMutate_impl   ( node->dtors      , *this );
     1537        maybeMutateRef     ( node->callExpr   , *this );
     1538        maybeMutateRef     ( node->tempDecls  , *this );
     1539        maybeMutateRef     ( node->returnDecls, *this );
     1540        maybeMutateRef     ( node->dtors      , *this );
    15851541
    15861542        MUTATE_END( Expression, node );
     
    15941550
    15951551        indexerScopedAccept( node->result  , *this );
    1596         maybeAccept_impl   ( node->callExpr, *this );
     1552        maybeAccept        ( node->callExpr, *this );
    15971553
    15981554        VISIT_END( node );
     
    16051561        indexerScopedMutate( node->env     , *this );
    16061562        indexerScopedMutate( node->result  , *this );
    1607         maybeMutate_impl   ( node->callExpr, *this );
     1563        maybeMutateRef     ( node->callExpr, *this );
    16081564
    16091565        MUTATE_END( Expression, node );
     
    16171573
    16181574        indexerScopedAccept( node->result     , *this );
    1619         maybeAccept_impl   ( node->initializer, *this );
     1575        maybeAccept        ( node->initializer, *this );
    16201576
    16211577        VISIT_END( node );
     
    16281584        indexerScopedMutate( node->env        , *this );
    16291585        indexerScopedMutate( node->result     , *this );
    1630         maybeMutate_impl     ( node->initializer, *this );
     1586        maybeMutateRef     ( node->initializer, *this );
    16311587
    16321588        MUTATE_END( Expression, node );
     
    16401596
    16411597        indexerScopedAccept( node->result, *this );
    1642         maybeAccept_impl   ( node->low   , *this );
    1643         maybeAccept_impl   ( node->high  , *this );
     1598        maybeAccept        ( node->low   , *this );
     1599        maybeAccept        ( node->high  , *this );
    16441600
    16451601        VISIT_END( node );
     
    16521608        indexerScopedMutate( node->env   , *this );
    16531609        indexerScopedMutate( node->result, *this );
    1654         maybeMutate_impl   ( node->low   , *this );
    1655         maybeMutate_impl   ( node->high  , *this );
     1610        maybeMutateRef     ( node->low   , *this );
     1611        maybeMutateRef     ( node->high  , *this );
    16561612
    16571613        MUTATE_END( Expression, node );
     
    16651621
    16661622        indexerScopedAccept( node->result, *this );
    1667         maybeAccept_impl   ( node->exprs , *this );
     1623        maybeAccept        ( node->exprs , *this );
    16681624
    16691625        VISIT_END( node );
     
    16761632        indexerScopedMutate( node->env   , *this );
    16771633        indexerScopedMutate( node->result, *this );
    1678         maybeMutate_impl   ( node->exprs , *this );
     1634        maybeMutateRef     ( node->exprs , *this );
    16791635
    16801636        MUTATE_END( Expression, node );
     
    16881644
    16891645        indexerScopedAccept( node->result, *this );
    1690         maybeAccept_impl   ( node->exprs , *this );
     1646        maybeAccept          ( node->exprs , *this );
    16911647
    16921648        VISIT_END( node );
     
    16991655        indexerScopedMutate( node->env   , *this );
    17001656        indexerScopedMutate( node->result, *this );
    1701         maybeMutate_impl   ( node->exprs , *this );
     1657        maybeMutateRef     ( node->exprs , *this );
    17021658
    17031659        MUTATE_END( Expression, node );
     
    17111667
    17121668        indexerScopedAccept( node->result, *this );
    1713         maybeAccept_impl   ( node->tuple , *this );
     1669        maybeAccept        ( node->tuple , *this );
    17141670
    17151671        VISIT_END( node );
     
    17221678        indexerScopedMutate( node->env   , *this );
    17231679        indexerScopedMutate( node->result, *this );
    1724         maybeMutate_impl   ( node->tuple , *this );
     1680        maybeMutateRef     ( node->tuple , *this );
    17251681
    17261682        MUTATE_END( Expression, node );
     
    17341690
    17351691        indexerScopedAccept( node->result  , *this );
    1736         maybeAccept_impl   ( node->stmtExpr, *this );
     1692        maybeAccept        ( node->stmtExpr, *this );
    17371693
    17381694        VISIT_END( node );
     
    17451701        indexerScopedMutate( node->env     , *this );
    17461702        indexerScopedMutate( node->result  , *this );
    1747         maybeMutate_impl   ( node->stmtExpr, *this );
     1703        maybeMutateRef     ( node->stmtExpr, *this );
    17481704
    17491705        MUTATE_END( Expression, node );
     
    17621718
    17631719        indexerScopedAccept( node->result     , *this );
    1764         maybeAccept_impl   ( node->statements , *this );
    1765         maybeAccept_impl   ( node->returnDecls, *this );
    1766         maybeAccept_impl   ( node->dtors      , *this );
     1720        maybeAccept        ( node->statements , *this );
     1721        maybeAccept        ( node->returnDecls, *this );
     1722        maybeAccept        ( node->dtors      , *this );
    17671723
    17681724        VISIT_END( node );
     
    17791735
    17801736        indexerScopedMutate( node->result     , *this );
    1781         maybeMutate_impl   ( node->statements , *this );
    1782         maybeMutate_impl   ( node->returnDecls, *this );
    1783         maybeMutate_impl   ( node->dtors      , *this );
     1737        maybeMutateRef     ( node->statements , *this );
     1738        maybeMutateRef     ( node->returnDecls, *this );
     1739        maybeMutateRef     ( node->dtors      , *this );
    17841740
    17851741        MUTATE_END( Expression, node );
     
    17931749
    17941750        indexerScopedAccept( node->result, *this );
    1795         maybeAccept_impl   ( node->expr  , *this );
     1751        maybeAccept        ( node->expr  , *this );
    17961752
    17971753        VISIT_END( node );
     
    18041760        indexerScopedMutate( node->env   , *this );
    18051761        indexerScopedMutate( node->result, *this );
    1806         maybeMutate_impl   ( node->expr  , *this );
     1762        maybeMutateRef     ( node->expr  , *this );
    18071763
    18081764        MUTATE_END( Expression, node );
     
    18491805        {
    18501806                auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } );
    1851                 maybeAccept_impl( node->forall    , *this );
    1852                 maybeAccept_impl( node->parameters, *this );
     1807                maybeAccept( node->forall    , *this );
     1808                maybeAccept( node->parameters, *this );
    18531809        }
    18541810
     
    18641820        {
    18651821                auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } );
    1866                 maybeMutate_impl( node->forall    , *this );
    1867                 maybeMutate_impl( node->parameters, *this );
     1822                maybeMutateRef( node->forall    , *this );
     1823                maybeMutateRef( node->parameters, *this );
    18681824        }
    18691825
     
    18811837        {
    18821838                auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } );
    1883                 maybeAccept_impl( node->forall    , *this );
    1884                 maybeAccept_impl( node->parameters, *this );
     1839                maybeAccept( node->forall    , *this );
     1840                maybeAccept( node->parameters, *this );
    18851841        }
    18861842
     
    18961852        {
    18971853                auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } );
    1898                 maybeMutate_impl( node->forall    , *this );
    1899                 maybeMutate_impl( node->parameters, *this );
     1854                maybeMutateRef( node->forall    , *this );
     1855                maybeMutateRef( node->parameters, *this );
    19001856        }
    19011857
     
    19211877        VISIT_START( node );
    19221878
    1923         maybeAccept_impl( node->forall    , *this );
    1924         maybeAccept_impl( node->parameters, *this );
     1879        maybeAccept( node->forall    , *this );
     1880        maybeAccept( node->parameters, *this );
    19251881
    19261882        VISIT_END( node );
     
    19311887        MUTATE_START( node );
    19321888
    1933         maybeMutate_impl( node->forall    , *this );
    1934         maybeMutate_impl( node->parameters, *this );
     1889        maybeMutateRef( node->forall    , *this );
     1890        maybeMutateRef( node->parameters, *this );
    19351891
    19361892        MUTATE_END( Type, node );
     
    19781934        VISIT_START( node );
    19791935
    1980         maybeAccept_impl( node->get_designators(), *this );
     1936        maybeAccept( node->get_designators(), *this );
    19811937
    19821938        VISIT_END( node );
     
    19871943        MUTATE_START( node );
    19881944
    1989         maybeMutate_impl( node->get_designators(), *this );
     1945        maybeMutateRef( node->get_designators(), *this );
    19901946
    19911947        MUTATE_END( Designation, node );
  • src/Common/PassVisitor.proto.h

    re1ff775 r1155718  
    4646        ~bool_ref() = default;
    4747
    48         operator bool() { return m_ref ? *m_ref : true; }
     48        operator bool() { return *m_ref; }
    4949        bool operator=( bool val ) { return *m_ref = val; }
    5050
    5151private:
    5252
    53         friend class ChildrenGuard;
    54 
    55         bool * set( bool & val ) {
    56                 bool * prev = m_ref;
    57                 m_ref = &val;
    58                 return prev;
    59         }
    60 
    61         bool * m_ref = nullptr;
     53        template<typename pass>
     54        friend class PassVisitor;
     55
     56        void set( bool & val ) { m_ref = &val; };
     57
     58        bool * m_ref;
    6259};
    6360
    64 class ChildrenGuard {
    65 public:
    66 
    67         ChildrenGuard( bool_ref * ref )
    68                 : m_val ( true )
    69                 , m_prev( ref ? ref->set( m_val ) : nullptr )
    70                 , m_ref ( ref )
    71         {}
    72 
    73         ~ChildrenGuard() {
    74                 if( m_ref ) {
    75                         m_ref->set( *m_prev );
    76                 }
    77         }
    78 
    79         operator bool() { return m_val; }
    80 
    81 private:
    82         bool       m_val;
    83         bool     * m_prev;
    84         bool_ref * m_ref;
    85 };
     61template< typename TreeType, typename VisitorType >
     62inline void indexerScopedAccept( TreeType * tree, VisitorType & visitor ) {
     63        auto guard = makeFuncGuard(
     64                [&visitor]() { visitor.indexerScopeEnter(); },
     65                [&visitor]() { visitor.indexerScopeLeave(); }
     66        );
     67        maybeAccept( tree, visitor );
     68}
     69
     70template< typename TreeType, typename MutatorType >
     71inline void indexerScopedMutate( TreeType *& tree, MutatorType & mutator ) {
     72        auto guard = makeFuncGuard(
     73                [&mutator]() { mutator.indexerScopeEnter(); },
     74                [&mutator]() { mutator.indexerScopeLeave(); }
     75        );
     76        tree = maybeMutate( tree, mutator );
     77}
     78
     79template< typename TreeType, typename MutatorType >
     80inline void maybeMutateRef( TreeType *& tree, MutatorType & mutator ) {
     81        tree = maybeMutate( tree, mutator );
     82}
    8683
    8784//-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  • src/InitTweak/FixInit.cc

    re1ff775 r1155718  
    289289                        for ( std::list< Declaration * >::iterator i = translationUnit.begin(); i != translationUnit.end(); ++i ) {
    290290                                try {
    291                                         maybeMutate( *i, fixer );
     291                                        *i = maybeMutate( *i, fixer );
    292292                                        translationUnit.splice( i, fixer.pass.staticDtorDecls );
    293293                                } catch( SemanticError &e ) {
  • src/ResolvExpr/Resolver.cc

    re1ff775 r1155718  
    5353                void previsit( FunctionDecl *functionDecl );
    5454                void postvisit( FunctionDecl *functionDecl );
    55                 void previsit( ObjectDecl *objectDecll );
     55                void previsit( ObjectDecl *functionDecl );
    5656                void previsit( TypeDecl *typeDecl );
    5757                void previsit( EnumDecl * enumDecl );
     
    246246        }
    247247
     248
    248249        void Resolver::postvisit( FunctionDecl *functionDecl ) {
    249250                // default value expressions have an environment which shouldn't be there and trips up later passes.
  • src/SynTree/Constant.cc

    re1ff775 r1155718  
    7171}
    7272
    73 void Constant::print( std::ostream &os, int indent ) const {
     73void Constant::print( std::ostream &os ) const {
    7474        os << "(" << rep << " " << val.ival;
    7575        if ( type ) {
  • src/SynTree/Constant.h

    re1ff775 r1155718  
    1919#include <string>     // for string
    2020
    21 #include "BaseSyntaxNode.h"
    2221#include "Mutator.h"  // for Mutator
    2322#include "Visitor.h"  // for Visitor
     
    2524class Type;
    2625
    27 class Constant : public BaseSyntaxNode {
     26class Constant {
    2827  public:
    2928        Constant( Type * type, std::string rep, unsigned long long val );
     
    3130        Constant( const Constant & other );
    3231        virtual ~Constant();
    33 
    34         virtual Constant * clone() const { return new Constant( *this ); }
    3532
    3633        Type * get_type() { return type; }
     
    5754        virtual void accept( Visitor & v ) { v.visit( this ); }
    5855        virtual Constant * acceptMutator( Mutator & m ) { return m.mutate( this ); }
    59         virtual void print( std::ostream & os, int indent = 0 ) const;
     56        virtual void print( std::ostream & os ) const;
    6057  private:
    6158        Type * type;
Note: See TracChangeset for help on using the changeset viewer.