Changes in src/Common/PassVisitor.impl.h [d8893ca:73367a8]
- File:
-
- 1 edited
-
src/Common/PassVisitor.impl.h (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Common/PassVisitor.impl.h
rd8893ca r73367a8 55 55 it, 56 56 [](Declaration * decl) -> auto { 57 return new DeclStmt( noLabels,decl );57 return new DeclStmt( decl ); 58 58 } 59 59 ); … … 62 62 63 63 template< typename pass_type > 64 staticinline void acceptAll( std::list< Declaration* > &decls, PassVisitor< pass_type >& visitor ) {64 inline void acceptAll( std::list< Declaration* > &decls, PassVisitor< pass_type >& visitor ) { 65 65 DeclList_t* beforeDecls = visitor.get_beforeDecls(); 66 66 DeclList_t* afterDecls = visitor.get_afterDecls(); … … 90 90 91 91 template< typename pass_type > 92 staticinline void mutateAll( std::list< Declaration* > &decls, PassVisitor< pass_type >& mutator ) {92 inline void mutateAll( std::list< Declaration* > &decls, PassVisitor< pass_type >& mutator ) { 93 93 DeclList_t* beforeDecls = mutator.get_beforeDecls(); 94 94 DeclList_t* afterDecls = mutator.get_afterDecls(); … … 251 251 || ( empty( beforeDecls ) && empty( afterDecls )) ); 252 252 253 CompoundStmt *compound = new CompoundStmt( noLabels);253 CompoundStmt *compound = new CompoundStmt(); 254 254 if( !empty(beforeDecls) ) { splice( std::back_inserter( compound->get_kids() ), beforeDecls ); } 255 255 if( !empty(beforeStmts) ) { compound->get_kids().splice( compound->get_kids().end(), *beforeStmts ); } … … 1853 1853 } 1854 1854 1855 //-------------------------------------------------------------------------- 1856 // UntypedInitExpr 1857 template< typename pass_type > 1858 void PassVisitor< pass_type >::visit( UntypedInitExpr * node ) { 1859 VISIT_START( node ); 1860 1861 indexerScopedAccept( node->result, *this ); 1862 maybeAccept_impl ( node->expr , *this ); 1863 // not currently visiting initAlts, but this doesn't matter since this node is only used in the resolver. 1864 1865 VISIT_END( node ); 1866 } 1867 1868 template< typename pass_type > 1869 Expression * PassVisitor< pass_type >::mutate( UntypedInitExpr * node ) { 1870 MUTATE_START( node ); 1871 1872 indexerScopedMutate( node->env , *this ); 1873 indexerScopedMutate( node->result, *this ); 1874 maybeMutate_impl ( node->expr , *this ); 1875 // not currently visiting initAlts, but this doesn't matter since this node is only used in the resolver. 1876 1877 MUTATE_END( Expression, node ); 1878 } 1879 1880 //-------------------------------------------------------------------------- 1881 // InitExpr 1882 template< typename pass_type > 1883 void PassVisitor< pass_type >::visit( InitExpr * node ) { 1884 VISIT_START( node ); 1885 1886 indexerScopedAccept( node->result, *this ); 1887 maybeAccept_impl ( node->expr , *this ); 1888 maybeAccept_impl ( node->designation, *this ); 1889 1890 VISIT_END( node ); 1891 } 1892 1893 template< typename pass_type > 1894 Expression * PassVisitor< pass_type >::mutate( InitExpr * node ) { 1895 MUTATE_START( node ); 1896 1897 indexerScopedMutate( node->env , *this ); 1898 indexerScopedMutate( node->result, *this ); 1899 maybeMutate_impl ( node->expr , *this ); 1900 maybeMutate_impl ( node->designation, *this ); 1901 1902 MUTATE_END( Expression, node ); 1903 } 1904 1855 1905 template< typename pass_type > 1856 1906 void PassVisitor< pass_type >::visit( VoidType * node ) {
Note:
See TracChangeset
for help on using the changeset viewer.