Ignore:
File:
1 edited

Legend:

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

    r62423350 r6ca154b  
    33#define VISIT_START( node )                     \
    44        __attribute__((unused))                   \
    5         guard_value_impl guard( at_cleanup_impl(pass, 0) );       \
     5        const auto & guard = init_guard();        \
    66        bool visit_children = true;               \
    77        set_visit_children( visit_children );   \
     
    1515#define MUTATE_START( node )                    \
    1616        __attribute__((unused))                   \
    17         guard_value_impl guard( at_cleanup_impl(pass, 0) );       \
     17        const auto & guard = init_guard();        \
    1818        bool visit_children = true;               \
    1919        set_visit_children( visit_children );   \
     
    6868        for ( std::list< Declaration* >::iterator i = decls.begin(); ; ++i ) {
    6969                // splice in new declarations after previous decl
    70                 if ( !empty( afterDecls ) ) { decls.splice( i, *afterDecls ); }
     70                if ( !empty( afterDecls ) ) { decls.splice( i, *afterDecls ); } 
    7171
    7272                if ( i == decls.end() ) break;
     
    8888        for ( std::list< Declaration* >::iterator i = decls.begin(); ; ++i ) {
    8989                // splice in new declarations after previous decl
    90                 if ( !empty( afterDecls ) ) { decls.splice( i, *afterDecls ); }
     90                if ( !empty( afterDecls ) ) { decls.splice( i, *afterDecls ); } 
    9191
    9292                if ( i == decls.end() ) break;
     
    104104void PassVisitor< pass_type >::handleStatementList( std::list< Statement * > & statements, func_t func ) {
    105105        SemanticError errors;
    106 
    107         // don't want statements from outer CompoundStmts to be added to this CompoundStmt
    108         ValueGuardPtr< StmtList_t > oldBeforeStmts( get_beforeStmts() );
    109         ValueGuardPtr< StmtList_t > oldAfterStmts ( get_afterStmts () );
    110         ValueGuardPtr< DeclList_t > oldBeforeDecls( get_beforeDecls() );
    111         ValueGuardPtr< DeclList_t > oldAfterDecls ( get_afterDecls () );
    112106
    113107        StmtList_t* beforeStmts = get_beforeStmts();
     
    187181Statement * PassVisitor< pass_type >::visitStatement( Statement * stmt ) {
    188182        return handleStatement( stmt, [this]( Statement * stmt ) {
    189                 maybeAccept( stmt, *this );
     183                maybeAccept( stmt, *this ); 
    190184                return stmt;
    191185        });
     
    218212                expr->accept( *this );
    219213                return expr;
    220         });
     214        });             
    221215}
    222216
     
    571565        VISIT_START( node );
    572566
    573         // maybeAccept( node->get_env(), *this );
    574         maybeAccept( node->get_result(), *this );
    575 
    576567        for ( auto expr : node->get_args() ) {
    577568                visitExpression( expr );
     
    584575Expression * PassVisitor< pass_type >::mutate( UntypedExpr * node ) {
    585576        MUTATE_START( node );
    586 
    587         node->set_env( maybeMutate( node->get_env(), *this ) );
    588         node->set_result( maybeMutate( node->get_result(), *this ) );
    589577
    590578        for ( auto& expr : node->get_args() ) {
Note: See TracChangeset for help on using the changeset viewer.