Changes in src/Common/PassVisitor.h [b73bd70:6ca154b]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Common/PassVisitor.h
rb73bd70 r6ca154b 25 25 // | WithStmtsToAdd - provides the ability to insert statements before or after the current statement by adding new statements into 26 26 // stmtsToAddBefore or stmtsToAddAfter respectively. 27 // | WithShortCircuiting - provides the ability to skip visiting child nodes; set skip_children to true ifpre{visit,mutate} to skip visiting children27 // | WithShortCircuiting - provides the ability to skip visiting child nodes; set visit_children to false in pre{visit,mutate} to skip visiting children 28 28 // | WithScopes - provides the ability to save/restore data like a LIFO stack; to save, call GuardValue with the variable to save, the variable 29 29 // will automatically be restored to its previous value after the corresponding postvisit/postmutate teminates. … … 220 220 221 221 private: 222 template<typename pass_t> friend void acceptAll( std::list< Declaration* > &decls, PassVisitor< pass_t >& visitor ); 223 template<typename pass_t> friend void mutateAll( std::list< Declaration* > &decls, PassVisitor< pass_t >& visitor ); 224 222 225 template<typename node_type> void call_previsit ( node_type * node ) { previsit_impl ( pass, node, 0 ); } 223 226 template<typename node_type> void call_postvisit( node_type * node ) { postvisit_impl( pass, node, 0 ); } … … 231 234 void set_env( TypeSubstitution * env ) { set_env_impl( pass, env, 0); } 232 235 233 void visitStatementList( std::list< Statement* > &statements ); 236 template< typename func_t > 237 void handleStatementList( std::list< Statement * > & statements, func_t func ); 238 void visitStatementList ( std::list< Statement* > &statements ); 234 239 void mutateStatementList( std::list< Statement* > &statements ); 235 240 236 Statement * visitStatement( Statement * stmt ); 241 template< typename func_t > 242 Statement * handleStatement( Statement * stmt, func_t func ); 243 Statement * visitStatement ( Statement * stmt ); 237 244 Statement * mutateStatement( Statement * stmt ); 238 245 239 void visitExpression( Expression * expr ); 246 template< typename func_t > 247 Expression * handleExpression( Expression * expr, func_t func ); 248 Expression * visitExpression ( Expression * expr ); 240 249 Expression * mutateExpression( Expression * expr ); 241 250
Note: See TracChangeset
for help on using the changeset viewer.