Changeset 17fc7a5
- Timestamp:
- Feb 26, 2018, 11:03:13 AM (7 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:
- 45c43e5
- Parents:
- df7a162
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Common/PassVisitor.impl.h
rdf7a162 r17fc7a5 2013 2013 } 2014 2014 2015 2015 //-------------------------------------------------------------------------- 2016 // VoidType 2016 2017 template< typename pass_type > 2017 2018 void PassVisitor< pass_type >::visit( VoidType * node ) { … … 2032 2033 } 2033 2034 2035 //-------------------------------------------------------------------------- 2036 // BasicType 2034 2037 template< typename pass_type > 2035 2038 void PassVisitor< pass_type >::visit( BasicType * node ) { 2036 VISIT_BODY( node ); 2037 } 2038 2039 VISIT_START( node ); 2040 2041 maybeAccept_impl( node->forall, *this ); 2042 2043 VISIT_END( node ); 2044 } 2045 2046 template< typename pass_type > 2047 Type * PassVisitor< pass_type >::mutate( BasicType * node ) { 2048 MUTATE_START( node ); 2049 2050 maybeMutate_impl( node->forall, *this ); 2051 2052 MUTATE_END( Type, node ); 2053 } 2054 2055 //-------------------------------------------------------------------------- 2056 // PointerType 2039 2057 template< typename pass_type > 2040 2058 void PassVisitor< pass_type >::visit( PointerType * node ) { 2041 VISIT_BODY( node ); 2042 } 2043 2059 VISIT_START( node ); 2060 2061 maybeAccept_impl( node->forall, *this ); 2062 maybeAccept_impl( node->base, *this ); 2063 2064 VISIT_END( node ); 2065 } 2066 2067 template< typename pass_type > 2068 Type * PassVisitor< pass_type >::mutate( PointerType * node ) { 2069 MUTATE_START( node ); 2070 2071 maybeMutate_impl( node->forall, *this ); 2072 maybeMutate_impl( node->base, *this ); 2073 2074 MUTATE_END( Type, node ); 2075 } 2076 2077 //-------------------------------------------------------------------------- 2078 // ArrayType 2044 2079 template< typename pass_type > 2045 2080 void PassVisitor< pass_type >::visit( ArrayType * node ) { 2046 VISIT_BODY( node ); 2047 } 2048 2081 VISIT_START( node ); 2082 2083 maybeAccept_impl( node->forall, *this ); 2084 maybeAccept_impl( node->dimension, *this ); 2085 maybeAccept_impl( node->base, *this ); 2086 2087 VISIT_END( node ); 2088 } 2089 2090 template< typename pass_type > 2091 Type * PassVisitor< pass_type >::mutate( ArrayType * node ) { 2092 MUTATE_START( node ); 2093 2094 maybeMutate_impl( node->forall, *this ); 2095 maybeMutate_impl( node->dimension, *this ); 2096 maybeMutate_impl( node->base, *this ); 2097 2098 MUTATE_END( Type, node ); 2099 } 2100 2101 //-------------------------------------------------------------------------- 2102 // ReferenceType 2049 2103 template< typename pass_type > 2050 2104 void PassVisitor< pass_type >::visit( ReferenceType * node ) { 2051 VISIT_BODY( node ); 2052 } 2053 2105 VISIT_START( node ); 2106 2107 maybeAccept_impl( node->forall, *this ); 2108 maybeAccept_impl( node->base, *this ); 2109 2110 VISIT_END( node ); 2111 } 2112 2113 template< typename pass_type > 2114 Type * PassVisitor< pass_type >::mutate( ReferenceType * node ) { 2115 MUTATE_START( node ); 2116 2117 maybeMutate_impl( node->forall, *this ); 2118 maybeMutate_impl( node->base, *this ); 2119 2120 MUTATE_END( Type, node ); 2121 } 2122 2123 //-------------------------------------------------------------------------- 2124 // FunctionType 2054 2125 template< typename pass_type > 2055 2126 void PassVisitor< pass_type >::visit( FunctionType * node ) { 2056 VISIT_BODY( node ); 2127 VISIT_START( node ); 2128 2129 maybeAccept_impl( node->forall, *this ); 2130 maybeAccept_impl( node->returnVals, *this ); 2131 maybeAccept_impl( node->parameters, *this ); 2132 2133 VISIT_END( node ); 2134 } 2135 2136 template< typename pass_type > 2137 Type * PassVisitor< pass_type >::mutate( FunctionType * node ) { 2138 MUTATE_START( node ); 2139 2140 maybeMutate_impl( node->forall, *this ); 2141 maybeMutate_impl( node->returnVals, *this ); 2142 maybeMutate_impl( node->parameters, *this ); 2143 2144 MUTATE_END( Type, node ); 2057 2145 } 2058 2146 … … 2258 2346 2259 2347 template< typename pass_type > 2260 Type * PassVisitor< pass_type >::mutate( BasicType * node ) {2261 MUTATE_BODY( Type, node );2262 }2263 2264 template< typename pass_type >2265 Type * PassVisitor< pass_type >::mutate( PointerType * node ) {2266 MUTATE_BODY( Type, node );2267 }2268 2269 template< typename pass_type >2270 Type * PassVisitor< pass_type >::mutate( ArrayType * node ) {2271 MUTATE_BODY( Type, node );2272 }2273 2274 template< typename pass_type >2275 Type * PassVisitor< pass_type >::mutate( ReferenceType * node ) {2276 MUTATE_BODY( Type, node );2277 }2278 2279 template< typename pass_type >2280 Type * PassVisitor< pass_type >::mutate( FunctionType * node ) {2281 MUTATE_BODY( Type, node );2282 }2283 2284 template< typename pass_type >2285 2348 Type * PassVisitor< pass_type >::mutate( TypeInstType * node ) { 2286 2349 MUTATE_BODY( Type, node );
Note: See TracChangeset
for help on using the changeset viewer.