Changes in / [47dd0d2:9617533]
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Pass.hpp
r47dd0d2 r9617533 48 48 // 49 49 // Several additional features are available through inheritance 50 // | PureVisitor - makes the visitor pure, it never modifies nodes in place and always 51 // clones nodes it needs to make changes to 50 52 // | WithTypeSubstitution - provides polymorphic const TypeSubstitution * env for the 51 53 // current expression … … 267 269 /// Keep track of the polymorphic const TypeSubstitution * env for the current expression 268 270 269 /// marker to force shallow copies in pass visit271 /// If used the visitor will always clone nodes. 270 272 struct PureVisitor {}; 271 273 -
src/AST/Pass.impl.hpp
r47dd0d2 r9617533 21 21 22 22 #include "AST/TypeSubstitution.hpp" 23 // #include "AST/Copy.hpp"24 23 25 24 #define VISIT_START( node ) \ … … 329 328 330 329 if( __pass::differs(old_val, new_val) ) { 331 // auto new_parent = mutate(parent);332 330 auto new_parent = __pass::mutate<core_t>(parent); 333 331 new_parent->*child = new_val; -
src/AST/TypeSubstitution.hpp
r47dd0d2 r9617533 46 46 template< typename SynTreeClass > 47 47 struct ApplyResult { 48 // const SynTreeClass * node;49 48 ast::ptr<SynTreeClass> node; 50 49 int count; … … 187 186 assert( input ); 188 187 Pass<Substituter> sub( *this, false ); 189 // input = strict_dynamic_cast< const SynTreeClass * >( deepCopy(input)->accept( sub ) );190 188 input = strict_dynamic_cast< const SynTreeClass * >( input->accept( sub ) ); 191 189 return { input, sub.core.subCount }; … … 196 194 assert( input ); 197 195 Pass<Substituter> sub( *this, true ); 198 // input = strict_dynamic_cast< const SynTreeClass * >( deepCopy(input)->accept( sub ) );199 196 input = strict_dynamic_cast< const SynTreeClass * >( input->accept( sub ) ); 200 197 return { input, sub.core.subCount }; -
src/ResolvExpr/Unify.cc
r47dd0d2 r9617533 1113 1113 ast::Pass<TtypeExpander_new> expander{ tenv }; 1114 1114 1115 // ast::ptr<ast::TupleType> tuplec = tuple;1116 // ast::ptr<ast::TupleType> tuple2c = tuple2;1117 1115 const ast::Type * flat = tuple->accept( expander ); 1118 1116 const ast::Type * flat2 = tuple2->accept( expander ); -
tests/errors/.expect/completeType.x86.txt
r47dd0d2 r9617533 6 6 Name: x 7 7 8 ... to: nothing 9 with resolved type: 10 void Alternatives are: 8 ... to: nothing Alternatives are: 11 9 Cost ( 0, 1, 2, 0, 1, -1, 0 ): Generated Cast of: 12 10 Application of … … 22 20 23 21 24 with resolved type:25 pointer to forall26 _89_4_DT: data type27 function28 ... with parameters29 intrinsic pointer to instance of type _89_4_DT (not function type)30 ... returning31 _retval__operator_deref: reference to instance of type _89_4_DT (not function type)32 ... with attributes:33 Attribute with name: unused34 35 36 22 ... to arguments 37 23 Variable Expression: x: pointer to instance of struct A with body 0 38 with resolved type:39 pointer to instance of struct A with body 040 24 41 with resolved type:42 reference to instance of struct A with body 043 25 ... to: nothing 44 with resolved type:45 void46 26 (types: 47 27 void … … 63 43 64 44 65 with resolved type:66 pointer to forall67 _89_4_DT: data type68 function69 ... with parameters70 intrinsic pointer to instance of type _89_4_DT (not function type)71 ... returning72 _retval__operator_deref: reference to instance of type _89_4_DT (not function type)73 ... with attributes:74 Attribute with name: unused75 76 77 45 ... to arguments 78 46 Variable Expression: x: pointer to instance of struct B with body 1 79 with resolved type:80 pointer to instance of struct B with body 181 47 82 with resolved type:83 reference to instance of struct B with body 184 48 ... to: nothing 85 with resolved type:86 void87 49 (types: 88 50 void … … 159 121 ... returning nothing 160 122 161 with resolved type:162 pointer to forall163 _108_0_T: sized data type164 ... with assertions165 ?=?: pointer to function166 ... with parameters167 reference to instance of type _108_0_T (not function type)168 instance of type _108_0_T (not function type)169 ... returning170 _retval__operator_assign: instance of type _108_0_T (not function type)171 ... with attributes:172 Attribute with name: unused173 174 175 ?{}: pointer to function176 ... with parameters177 reference to instance of type _108_0_T (not function type)178 ... returning nothing179 180 ?{}: pointer to function181 ... with parameters182 reference to instance of type _108_0_T (not function type)183 instance of type _108_0_T (not function type)184 ... returning nothing185 186 ^?{}: pointer to function187 ... with parameters188 reference to instance of type _108_0_T (not function type)189 ... returning nothing190 191 192 function193 ... with parameters194 pointer to instance of type _108_0_T (not function type)195 ... returning nothing196 197 123 ... to arguments 198 124 Variable Expression: z: pointer to instance of type T (not function type) 199 with resolved type:200 pointer to instance of type T (not function type)201 125 202 with resolved type:203 void204 126 (types: 205 127 void
Note: See TracChangeset
for help on using the changeset viewer.