Changeset 65197c2 for src/Common
- Timestamp:
- Dec 5, 2017, 2:17:17 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, stuck-waitfor-destruct, with_gc
- Children:
- 971d9f2, a85e44c, c13e8dc8
- Parents:
- 12d2dc8 (diff), 866f560 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- src/Common
- Files:
-
- 3 edited
-
PassVisitor.h (modified) (3 diffs)
-
PassVisitor.impl.h (modified) (1 diff)
-
PassVisitor.proto.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/Common/PassVisitor.h
r12d2dc8 r65197c2 81 81 virtual void visit( FinallyStmt * finallyStmt ) override final; 82 82 virtual void visit( WaitForStmt * waitforStmt ) override final; 83 virtual void visit( WithStmt * withStmt ) override final; 83 84 virtual void visit( NullStmt * nullStmt ) override final; 84 85 virtual void visit( DeclStmt * declStmt ) override final; … … 172 173 virtual Statement * mutate( FinallyStmt * finallyStmt ) override final; 173 174 virtual Statement * mutate( WaitForStmt * waitforStmt ) override final; 175 virtual Statement * mutate( WithStmt * withStmt ) override final; 174 176 virtual NullStmt * mutate( NullStmt * nullStmt ) override final; 175 177 virtual Statement * mutate( DeclStmt * declStmt ) override final; … … 296 298 void indexerAddUnionFwd ( UnionDecl * node ) { indexer_impl_addUnionFwd ( pass, 0, node ); } 297 299 void indexerAddTrait ( TraitDecl * node ) { indexer_impl_addTrait ( pass, 0, node ); } 300 void indexerAddWith ( WithStmt * node ) { indexer_impl_addWith ( pass, 0, node ); } 301 298 302 299 303 template< typename TreeType, typename VisitorType > -
src/Common/PassVisitor.impl.h
r12d2dc8 r65197c2 985 985 } 986 986 987 988 989 //-------------------------------------------------------------------------- 990 // NullStmt 991 template< typename pass_type > 992 void PassVisitor< pass_type >::visit( WithStmt * node ) { 993 VISIT_START( node ); 994 maybeAccept_impl( node->exprs, *this ); 995 { 996 // catch statements introduce a level of scope (for the caught exception) 997 auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } ); 998 indexerAddWith( node ); 999 maybeAccept_impl( node->stmt, *this ); 1000 } 1001 VISIT_END( node ); 1002 } 1003 1004 template< typename pass_type > 1005 Statement * PassVisitor< pass_type >::mutate( WithStmt * node ) { 1006 MUTATE_START( node ); 1007 maybeMutate_impl( node->exprs, *this ); 1008 { 1009 // catch statements introduce a level of scope (for the caught exception) 1010 auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } ); 1011 indexerAddWith( node ); 1012 maybeMutate_impl( node->stmt, *this ); 1013 } 1014 MUTATE_END( Statement, node ); 1015 } 1016 987 1017 //-------------------------------------------------------------------------- 988 1018 // NullStmt -
src/Common/PassVisitor.proto.h
r12d2dc8 r65197c2 208 208 INDEXER_FUNC( addUnion , UnionDecl * ); 209 209 INDEXER_FUNC( addTrait , TraitDecl * ); 210 INDEXER_FUNC( addWith , WithStmt * ); 210 211 211 212
Note:
See TracChangeset
for help on using the changeset viewer.