Changeset 2a7b3ca for src/Common
- Timestamp:
- Jun 26, 2017, 4:13:36 PM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 579263a, 949934e
- Parents:
- d24d4e1
- Location:
- src/Common
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Common/PassVisitor.h
rd24d4e1 r2a7b3ca 12 12 #include "SynTree/Expression.h" 13 13 #include "SynTree/Constant.h" 14 #include "SynTree/TypeSubstitution.h" 14 15 15 16 #include "PassVisitor.proto.h" -
src/Common/PassVisitor.impl.h
rd24d4e1 r2a7b3ca 105 105 SemanticError errors; 106 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 () ); 112 107 113 StmtList_t* beforeStmts = get_beforeStmts(); 108 114 StmtList_t* afterStmts = get_afterStmts(); … … 565 571 VISIT_START( node ); 566 572 573 // maybeAccept( node->get_env(), *this ); 574 maybeAccept( node->get_result(), *this ); 575 567 576 for ( auto expr : node->get_args() ) { 568 577 visitExpression( expr ); … … 575 584 Expression * PassVisitor< pass_type >::mutate( UntypedExpr * node ) { 576 585 MUTATE_START( node ); 586 587 node->set_env( maybeMutate( node->get_env(), *this ) ); 588 node->set_result( maybeMutate( node->get_result(), *this ) ); 577 589 578 590 for ( auto& expr : node->get_args() ) { -
src/Common/PassVisitor.proto.h
rd24d4e1 r2a7b3ca 56 56 // Deep magic (a.k.a template meta programming) to make the templated visitor work 57 57 // Basically the goal is to make 2 previsit_impl 58 // 1 - Use when a pass implements a valid previsit. This uses overloading which means the any overload of 58 // 1 - Use when a pass implements a valid previsit. This uses overloading which means the any overload of 59 59 // 'pass.previsit( node )' that compiles will be used for that node for that type 60 60 // This requires that this option only compile for passes that actually define an appropriate visit.
Note:
See TracChangeset
for help on using the changeset viewer.