Changes in / [b5629d8:f0d67e5]
- Files:
-
- 4 added
- 9 deleted
- 38 edited
-
libcfa/src/bits/collection.hfa (modified) (4 diffs)
-
libcfa/src/bits/queue.hfa (modified) (7 diffs)
-
libcfa/src/bits/queue_example.cfa (modified) (2 diffs)
-
libcfa/src/bits/sequence.hfa (modified) (13 diffs)
-
libcfa/src/bits/sequence_example.cfa (modified) (3 diffs)
-
libcfa/src/bits/stack.hfa (modified) (5 diffs)
-
libcfa/src/bits/stack_example.cfa (modified) (2 diffs)
-
src/AST/Print.cpp (modified) (3 diffs)
-
src/AST/Type.cpp (modified) (2 diffs)
-
src/AST/Type.hpp (modified) (1 diff)
-
src/AST/TypeEnvironment.cpp (modified) (2 diffs)
-
src/Common/CodeLocation.h (modified) (1 diff)
-
src/Common/SemanticError.cc (modified) (1 diff)
-
src/ResolvExpr/AlternativeFinder.cc (modified) (2 diffs)
-
src/ResolvExpr/TypeEnvironment.cc (modified) (1 diff)
-
src/ResolvExpr/TypeEnvironment.h (modified) (1 diff)
-
src/SynTree/Expression.cc (modified) (1 diff)
-
src/SynTree/NamedTypeDecl.cc (modified) (2 diffs)
-
src/SynTree/ReferenceToType.cc (modified) (2 diffs)
-
src/SynTree/Type.cc (modified) (1 diff)
-
src/SynTree/Type.h (modified) (1 diff)
-
tests/.expect/KRfunctions.arm64.txt (added)
-
tests/.expect/KRfunctions.nast.arm64.txt (deleted)
-
tests/.expect/KRfunctions.oast.arm64.txt (deleted)
-
tests/.expect/alloc-ERROR.nast.txt (modified) (2 diffs)
-
tests/.expect/alloc-ERROR.oast.txt (modified) (2 diffs)
-
tests/.expect/attributes.arm64.txt (added)
-
tests/.expect/attributes.nast.arm64.txt (deleted)
-
tests/.expect/attributes.oast.arm64.txt (deleted)
-
tests/.expect/castError.nast.txt (deleted)
-
tests/.expect/castError.oast.txt (modified) (7 diffs)
-
tests/.expect/functions.arm64.txt (added)
-
tests/.expect/functions.nast.arm64.txt (deleted)
-
tests/.expect/functions.oast.arm64.txt (deleted)
-
tests/.expect/init1-ERROR.nast.txt (modified) (6 diffs)
-
tests/.expect/init1-ERROR.oast.txt (modified) (6 diffs)
-
tests/errors/.expect/completeType.arm64.txt (added)
-
tests/errors/.expect/completeType.nast.arm64.txt (deleted)
-
tests/errors/.expect/completeType.nast.x64.txt (modified) (4 diffs)
-
tests/errors/.expect/completeType.oast.arm64.txt (deleted)
-
tests/errors/.expect/completeType.oast.x64.txt (modified) (4 diffs)
-
tests/meta/.expect/archVast.nast.arm64.txt (modified) (3 diffs)
-
tests/meta/.expect/archVast.nast.x64.txt (modified) (3 diffs)
-
tests/meta/.expect/archVast.nast.x86.txt (modified) (3 diffs)
-
tests/meta/.expect/archVast.oast.arm64.txt (modified) (4 diffs)
-
tests/meta/.expect/archVast.oast.x64.txt (modified) (4 diffs)
-
tests/meta/.expect/archVast.oast.x86.txt (modified) (4 diffs)
-
tests/raii/.expect/ctor-autogen-ERR1.nast.txt (modified) (4 diffs)
-
tests/raii/.expect/ctor-autogen-ERR1.oast.txt (modified) (4 diffs)
-
tests/warnings/.expect/self-assignment.nast.txt (modified) (3 diffs)
-
tests/warnings/.expect/self-assignment.oast.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/bits/collection.hfa
rb5629d8 rf0d67e5 13 13 // return true iff *this is an element of a collection 14 14 bool listed( Colable & co ) with( co ) { // pre: this != 0 15 return next != 0 p;15 return next != 0; 16 16 } 17 17 … … 23 23 return cp->next; 24 24 } 25 26 forall( dtype T ) {27 T *& Next( T * n ) {28 return (T *)Next( (Colable *)n );29 }30 31 bool listed( T * n ) {32 return Next( (Colable *)n ) != 0p;33 }34 } // distribution35 25 } // distribution 36 37 26 38 27 struct Collection { … … 52 41 return root == 0p; 53 42 } 54 55 43 void * head( Collection & collection ) with( collection ) { 56 44 return root; … … 67 55 curr = 0p; 68 56 } // post: elts = null 69 70 forall( dtype T ) {71 T * Curr( ColIter & ci ) with( ci ) {72 return (T *)curr;73 }74 } // distribution75 57 } // distribution -
libcfa/src/bits/queue.hfa
rb5629d8 rf0d67e5 15 15 } // post: empty() & head() == 0 | !empty() & head() in *q 16 16 17 bool empty( Queue(T) & q ) with( q ) { // 0 <=> *q contains no elements 18 return empty( (Collection &)q ); 19 } 20 21 bool listed( T * n ) { 22 return Next( (Colable *)n ) != 0; 23 } 24 25 T *& Next( T * n ) { 26 return (T *)Next( (Colable *)n ); 27 } 28 29 T * Root( Queue(T) & q ) with( q ) { 30 return (T *)root; 31 } 32 17 33 void ?{}( Queue(T) &, const Queue(T) & ) = void; // no copy 18 34 Queue(T) & ?=?( const Queue(T) & ) = void; // no assignment … … 39 55 #endif // __CFA_DEBUG__ 40 56 if ( last ) { 41 Next( n ) = head( q );57 Next( n ) = Root( q ); 42 58 q.root = n; 43 59 } else { … … 65 81 if ( root ) { 66 82 root = Next( root ); 67 if ( head( q ) == t ) {83 if ( Root( q ) == t ) { 68 84 root = last = 0p; // only one element 69 85 } … … 116 132 root = from.root; 117 133 } else { // "to" list not empty 118 Next( last ) = head( from );134 Next( last ) = Root( from ); 119 135 } 120 136 last = from.last; … … 132 148 to.last = n; // end of "to" list 133 149 from.root = Next( n ); // start of "from" list 134 if ( n == head( from ) ) { // last node in list ?150 if ( n == Root( from ) ) { // last node in list ? 135 151 from.root = from.last = 0p; // mark "from" list empty 136 152 } else { … … 148 164 149 165 inline { 166 // wrappers to make ColIter have T 167 T * Curr( QueueIter(T) & qi ) with( qi ) { 168 return (T *)curr; 169 } 170 150 171 void ?{}( QueueIter(T) & qi ) with( qi ) { 151 172 ((ColIter &)qi){}; … … 166 187 } // post: curr = {e in q} 167 188 168 bool ?>>?( QueueIter(T) & qi, T && tp ) with( qi ) {189 bool ?>>?( QueueIter(T) & qi, T *& tp ) with( qi ) { 169 190 if ( curr ) { 170 &tp = Curr( qi );191 tp = Curr( qi ); 171 192 T * n = Next( Curr( qi ) ); 172 193 curr = (n == Curr( qi ) ) ? 0p : n; 173 } else &tp = 0p;174 return &tp != 0p;194 } else tp = 0p; 195 return tp != 0p; 175 196 } 176 197 // post: elts == null & !operator>>(tp) | elts != null & *tp' in elts & elts' == elts - *tp & operator>>(tp) -
libcfa/src/bits/queue_example.cfa
rb5629d8 rf0d67e5 17 17 Queue(Fred) fred; 18 18 QueueIter(Fred) fredIter = { fred }; 19 Fred & f; 19 Fred * f; 20 int i; 20 21 21 22 sout | nlOff; // turn off auto newline 22 23 23 24 for ( ; fredIter >> f; ) { // empty list 24 sout | f .i | ' ';25 sout | f->i | ' '; 25 26 } 26 27 sout | "empty" | nl; 27 28 28 for ( i ; 10) {29 for ( i = 0; i < 10; i += 1 ) { 29 30 add( fred, new( 2 * i ) ); 30 31 } 31 32 32 for ( QueueIter(Fred) iter = { fred }; iter >> f; ) {33 sout | f .i | ' ';33 for ( over( fredIter, fred ); fredIter >> f; ) { 34 sout | f->i | ' '; 34 35 } 35 36 sout | nl; 36 37 37 for ( i ; 9) {38 for ( i = 0; i < 9; i += 1 ) { 38 39 delete( drop( fred ) ); 39 40 } 40 41 41 42 for ( over( fredIter, fred ); fredIter >> f; ) { 42 sout | f .i | ' ';43 sout | f->i | ' '; 43 44 } 44 45 sout | nl; 45 46 46 for ( i ; 10) {47 for ( i = 0; i < 10; i += 1 ) { 47 48 add( fred, new( 2 * i + 1 ) ); 48 49 } 49 50 for ( over( fredIter, fred ); fredIter >> f; ) { 50 sout | f .i | ' ';51 sout | f->i | ' '; 51 52 } 52 53 sout | nl; 53 54 54 55 for ( over( fredIter, fred ); fredIter >> f; ) { 55 delete( &f );56 delete( f ); 56 57 } 57 58 … … 70 71 Queue(Mary) mary; 71 72 QueueIter(Mary) maryIter = { mary }; 72 Mary &m;73 Mary * m; 73 74 74 75 for ( ; maryIter >> m; ) { // empty list 75 sout | m .i | m.j | ' ';76 sout | m->i | m->j | ' '; 76 77 } 77 78 sout | "empty" | nl; 78 79 79 for ( i ; 10) {80 for ( i = 0; i < 10; i += 1 ) { 80 81 add( mary, new( 2 * i ) ); 81 82 } 82 83 83 for ( QueueIter(Mary) iter = { mary }; iter >> m; ) {84 sout | m .i | m.j | ' ';84 for ( over( maryIter, mary ); maryIter >> m; ) { 85 sout | m->i | m->j | ' '; 85 86 } 86 87 sout | nl; 87 88 88 for ( i ; 9) {89 for ( i = 0; i < 9; i += 1 ) { 89 90 delete( drop( mary ) ); 90 91 } 91 92 92 93 for ( over( maryIter, mary ); maryIter >> m; ) { 93 sout | m .i | m.j | ' ';94 sout | m->i | m->j | ' '; 94 95 } 95 96 sout | nl; 96 97 97 for ( i ; 10) {98 for ( i = 0; i < 10; i += 1 ) { 98 99 add( mary, new( 2 * i + 1 ) ); 99 100 } 100 101 for ( over( maryIter, mary ); maryIter >> m; ) { 101 sout | m .i | m.j | ' ';102 sout | m->i | m->j | ' '; 102 103 } 103 104 sout | nl; 104 105 105 106 for ( over( maryIter, mary ); maryIter >> m; ) { 106 delete( &m );107 delete( m ); 107 108 } 108 109 } -
libcfa/src/bits/sequence.hfa
rb5629d8 rf0d67e5 10 10 inline { 11 11 void ?{}( Seqable & sq ) with( sq ) { 12 ((Colable & ) sq){};12 ((Colable & ) sq){}; 13 13 back = 0p; 14 14 } // post: ! listed() … … 34 34 } // post: empty() & head() == 0 | !empty() & head() in *s 35 35 36 bool empty( Sequence(T) & s ) with( s ) { // 0 <=> *s contains no elements 37 return empty( (Collection &)s ); 38 } 39 40 bool listed( T * n ) { 41 return Next( (Colable *)n ) != 0; 42 } 43 44 T *& Next( T * n ) { 45 return (T *)Next( (Colable *)n ); 46 } 47 36 48 T *& Back( T * n ) { 37 49 return (T *)Back( (Seqable *)n ); 50 } 51 52 T * Root( Sequence(T) & s ) with( s ) { 53 return (T *)root; 38 54 } 39 55 … … 46 62 47 63 // Return a pointer to the last sequence element, without removing it. 48 T &tail( Sequence(T) & s ) with( s ) {49 return root ? (T &)Back( head( s ) ) : *0p; // needs cast?64 T * tail( Sequence(T) & s ) with( s ) { 65 return root ? (T *)Back( Root( s ) ) : 0p; // needs cast? 50 66 } // post: empty() & tail() == 0 | !empty() & tail() in *s 51 67 … … 55 71 if ( ! listed( n ) ) abort( "(Sequence &)%p.succ( %p ) : Node is not on a list.", &s, n ); 56 72 #endif // __CFA_DEBUG__ 57 return Next( n ) == head( s ) ? 0p : Next( n );73 return Next( n ) == Root( s ) ? 0p : Next( n ); 58 74 } // post: n == tail() & succ(n) == 0 | n != tail() & *succ(n) in *s 59 75 … … 63 79 if ( ! listed( n ) ) abort( "(Sequence &)%p.pred( %p ) : Node is not on a list.", &s, n ); 64 80 #endif // __CFA_DEBUG__ 65 return n == head( s ) ? 0p : Back( n );81 return n == Root( s ) ? 0p : Back( n ); 66 82 } // post: n == head() & head(n) == 0 | n != head() & *pred(n) in *s 67 83 68 84 69 85 // Insert *n into the sequence before *bef, or at the end if bef == 0. 70 void insertBef( Sequence(T) & s, T & n, T &bef ) with( s ) { // pre: !n->listed() & *bef in *s71 #ifdef __CFA_DEBUG__ 72 if ( listed( &n ) ) abort( "(Sequence &)%p.insertBef( %p, %p ) : Node is already on another list.", &s, n, &bef );73 #endif // __CFA_DEBUG__ 74 if ( &bef == head( s ) ) { // must change root86 void insertBef( Sequence(T) & s, T * n, T * bef ) with( s ) { // pre: !n->listed() & *bef in *s 87 #ifdef __CFA_DEBUG__ 88 if ( listed( n ) ) abort( "(Sequence &)%p.insertBef( %p, %p ) : Node is already on another list.", &s, n, bef ); 89 #endif // __CFA_DEBUG__ 90 if ( bef == Root( s ) ) { // must change root 75 91 if ( root ) { 76 Next( &n ) = head( s );77 Back( &n ) = Back( head( s ) );92 Next( n ) = Root( s ); 93 Back( n ) = Back( Root( s ) ); 78 94 // inserted node must be consistent before it is seen 79 95 asm( "" : : : "memory" ); // prevent code movement across barrier 80 Back( head( s ) ) = &n;81 Next( Back( &n ) ) = &n;96 Back( Root( s ) ) = n; 97 Next( Back( n ) ) = n; 82 98 } else { 83 Next( &n ) = &n;84 Back( &n ) = &n;99 Next( n ) = n; 100 Back( n ) = n; 85 101 } // if 86 102 // inserted node must be consistent before it is seen 87 103 asm( "" : : : "memory" ); // prevent code movement across barrier 88 root = &n;104 root = n; 89 105 } else { 90 if ( ! &bef ) &bef = head( s );91 Next( &n ) = &bef;92 Back( &n ) = Back( &bef );106 if ( ! bef ) bef = Root( s ); 107 Next( n ) = bef; 108 Back( n ) = Back( bef ); 93 109 // inserted node must be consistent before it is seen 94 110 asm( "" : : : "memory" ); // prevent code movement across barrier 95 Back( &bef ) = &n;96 Next( Back( &n ) ) = &n;111 Back( bef ) = n; 112 Next( Back( n ) ) = n; 97 113 } // if 98 114 } // post: n->listed() & *n in *s & succ(n) == bef … … 100 116 101 117 // Insert *n into the sequence after *aft, or at the beginning if aft == 0. 102 void insertAft( Sequence(T) & s, T & aft, T &n ) with( s ) { // pre: !n->listed() & *aft in *s103 #ifdef __CFA_DEBUG__ 104 if ( listed( &n ) ) abort( "(Sequence &)%p.insertAft( %p, %p ) : Node is already on another list.", &s, &aft, &n );105 #endif // __CFA_DEBUG__ 106 if ( ! &aft ) { // must change root118 void insertAft( Sequence(T) & s, T *aft, T *n ) with( s ) { // pre: !n->listed() & *aft in *s 119 #ifdef __CFA_DEBUG__ 120 if ( listed( n ) ) abort( "(Sequence &)%p.insertAft( %p, %p ) : Node is already on another list.", &s, aft, n ); 121 #endif // __CFA_DEBUG__ 122 if ( ! aft ) { // must change root 107 123 if ( root ) { 108 Next( &n ) = head( s );109 Back( &n ) = Back( head( s ) );124 Next( n ) = Root( s ); 125 Back( n ) = Back( Root( s ) ); 110 126 // inserted node must be consistent before it is seen 111 127 asm( "" : : : "memory" ); // prevent code movement across barrier 112 Back( head( s ) ) = &n;113 Next( Back( &n ) ) = &n;128 Back( Root( s ) ) = n; 129 Next( Back( n ) ) = n; 114 130 } else { 115 Next( &n ) = &n;116 Back( &n ) = &n;131 Next( n ) = n; 132 Back( n ) = n; 117 133 } // if 118 134 asm( "" : : : "memory" ); // prevent code movement across barrier 119 root = &n;135 root = n; 120 136 } else { 121 Next( &n ) = Next( &aft );122 Back( &n ) = &aft;137 Next( n ) = Next( aft ); 138 Back( n ) = aft; 123 139 // inserted node must be consistent before it is seen 124 140 asm( "" : : : "memory" ); // prevent code movement across barrier 125 Back( Next( &n ) ) = &n;126 Next( &aft ) = &n;141 Back( Next( n ) ) = n; 142 Next( aft ) = n; 127 143 } // if 128 144 } // post: n->listed() & *n in *s & succ(n) == bef 129 145 130 146 // pre: n->listed() & *n in *s 131 void remove( Sequence(T) & s, T &n ) with( s ) { // O(1)132 #ifdef __CFA_DEBUG__ 133 if ( ! listed( &n ) ) abort( "(Sequence &)%p.remove( %p ) : Node is not on a list.", &s, &n );134 #endif // __CFA_DEBUG__ 135 if ( &n == head( s ) ) {136 if ( Next( head( s ) ) == head( s ) ) root = 0p;137 else root = Next( head(s ) );138 } // if 139 Back( Next( &n ) ) = Back( &n );140 Next( Back( &n ) ) = Next( &n );141 Next( &n ) = Back( &n ) = 0p;147 void remove( Sequence(T) & s, T *n ) with( s ) { // O(1) 148 #ifdef __CFA_DEBUG__ 149 if ( ! listed( n ) ) abort( "(Sequence &)%p.remove( %p ) : Node is not on a list.", &s, n ); 150 #endif // __CFA_DEBUG__ 151 if ( n == Root( s ) ) { 152 if ( Next( Root( s ) ) == Root( s ) ) root = 0p; 153 else root = Next( Root(s ) ); 154 } // if 155 Back( Next( n ) ) = Back( n ); 156 Next( Back( n ) ) = Next( n ); 157 Next( n ) = Back( n ) = 0p; 142 158 } // post: !n->listed(). 143 159 144 160 // Add an element to the head of the sequence. 145 void addHead( Sequence(T) & s, T & n ) {// pre: !n->listed(); post: n->listed() & head() == n146 insertAft( s, *0p, n );161 void addHead( Sequence(T) & s, T *n ) { // pre: !n->listed(); post: n->listed() & head() == n 162 insertAft( s, 0, n ); 147 163 } 148 164 // Add an element to the tail of the sequence. 149 void addTail( Sequence(T) & s, T & n ) {// pre: !n->listed(); post: n->listed() & head() == n150 insertBef( s, n, *0p);165 void addTail( Sequence(T) & s, T *n ) { // pre: !n->listed(); post: n->listed() & head() == n 166 insertBef( s, n, 0 ); 151 167 } 152 168 // Add an element to the tail of the sequence. 153 void add( Sequence(T) & s, T & n ) {// pre: !n->listed(); post: n->listed() & head() == n169 void add( Sequence(T) & s, T *n ) { // pre: !n->listed(); post: n->listed() & head() == n 154 170 addTail( s, n ); 155 171 } 156 172 // Remove and return the head element in the sequence. 157 T &dropHead( Sequence(T) & s ) {173 T * dropHead( Sequence(T) & s ) { 158 174 T * n = head( s ); 159 return n ? remove( s, *n ), *n : *0p;175 return n ? remove( s, n ), n : 0p; 160 176 } 161 177 // Remove and return the head element in the sequence. 162 T &drop( Sequence(T) & s ) {178 T * drop( Sequence(T) & s ) { 163 179 return dropHead( s ); 164 180 } 165 181 // Remove and return the tail element in the sequence. 166 T &dropTail( Sequence(T) & s ) {167 T &n = tail( s );168 return &n ? remove( s, n ), n : *0p;182 T * dropTail( Sequence(T) & s ) { 183 T * n = tail( s ); 184 return n ? remove( s, n ), n : 0p; 169 185 } 170 186 … … 175 191 root = from.root; 176 192 } else { // "to" list not empty 177 T * toEnd = Back( head( s ) );178 T * fromEnd = Back( head( from ) );193 T * toEnd = Back( Root( s ) ); 194 T * fromEnd = Back( Root( from ) ); 179 195 Back( root ) = fromEnd; 180 Next( fromEnd ) = head( s );196 Next( fromEnd ) = Root( s ); 181 197 Back( from.root ) = toEnd; 182 Next( toEnd ) = head( from );198 Next( toEnd ) = Root( from ); 183 199 } // if 184 200 from.root = 0p; // mark "from" list empty … … 197 213 from.root = 0p; // mark "from" list empty 198 214 } else { 199 Back( head( from ) ) = Back( head( to ) ); // fix "from" list200 Next( Back( head( to ) ) ) = head( from );201 Next( n ) = head( to ); // fix "to" list202 Back( head( to ) ) = n;215 Back( Root( from ) ) = Back( Root( to ) ); // fix "from" list 216 Next( Back( Root( to ) ) ) = Root( from ); 217 Next( n ) = Root( to ); // fix "to" list 218 Back( Root( to ) ) = n; 203 219 } // if 204 220 transfer( s, to ); … … 215 231 216 232 inline { 217 void ?{}( SeqIter(T) & si ) with( si ) { 218 ((ColIter &)si){}; 233 // wrappers to make ColIter have T 234 T * Curr( SeqIter(T) & si ) with( si ) { 235 return (T *)curr; 236 } 237 238 void ?{}( SeqIter(T) & si ) with( si ) { 239 ((ColIter &) si){}; 219 240 seq = 0p; 220 241 } // post: elts = null. … … 223 244 ((ColIter &) si){}; 224 245 seq = &s; 225 curr = head( s );226 246 } // post: elts = null. 227 247 … … 231 251 } // post: elts = {e in s}. 232 252 233 bool ?>>?( SeqIter(T) & si, T && tp ) with( si ) {253 bool ?>>?( SeqIter(T) & si, T *& tp ) with( si ) { 234 254 if ( curr ) { 235 &tp = Curr( si );236 T * n = succ( *seq, Curr( si ) );255 tp = Curr( si ); 256 T *n = succ( *seq, Curr( si ) ); 237 257 curr = n == head( *seq ) ? 0p : n; 238 } else &tp = 0p;239 return &tp != 0p;258 } else tp = 0p; 259 return tp != 0p; 240 260 } 241 261 } // distribution … … 249 269 250 270 inline { 271 // wrappers to make ColIter have T 272 T * Curr( SeqIterRev(T) & si ) with( si ) { 273 return (T *)curr; 274 } 275 251 276 void ?{}( SeqIterRev(T) & si ) with( si ) { 252 277 ((ColIter &) si){}; … … 257 282 ((ColIter &) si){}; 258 283 seq = &s; 259 curr = &tail( s );260 284 } // post: elts = null. 261 285 262 286 void over( SeqIterRev(T) & si, Sequence(T) & s ) with( si ) { 263 287 seq = &s; 264 curr = &tail( s );288 curr = tail( s ); 265 289 } // post: elts = {e in s}. 266 290 267 bool ?>>?( SeqIterRev(T) & si, T &&tp ) with( si ) {291 bool ?>>?( SeqIterRev(T) & si, T *&tp ) with( si ) { 268 292 if ( curr ) { 269 &tp = Curr( si );270 T * n = pred( *seq, Curr( si ) );271 curr = n == &tail( *seq ) ? 0p : n;272 } else &tp = 0p;273 return &tp != 0p;293 tp = Curr( si ); 294 T *n = pred( *seq, Curr( si ) ); 295 curr = n == tail( *seq ) ? 0p : n; 296 } else tp = 0p; 297 return tp != 0p; 274 298 } 275 299 } // distribution -
libcfa/src/bits/sequence_example.cfa
rb5629d8 rf0d67e5 17 17 Sequence(Fred) fred; 18 18 SeqIter(Fred) fredIter = { fred }; 19 Fred & f; 19 Fred * f; 20 int i; 20 21 21 22 sout | nlOff; // turn off auto newline 22 23 23 24 for ( ; fredIter >> f; ) { // empty list 24 sout | f .i | ' ';25 sout | f->i | ' '; 25 26 } 26 27 sout | "empty" | nl; 27 28 28 for ( i ; 10) {29 add( fred, *new( 2 * i ) );29 for ( i = 0; i < 10; i += 1 ) { 30 add( fred, new( 2 * i ) ); 30 31 } 31 32 32 for ( SeqIter(Fred) iter = { fred }; iter >> f; ) {33 sout | f .i | ' ';33 for ( over( fredIter, fred ); fredIter >> f; ) { 34 sout | f->i | ' '; 34 35 } 35 36 sout | nl; 36 37 37 for ( i ; 9) {38 delete( &dropHead( fred ) );38 for ( i = 0; i < 9; i += 1 ) { 39 delete( dropHead( fred ) ); 39 40 } 40 41 41 42 for ( over( fredIter, fred ); fredIter >> f; ) { 42 sout | f .i | ' ';43 sout | f->i | ' '; 43 44 } 44 45 sout | nl; 45 46 46 for ( i ; 10) {47 addTail( fred, *new( 2 * i + 1 ) );47 for ( i = 0; i < 10; i += 1 ) { 48 addTail( fred, new( 2 * i + 1 ) ); 48 49 } 49 50 for ( over( fredIter, fred ); fredIter >> f; ) { 50 sout | f .i | ' ';51 sout | f->i | ' '; 51 52 } 52 53 sout | nl; 53 54 54 for ( i ; 9) {55 delete( &dropTail( fred ) );55 for ( i = 0; i < 9; i += 1 ) { 56 delete( dropTail( fred ) ); 56 57 } 57 58 for ( over( fredIter, fred ); fredIter >> f; ) { 58 sout | f .i | ' ';59 sout | f->i | ' '; 59 60 } 60 61 sout | nl; 61 62 62 63 for ( over( fredIter, fred ); fredIter >> f; ) { 63 delete( &f );64 delete( f ); 64 65 } 65 66 … … 79 80 Sequence(Mary) baz; 80 81 SeqIter(Mary) maryIter = { mary }; 81 Mary &m;82 Mary * m; 82 83 83 84 for ( ; maryIter >> m; ) { // empty list 84 sout | m .i | m.j | ' ';85 sout | m->i | m->j | ' '; 85 86 } 86 87 sout | "empty" | nl; 87 88 88 for ( i ; 10) {89 add( mary, *new( 2 * i ) );90 add( baz, *new( 2 * i ) );89 for ( i = 0; i < 10; i += 1 ) { 90 add( mary, new( 2 * i ) ); 91 add( baz, new( 2 * i ) ); 91 92 } 92 93 93 for ( SeqIter(Mary) iter = { mary }; iter >> m; ) {94 sout | m .i | m.j | ' ';94 for ( over( maryIter, mary ); maryIter >> m; ) { 95 sout | m->i | m->j | ' '; 95 96 } 96 97 sout | nl; 97 98 98 for ( i ; 9) {99 delete( &dropHead( mary ) );99 for ( i = 0; i < 9; i += 1 ) { 100 delete( dropHead( mary ) ); 100 101 } 101 102 102 103 for ( over( maryIter, mary ); maryIter >> m; ) { 103 sout | m .i | m.j | ' ';104 sout | m->i | m->j | ' '; 104 105 } 105 106 sout | nl; 106 107 107 for ( i ; 10) {108 addTail( mary, *new( 2 * i + 1 ) );108 for ( i = 0; i < 10; i += 1 ) { 109 addTail( mary, new( 2 * i + 1 ) ); 109 110 } 110 111 for ( over( maryIter, mary ); maryIter >> m; ) { 111 sout | m .i | m.j | ' ';112 sout | m->i | m->j | ' '; 112 113 } 113 114 sout | nl; 114 115 115 for ( i ; 9) {116 delete( &dropTail( mary ) );116 for ( i = 0; i < 9; i += 1 ) { 117 delete( dropTail( mary ) ); 117 118 } 118 119 for ( over( maryIter, mary ); maryIter >> m; ) { 119 sout | m .i | m.j | ' ';120 sout | m->i | m->j | ' '; 120 121 } 121 122 sout | nl; … … 124 125 125 126 for ( over( maryIter, baz ); maryIter >> m; ) { 126 sout | m .i | m.j | ' ';127 sout | m->i | m->j | ' '; 127 128 } 128 129 sout | "empty" | nl; 129 130 130 131 for ( over( maryIter, mary ); maryIter >> m; ) { 131 sout | m .i | m.j | ' ';132 sout | m->i | m->j | ' '; 132 133 } 133 134 sout | nl; 134 135 135 136 for ( over( maryIter, mary ); maryIter >> m; ) { 136 delete( &m );137 delete( m ); 137 138 } 138 139 } 139 140 140 141 // Local Variables: // 141 // compile-command: "cfa sequence_example.c fa" //142 // compile-command: "cfa sequence_example.cc" // 142 143 // End: // -
libcfa/src/bits/stack.hfa
rb5629d8 rf0d67e5 14 14 } // post: empty() & head() == 0 | !empty() & head() in *this 15 15 16 bool empty( Stack(T) & s ) with( s ) { // 0 <=> *this contains no elements 17 return empty( (Collection &)s ); 18 } 19 20 T *& Next( T * n ) { 21 return (T *)Next( (Colable *)n ); 22 } 23 24 T * Root( Stack(T) & s ) with( s ) { 25 return (T *)root; 26 } 27 16 28 void ?{}( Stack(T) &, const Stack(T) & ) = void; // no copy 17 29 Stack(T) & ?=?( const Stack(T) & ) = void; // no assignment … … 21 33 } // post: empty() 22 34 23 T &top( Stack(T) & s ) with( s ) {24 return *head( s );35 T * top( Stack(T) & s ) with( s ) { 36 return head( s ); 25 37 } 26 38 27 void addHead( Stack(T) & s, T &n ) with( s ) {39 void addHead( Stack(T) & s, T * n ) with( s ) { 28 40 #ifdef __CFA_DEBUG__ 29 if ( listed( (Colable &)( n) ) ) abort( "(Stack &)%p.addHead( %p ) : Node is already on another list.", &s, n );41 if ( listed( (Colable &)(*n) ) ) abort( "(Stack &)%p.addHead( %p ) : Node is already on another list.", &s, n ); 30 42 #endif // __CFA_DEBUG__ 31 Next( &n ) = head( s ) ? head( s ) : &n;32 root = &n;43 Next( n ) = Root( s ) ? Root( s ) : n; 44 root = n; 33 45 } 34 46 35 void add( Stack(T) & s, T &n ) with( s ) {47 void add( Stack(T) & s, T * n ) with( s ) { 36 48 addHead( s, n ); 37 49 } 38 50 39 void push( Stack(T) & s, T &n ) with( s ) {51 void push( Stack(T) & s, T * n ) with( s ) { 40 52 addHead( s, n ); 41 53 } 42 54 43 T &drop( Stack(T) & s ) with( s ) {44 T & t = *head( s );55 T * drop( Stack(T) & s ) with( s ) { 56 T * t = head( s ); 45 57 if ( root ) { 46 58 root = ( T *)Next(root); 47 if ( head( s ) == &t ) root = 0p; // only one element ?48 Next( &t ) = 0p;59 if ( Root( s ) == t ) root = 0p; // only one element ? 60 Next( t ) = 0p; 49 61 } // if 50 62 return t; 51 63 } 52 64 53 T &pop( Stack(T) & s ) with( s ) {65 T * pop( Stack(T) & s ) with( s ) { 54 66 return drop( s ); 55 67 } … … 64 76 65 77 inline { 78 // wrappers to make ColIter have T 79 T * Curr( StackIter(T) & si ) with( si ) { 80 return (T *)curr; 81 } 82 66 83 void ?{}( StackIter(T) & si ) with( si ) { 67 84 ((ColIter &)si){}; … … 73 90 } // post: curr = {e in s} 74 91 75 void ?{}( StackIter(T) & si, T &start ) with( si ) {76 curr = &start;92 void ?{}( StackIter(T) & si, T * start ) with( si ) { 93 curr = start; 77 94 } // post: curr = {e in s} 78 95 … … 82 99 } // post: curr = {e in s} 83 100 84 bool ?>>?( StackIter(T) & si, T && tp ) with( si ) {101 bool ?>>?( StackIter(T) & si, T *& tp ) with( si ) { 85 102 if ( curr ) { 86 &tp = Curr( si );103 tp = Curr( si ); 87 104 T * n = Next( Curr( si ) ); 88 curr = n == Curr( si) ? 0p : n;89 } else &tp = 0p;90 return &tp != 0p;105 curr = (n == Curr( si ) ) ? 0p : n; 106 } else tp = 0p; 107 return tp != 0p; 91 108 } 92 109 } // distribution -
libcfa/src/bits/stack_example.cfa
rb5629d8 rf0d67e5 17 17 Stack(Fred) fred; 18 18 StackIter(Fred) fredIter = { fred }; 19 Fred & f; 19 Fred * f; 20 int i; 20 21 21 22 sout | nlOff; // turn off auto newline 22 23 23 24 for ( ; fredIter >> f; ) { // empty list 24 sout | f .i | ' ';25 sout | f->i | ' '; 25 26 } 26 27 sout | "empty" | nl; 27 28 28 for ( i ; 10) {29 push( fred, *new( 2 * i ) );29 for ( i = 0; i < 10; i += 1 ) { 30 push( fred, new( 2 * i ) ); 30 31 } 31 32 32 for ( StackIter(Fred) iter = { fred }; iter >> f; ) {33 sout | f .i | ' ';33 for ( over( fredIter, fred ); fredIter >> f; ) { 34 sout | f->i | ' '; 34 35 } 35 36 sout | nl; 36 37 37 for ( i ; 9) {38 delete( &pop( fred ) );38 for ( i = 0; i < 9; i += 1 ) { 39 delete( pop( fred ) ); 39 40 } 40 41 41 42 for ( over( fredIter, fred ); fredIter >> f; ) { 42 sout | f .i | ' ';43 sout | f->i | ' '; 43 44 } 44 45 sout | nl; 45 46 46 for ( i ; 10) {47 push( fred, *new( 2 * i + 1 ) );47 for ( i = 0; i < 10; i += 1 ) { 48 push( fred, new( 2 * i + 1 ) ); 48 49 } 49 50 for ( over( fredIter, fred ); fredIter >> f; ) { 50 sout | f .i | ' ';51 sout | f->i | ' '; 51 52 } 52 53 sout | nl; 53 54 54 55 for ( over( fredIter, fred ); fredIter >> f; ) { 55 delete( &f );56 delete( f ); 56 57 } 57 58 … … 70 71 Stack(Mary) mary; 71 72 StackIter(Mary) maryIter = { mary }; 72 Mary &m;73 Mary * m; 73 74 74 75 for ( ; maryIter >> m; ) { // empty list 75 sout | m .i | m.j | ' ';76 sout | m->i | m->j | ' '; 76 77 } 77 78 sout | "empty" | nl; 78 79 79 for ( i ; 10) {80 push( mary, *new( 2 * i ) );80 for ( i = 0; i < 10; i += 1 ) { 81 push( mary, new( 2 * i ) ); 81 82 } 82 83 83 for ( StackIter(Mary) iter = { mary }; iter >> m; ) {84 sout | m .i | m.j | ' ';84 for ( over( maryIter, mary ); maryIter >> m; ) { 85 sout | m->i | m->j | ' '; 85 86 } 86 87 sout | nl; 87 88 88 for ( i ; 9) {89 delete( &pop( mary ) );89 for ( i = 0; i < 9; i += 1 ) { 90 delete( pop( mary ) ); 90 91 } 91 92 92 93 for ( over( maryIter, mary ); maryIter >> m; ) { 93 sout | m .i | m.j | ' ';94 sout | m->i | m->j | ' '; 94 95 } 95 96 sout | nl; 96 97 97 for ( i ; 10) {98 push( mary, *new( 2 * i + 1 ) );98 for ( i = 0; i < 10; i += 1 ) { 99 push( mary, new( 2 * i + 1 ) ); 99 100 } 100 101 for ( over( maryIter, mary ); maryIter >> m; ) { 101 sout | m .i | m.j | ' ';102 sout | m->i | m->j | ' '; 102 103 } 103 104 sout | nl; 104 105 105 106 for ( over( maryIter, mary ); maryIter >> m; ) { 106 delete( &m );107 delete( m ); 107 108 } 108 109 } -
src/AST/Print.cpp
rb5629d8 rf0d67e5 205 205 206 206 void preprint( const ast::NamedTypeDecl * node ) { 207 if ( ! node->name.empty() ) { 208 if( deterministic_output && isUnboundType(node->name) ) os << "[unbound]:"; 209 else os << node->name << ": "; 210 } 207 if ( ! node->name.empty() ) os << node->name << ": "; 211 208 212 209 if ( ! short_mode && node->linkage != Linkage::Cforall ) { … … 243 240 244 241 if ( node->result ) { 245 os << endl << indent << "... with resolved type:" << endl; 246 ++indent; 247 os << indent; 248 node->result->accept( *this ); 249 --indent; 242 if (!deterministic_output) { 243 os << endl << indent << "... with resolved type:" << endl; 244 ++indent; 245 os << indent; 246 node->result->accept( *this ); 247 --indent; 248 } 250 249 } 251 250 … … 1383 1382 virtual const ast::Type * visit( const ast::TypeInstType * node ) override final { 1384 1383 preprint( node ); 1385 const auto & _name = deterministic_output && isUnboundType(node) ? "[unbound]" : node->name; 1386 os << "instance of type " << _name 1384 os << "instance of type " << node->name 1387 1385 << " (" << (node->kind == ast::TypeDecl::Ftype ? "" : "not ") << "function type)"; 1388 1386 print( node->params ); -
src/AST/Type.cpp
rb5629d8 rf0d67e5 133 133 134 134 BaseInstType::BaseInstType( const BaseInstType & o ) 135 : ParameterizedType( o.qualifiers, copy( o.attributes ) ), params(), name( o.name ), 135 : ParameterizedType( o.qualifiers, copy( o.attributes ) ), params(), name( o.name ), 136 136 hoistType( o.hoistType ) { 137 137 Pass< ForallSubstitutor > sub; … … 222 222 // TODO: once TypeInstType representation is updated, it should properly check 223 223 // if the context id is filled. this is a temporary hack for now 224 return isUnboundType(typeInst->name); 225 } 226 return false; 227 } 228 229 bool isUnboundType(const std::string & tname) { 230 // xxx - look for a type name produced by renameTyVars. 231 232 // TODO: once TypeInstType representation is updated, it should properly check 233 // if the context id is filled. this is a temporary hack for now 234 if (std::count(tname.begin(), tname.end(), '_') >= 3) { 235 return true; 224 if (std::count(typeInst->name.begin(), typeInst->name.end(), '_') >= 3) { 225 return true; 226 } 236 227 } 237 228 return false; -
src/AST/Type.hpp
rb5629d8 rf0d67e5 536 536 537 537 bool isUnboundType(const Type * type); 538 bool isUnboundType(const std::string & tname);539 538 540 539 } -
src/AST/TypeEnvironment.cpp
rb5629d8 rf0d67e5 34 34 #include "ResolvExpr/Unify.h" // for unifyInexact 35 35 #include "Tuples/Tuples.h" // for isTtype 36 #include "CompilationState.h"37 36 38 37 using ResolvExpr::WidenMode; … … 57 56 58 57 void print( std::ostream & out, const EqvClass & clz, Indenter indent ) { 59 out << "("; 60 bool first = true; 61 for(const auto & var : clz.vars) { 62 if(first) first = false; 63 else out << " "; 64 if( deterministic_output && isUnboundType(var) ) out << "[unbound]"; 65 else out << var; 66 } 58 out << "( "; 59 std::copy( clz.vars.begin(), clz.vars.end(), std::ostream_iterator< std::string >( out, " " ) ); 67 60 out << ")"; 68 61 -
src/Common/CodeLocation.h
rb5629d8 rf0d67e5 42 42 } 43 43 44 bool startsBefore( CodeLocation const & other ) const { 45 if( filename < other.filename ) return true; 46 if( filename > other.filename ) return false; 47 48 if( first_line < other.first_line ) return true; 49 if( first_line > other.first_line ) return false; 50 51 if( last_line < other.last_line ) return true; 52 return false; 53 } 54 55 bool followedBy( CodeLocation const & other, int seperation ) const { 44 bool followedBy( CodeLocation const & other, int seperation ) { 56 45 return (first_line + seperation == other.first_line && 57 46 filename == other.filename); 58 47 } 59 48 60 bool operator==( CodeLocation const & other ) const{49 bool operator==( CodeLocation const & other ) { 61 50 return followedBy( other, 0 ); 62 51 } 63 52 64 bool operator!=( CodeLocation const & other ) const{53 bool operator!=( CodeLocation const & other ) { 65 54 return !(*this == other); 66 55 } -
src/Common/SemanticError.cc
rb5629d8 rf0d67e5 90 90 void SemanticErrorException::print() { 91 91 using std::to_string; 92 93 errors.sort([](const error & lhs, const error & rhs) -> bool {94 if(lhs.location.startsBefore(rhs.location)) return true;95 if(rhs.location.startsBefore(lhs.location)) return false;96 97 return lhs.description < rhs.description;98 });99 100 92 for( auto err : errors ) { 101 93 std::cerr << ErrorHelpers::bold() << err.location << ErrorHelpers::error_str() << ErrorHelpers::reset_font() << err.description << std::endl; -
src/ResolvExpr/AlternativeFinder.cc
rb5629d8 rf0d67e5 132 132 void printAlts( const AltList &list, std::ostream &os, unsigned int indentAmt ) { 133 133 Indenter indent = { indentAmt }; 134 135 std::vector<int> idx;136 idx.reserve(list.size());137 for(int i = 0; i < list.size(); i++) { idx.push_back(i); }138 139 std::sort(idx.begin(), idx.end(), [&list](int lhs_idx, int rhs_idx) -> bool {140 const auto & lhs = list.at(lhs_idx);141 const auto & rhs = list.at(rhs_idx);142 if(lhs.expr->location.startsBefore(rhs.expr->location)) return true;143 if(rhs.expr->location.startsBefore(lhs.expr->location)) return false;144 145 if(lhs.env.size() < rhs.env.size()) return true;146 if(lhs.env.size() > rhs.env.size()) return false;147 148 if(lhs.openVars.size() < rhs.openVars.size()) return true;149 if(lhs.openVars.size() > rhs.openVars.size()) return false;150 151 if(lhs.need.size() < rhs.need.size()) return true;152 if(lhs.need.size() > rhs.need.size()) return false;153 154 return false;155 });156 157 134 for ( AltList::const_iterator i = list.begin(); i != list.end(); ++i ) { 158 135 i->print( os, indent ); … … 1741 1718 std::cerr << std::endl; 1742 1719 ) 1743 1720 1744 1721 if ( thisCost != Cost::infinity ) { 1745 1722 // count one safe conversion for each value that is thrown away -
src/ResolvExpr/TypeEnvironment.cc
rb5629d8 rf0d67e5 107 107 108 108 void EqvClass::print( std::ostream &os, Indenter indent ) const { 109 os << "("; 110 bool first = true; 111 for(const auto & var : vars) { 112 if(first) first = false; 113 else os << " "; 114 if( deterministic_output && isUnboundType(var) ) os << "[unbound]"; 115 else os << var; 116 } 117 os << ")"; 109 if( !deterministic_output ) { 110 os << "( "; 111 std::copy( vars.begin(), vars.end(), std::ostream_iterator< std::string >( os, " " ) ); 112 os << ")"; 113 } 118 114 if ( type ) { 119 115 os << " -> "; -
src/ResolvExpr/TypeEnvironment.h
rb5629d8 rf0d67e5 149 149 iterator end() const { return env.end(); } 150 150 151 auto size() const { return env.size(); }152 153 151 private: 154 152 ClassList env; -
src/SynTree/Expression.cc
rb5629d8 rf0d67e5 72 72 73 73 if ( result ) { 74 os << std::endl << indent << "with resolved type:" << std::endl; 75 os << (indent+1); 76 result->print( os, indent+1 ); 74 if (!deterministic_output) { 75 os << std::endl << indent << "with resolved type:" << std::endl; 76 os << (indent+1); 77 result->print( os, indent+1 ); 78 } 77 79 } 78 80 -
src/SynTree/NamedTypeDecl.cc
rb5629d8 rf0d67e5 22 22 #include "LinkageSpec.h" // for Spec, Cforall, linkageName 23 23 #include "Type.h" // for Type, Type::StorageClasses 24 #include "CompilationState.h"25 24 26 25 NamedTypeDecl::NamedTypeDecl( const std::string &name, Type::StorageClasses scs, Type *base ) … … 42 41 using namespace std; 43 42 44 if ( ! name.empty() ) { 45 if( deterministic_output && isUnboundType(name) ) os << "[unbound]:"; 46 else os << name << ": "; 47 } 43 if ( name != "" ) os << name << ": "; 48 44 49 45 if ( linkage != LinkageSpec::Cforall ) { -
src/SynTree/ReferenceToType.cc
rb5629d8 rf0d67e5 24 24 #include "Type.h" // for TypeInstType, StructInstType, UnionInstType 25 25 #include "TypeSubstitution.h" // for TypeSubstitution 26 #include "CompilationState.h"27 26 28 27 class Attribute; … … 206 205 207 206 Type::print( os, indent ); 208 os << "instance of " << typeString() << " "; 209 const auto & name_ = get_name(); 210 if( deterministic_output && isUnboundType(name) ) os << "[unbound]"; 211 else os << name; 212 os << " (" << ( isFtype ? "" : "not" ) << " function type)"; 207 os << "instance of " << typeString() << " " << get_name() << " (" << ( isFtype ? "" : "not" ) << " function type)"; 213 208 if ( ! parameters.empty() ) { 214 209 os << endl << indent << "... with parameters" << endl; -
src/SynTree/Type.cc
rb5629d8 rf0d67e5 156 156 const Type::Qualifiers noQualifiers; 157 157 158 bool isUnboundType(const Type * type) {159 if (auto typeInst = dynamic_cast<const TypeInstType *>(type)) {160 // xxx - look for a type name produced by renameTyVars.161 162 // TODO: once TypeInstType representation is updated, it should properly check163 // if the context id is filled. this is a temporary hack for now164 return isUnboundType(typeInst->name);165 }166 return false;167 }168 169 bool isUnboundType(const std::string & tname) {170 // xxx - look for a type name produced by renameTyVars.171 172 // TODO: once TypeInstType representation is updated, it should properly check173 // if the context id is filled. this is a temporary hack for now174 if (std::count(tname.begin(), tname.end(), '_') >= 3) {175 return true;176 }177 return false;178 }179 180 158 // Local Variables: // 181 159 // tab-width: 4 // -
src/SynTree/Type.h
rb5629d8 rf0d67e5 733 733 }; 734 734 735 736 bool isUnboundType(const Type * type);737 bool isUnboundType(const std::string & tname);738 739 735 // Local Variables: // 740 736 // tab-width: 4 // -
tests/.expect/alloc-ERROR.nast.txt
rb5629d8 rf0d67e5 16 16 Name: stp 17 17 18 ... with resolved type:19 unsigned long int20 18 21 19 … … 30 28 Name: stp 31 29 Constant Expression (10: signed int) 32 ... with resolved type:33 signed int34 30 35 31 -
tests/.expect/alloc-ERROR.oast.txt
rb5629d8 rf0d67e5 16 16 Name: stp 17 17 18 with resolved type:19 unsigned long int20 18 21 19 … … 30 28 Name: stp 31 29 constant expression (10 10: signed int) 32 with resolved type:33 signed int34 30 35 31 -
tests/.expect/castError.oast.txt
rb5629d8 rf0d67e5 3 3 Name: f 4 4 ... to: 5 char6 with resolved type:7 5 char Alternatives are: 8 6 Cost ( 1, 0, 0, 0, 0, 0, 0 ): Explicit Cast of: … … 11 9 ... returning nothing 12 10 13 with resolved type:14 pointer to function15 accepting unspecified arguments16 ... returning nothing17 18 11 ... to: 19 char20 with resolved type:21 12 char 22 13 (types: … … 27 18 Cost ( 1, 0, 0, 0, 0, 0, 0 ): Explicit Cast of: 28 19 Variable Expression: f: double 29 with resolved type:30 double31 20 ... to: 32 char33 with resolved type:34 21 char 35 22 (types: … … 40 27 Cost ( 1, 0, 0, 0, 0, 0, 0 ): Explicit Cast of: 41 28 Variable Expression: f: signed int 42 with resolved type:43 signed int44 29 ... to: 45 char46 with resolved type:47 30 char 48 31 (types: … … 56 39 Comma Expression: 57 40 constant expression (3 3: signed int) 58 with resolved type:59 signed int60 41 Name: v 61 ... to: nothing 62 with resolved type: 63 void Alternatives are: 42 ... to: nothing Alternatives are: 64 43 Cost ( 0, 0, 2, 0, 0, 0, 0 ): Generated Cast of: 65 44 Comma Expression: 66 45 constant expression (3 3: signed int) 67 with resolved type:68 signed int69 46 Variable Expression: v: unsigned char 70 with resolved type:71 unsigned char72 with resolved type:73 unsigned char74 47 ... to: nothing 75 with resolved type:76 void77 48 (types: 78 49 void … … 83 54 Comma Expression: 84 55 constant expression (3 3: signed int) 85 with resolved type:86 signed int87 56 Variable Expression: v: signed short int 88 with resolved type:89 signed short int90 with resolved type:91 signed short int92 57 ... to: nothing 93 with resolved type:94 void95 58 (types: 96 59 void … … 106 69 char 107 70 108 with resolved type:109 instance of struct S with body 1110 ... with parameters111 char112 -
tests/.expect/init1-ERROR.nast.txt
rb5629d8 rf0d67e5 11 11 ... to: 12 12 reference to signed int 13 ... with resolved type:14 reference to signed int15 13 init1.cfa:107:1 error: Invalid application of existing declaration(s) in expression Applying untyped: 16 14 Name: ?{} … … 18 16 Generated Cast of: 19 17 Variable Expression: _retval_f_py: pointer to signed int 20 ... with resolved type:21 pointer to signed int22 18 ... to: 23 reference to pointer to signed int24 ... with resolved type:25 19 reference to pointer to signed int 26 20 Name: px … … 30 24 ... to: 31 25 reference to float 32 ... with resolved type:33 reference to float34 26 init1.cfa:117:1 error: Invalid application of existing declaration(s) in expression Applying untyped: 35 27 Name: ?{} … … 37 29 Generated Cast of: 38 30 Variable Expression: _retval_f_py2: pointer to float 39 ... with resolved type:40 pointer to float41 31 ... to: 42 reference to pointer to float43 ... with resolved type:44 32 reference to pointer to float 45 33 Name: cpx … … 49 37 ... to: 50 38 reference to instance of type T (not function type) 51 ... with resolved type:52 reference to instance of type T (not function type)53 39 init1.cfa:128:1 error: Invalid application of existing declaration(s) in expression Applying untyped: 54 40 Name: ?{} … … 56 42 Generated Cast of: 57 43 Variable Expression: _retval_anycvt: pointer to instance of type T (not function type) 58 ... with resolved type:59 pointer to instance of type T (not function type)60 44 ... to: 61 reference to pointer to instance of type T (not function type)62 ... with resolved type:63 45 reference to pointer to instance of type T (not function type) 64 46 Name: s -
tests/.expect/init1-ERROR.oast.txt
rb5629d8 rf0d67e5 1 1 error: No reasonable alternatives for expression Untyped Init Expression 2 Name: cpx InitAlternative: pointer to float 2 Name: rx InitAlternative: reference to signed int 3 error: No reasonable alternatives for expression Untyped Init Expression 4 Name: px InitAlternative: pointer to signed int 3 5 error: No reasonable alternatives for expression Untyped Init Expression 4 6 Name: crx InitAlternative: reference to float 5 7 error: No reasonable alternatives for expression Untyped Init Expression 6 Name: px InitAlternative: pointer to signed int 7 error: No reasonable alternatives for expression Untyped Init Expression 8 Name: rx InitAlternative: reference to signed int 8 Name: cpx InitAlternative: pointer to float 9 9 init1.cfa:104:1 error: No reasonable alternatives for expression Generated Cast of: 10 10 Name: rx 11 11 ... to: 12 reference to signed int13 with resolved type:14 12 reference to signed int 15 13 init1.cfa:107:1 error: No reasonable alternatives for expression Applying untyped: … … 18 16 Generated Cast of: 19 17 Variable Expression: _retval_f_py: pointer to signed int 20 with resolved type:21 pointer to signed int22 18 ... to: 23 reference to pointer to signed int24 with resolved type:25 19 reference to pointer to signed int 26 20 Name: px … … 30 24 ... to: 31 25 reference to float 32 with resolved type:33 reference to float34 26 init1.cfa:117:1 error: No reasonable alternatives for expression Applying untyped: 35 27 Name: ?{} … … 37 29 Generated Cast of: 38 30 Variable Expression: _retval_f_py2: pointer to float 39 with resolved type:40 pointer to float41 31 ... to: 42 reference to pointer to float43 with resolved type:44 32 reference to pointer to float 45 33 Name: cpx … … 49 37 ... to: 50 38 reference to instance of type T (not function type) 51 with resolved type:52 reference to instance of type T (not function type)53 39 init1.cfa:128:1 error: No reasonable alternatives for expression Applying untyped: 54 40 Name: ?{} … … 56 42 Generated Cast of: 57 43 Variable Expression: _retval_anycvt: pointer to instance of type T (not function type) 58 with resolved type:59 pointer to instance of type T (not function type)60 44 ... to: 61 reference to pointer to instance of type T (not function type)62 with resolved type:63 45 reference to pointer to instance of type T (not function type) 64 46 Name: s -
tests/errors/.expect/completeType.nast.x64.txt
rb5629d8 rf0d67e5 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 … … 19 17 reference to instance of type DT (not function type) 20 18 21 ... with resolved type:22 pointer to forall23 [unbound]:data type24 function25 ... with parameters26 pointer to instance of type [unbound] (not function type)27 ... returning28 reference to instance of type [unbound] (not function type)29 30 19 ... to arguments 31 20 Variable Expression: x: pointer to instance of struct B with body 32 ... with resolved type:33 pointer to instance of struct B with body34 21 35 ... with resolved type:36 reference to instance of struct B with body37 22 ... to: nothing 38 ... with resolved type:39 void40 23 (types: 41 24 void 42 25 ) 43 Environment:( [unbound]) -> instance of struct B with body (no widening)26 Environment:( _99_2_DT ) -> instance of struct B with body (no widening) 44 27 45 28 … … 54 37 reference to instance of type DT (not function type) 55 38 56 ... with resolved type:57 pointer to forall58 [unbound]:data type59 function60 ... with parameters61 pointer to instance of type [unbound] (not function type)62 ... returning63 reference to instance of type [unbound] (not function type)64 65 39 ... to arguments 66 40 Variable Expression: x: pointer to instance of struct A without body 67 ... with resolved type:68 pointer to instance of struct A without body69 41 70 ... with resolved type:71 reference to instance of struct A without body72 42 ... to: nothing 73 ... with resolved type:74 void75 43 (types: 76 44 void 77 45 ) 78 Environment:( [unbound]) -> instance of struct A without body (no widening)46 Environment:( _99_2_DT ) -> instance of struct A without body (no widening) 79 47 80 48 … … 144 112 ... returning nothing 145 113 146 ... with resolved type:147 pointer to forall148 [unbound]:sized data type149 ... with assertions150 ?=?: pointer to function151 ... with parameters152 reference to instance of type [unbound] (not function type)153 instance of type [unbound] (not function type)154 ... returning155 instance of type [unbound] (not function type)156 157 ?{}: pointer to function158 ... with parameters159 reference to instance of type [unbound] (not function type)160 ... returning nothing161 162 ?{}: pointer to function163 ... with parameters164 reference to instance of type [unbound] (not function type)165 instance of type [unbound] (not function type)166 ... returning nothing167 168 ^?{}: pointer to function169 ... with parameters170 reference to instance of type [unbound] (not function type)171 ... returning nothing172 173 174 function175 ... with parameters176 pointer to instance of type [unbound] (not function type)177 ... returning nothing178 179 114 ... to arguments 180 115 Variable Expression: z: pointer to instance of type T (not function type) 181 ... with resolved type:182 pointer to instance of type T (not function type)183 116 with 1 pending inference slots 184 117 185 ... with resolved type:186 void187 118 (types: 188 119 void 189 120 ) 190 Environment:( [unbound]) -> instance of type T (not function type) (no widening)121 Environment:( _118_0_T ) -> instance of type T (not function type) (no widening) 191 122 192 123 Could not satisfy assertion: 193 124 ?=?: pointer to function 194 125 ... with parameters 195 reference to instance of type [unbound](not function type)196 instance of type [unbound](not function type)126 reference to instance of type _118_0_T (not function type) 127 instance of type _118_0_T (not function type) 197 128 ... returning 198 instance of type [unbound](not function type)129 instance of type _118_0_T (not function type) 199 130 -
tests/errors/.expect/completeType.oast.x64.txt
rb5629d8 rf0d67e5 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 [unbound]:data type27 function28 ... with parameters29 intrinsic pointer to instance of type [unbound] (not function type)30 ... returning31 _retval__operator_deref: reference to instance of type [unbound] (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 48 28 ) 49 Environment: ([unbound])-> instance of struct A with body 0 (no widening)29 Environment: -> instance of struct A with body 0 (no widening) 50 30 51 31 … … 63 43 64 44 65 with resolved type:66 pointer to forall67 [unbound]:data type68 function69 ... with parameters70 intrinsic pointer to instance of type [unbound] (not function type)71 ... returning72 _retval__operator_deref: reference to instance of type [unbound] (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 89 51 ) 90 Environment: ([unbound])-> instance of struct B with body 1 (no widening)52 Environment: -> instance of struct B with body 1 (no widening) 91 53 92 54 … … 159 121 ... returning nothing 160 122 161 with resolved type:162 pointer to forall163 [unbound]:sized data type164 ... with assertions165 ?=?: pointer to function166 ... with parameters167 reference to instance of type [unbound] (not function type)168 instance of type [unbound] (not function type)169 ... returning170 _retval__operator_assign: instance of type [unbound] (not function type)171 ... with attributes:172 Attribute with name: unused173 174 175 ?{}: pointer to function176 ... with parameters177 reference to instance of type [unbound] (not function type)178 ... returning nothing179 180 ?{}: pointer to function181 ... with parameters182 reference to instance of type [unbound] (not function type)183 instance of type [unbound] (not function type)184 ... returning nothing185 186 ^?{}: pointer to function187 ... with parameters188 reference to instance of type [unbound] (not function type)189 ... returning nothing190 191 192 function193 ... with parameters194 pointer to instance of type [unbound] (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 206 128 ) 207 Environment: ([unbound])-> instance of type T (not function type) (no widening)129 Environment: -> instance of type T (not function type) (no widening) 208 130 209 131 Could not satisfy assertion: 210 132 ?=?: pointer to function 211 133 ... with parameters 212 reference to instance of type [unbound](not function type)213 instance of type [unbound](not function type)134 reference to instance of type _110_0_T (not function type) 135 instance of type _110_0_T (not function type) 214 136 ... returning 215 _retval__operator_assign: instance of type [unbound](not function type)137 _retval__operator_assign: instance of type _110_0_T (not function type) 216 138 ... with attributes: 217 139 Attribute with name: unused -
tests/meta/.expect/archVast.nast.arm64.txt
rb5629d8 rf0d67e5 3 3 Name: FA64 4 4 ... to: 5 char6 ... with resolved type:7 5 char Alternatives are: 8 6 Cost ( 1, 0, 0, 0, 0, 0, 0 ): Explicit Cast of: 9 7 Variable Expression: FA64: signed int 10 ... with resolved type:11 signed int12 8 ... to: 13 char14 ... with resolved type:15 9 char 16 10 (types: … … 24 18 ... returning nothing 25 19 26 ... with resolved type:27 pointer to function28 accepting unspecified arguments29 ... returning nothing30 31 20 ... to: 32 char33 ... with resolved type:34 21 char 35 22 (types: … … 40 27 Cost ( 1, 0, 0, 0, 0, 0, 0 ): Explicit Cast of: 41 28 Variable Expression: FA64: double 42 ... with resolved type:43 double44 29 ... to: 45 char46 ... with resolved type:47 30 char 48 31 (types: -
tests/meta/.expect/archVast.nast.x64.txt
rb5629d8 rf0d67e5 3 3 Name: FX64 4 4 ... to: 5 char6 ... with resolved type:7 5 char Alternatives are: 8 6 Cost ( 1, 0, 0, 0, 0, 0, 0 ): Explicit Cast of: 9 7 Variable Expression: FX64: signed int 10 ... with resolved type:11 signed int12 8 ... to: 13 char14 ... with resolved type:15 9 char 16 10 (types: … … 24 18 ... returning nothing 25 19 26 ... with resolved type:27 pointer to function28 accepting unspecified arguments29 ... returning nothing30 31 20 ... to: 32 char33 ... with resolved type:34 21 char 35 22 (types: … … 40 27 Cost ( 1, 0, 0, 0, 0, 0, 0 ): Explicit Cast of: 41 28 Variable Expression: FX64: double 42 ... with resolved type:43 double44 29 ... to: 45 char46 ... with resolved type:47 30 char 48 31 (types: -
tests/meta/.expect/archVast.nast.x86.txt
rb5629d8 rf0d67e5 3 3 Name: FX86 4 4 ... to: 5 char6 ... with resolved type:7 5 char Alternatives are: 8 6 Cost ( 1, 0, 0, 0, 0, 0, 0 ): Explicit Cast of: 9 7 Variable Expression: FX86: signed int 10 ... with resolved type:11 signed int12 8 ... to: 13 char14 ... with resolved type:15 9 char 16 10 (types: … … 24 18 ... returning nothing 25 19 26 ... with resolved type:27 pointer to function28 accepting unspecified arguments29 ... returning nothing30 31 20 ... to: 32 char33 ... with resolved type:34 21 char 35 22 (types: … … 40 27 Cost ( 1, 0, 0, 0, 0, 0, 0 ): Explicit Cast of: 41 28 Variable Expression: FX86: double 42 ... with resolved type:43 double44 29 ... to: 45 char46 ... with resolved type:47 30 char 48 31 (types: -
tests/meta/.expect/archVast.oast.arm64.txt
rb5629d8 rf0d67e5 3 3 Name: FA64 4 4 ... to: 5 char6 with resolved type:7 5 char Alternatives are: 8 6 Cost ( 1, 0, 0, 0, 0, 0, 0 ): Explicit Cast of: … … 11 9 ... returning nothing 12 10 13 with resolved type:14 pointer to function15 accepting unspecified arguments16 ... returning nothing17 18 11 ... to: 19 char20 with resolved type:21 12 char 22 13 (types: … … 27 18 Cost ( 1, 0, 0, 0, 0, 0, 0 ): Explicit Cast of: 28 19 Variable Expression: FA64: double 29 with resolved type:30 double31 20 ... to: 32 char33 with resolved type:34 21 char 35 22 (types: … … 40 27 Cost ( 1, 0, 0, 0, 0, 0, 0 ): Explicit Cast of: 41 28 Variable Expression: FA64: signed int 42 with resolved type:43 signed int44 29 ... to: 45 char46 with resolved type:47 30 char 48 31 (types: -
tests/meta/.expect/archVast.oast.x64.txt
rb5629d8 rf0d67e5 3 3 Name: FX64 4 4 ... to: 5 char6 with resolved type:7 5 char Alternatives are: 8 6 Cost ( 1, 0, 0, 0, 0, 0, 0 ): Explicit Cast of: … … 11 9 ... returning nothing 12 10 13 with resolved type:14 pointer to function15 accepting unspecified arguments16 ... returning nothing17 18 11 ... to: 19 char20 with resolved type:21 12 char 22 13 (types: … … 27 18 Cost ( 1, 0, 0, 0, 0, 0, 0 ): Explicit Cast of: 28 19 Variable Expression: FX64: double 29 with resolved type:30 double31 20 ... to: 32 char33 with resolved type:34 21 char 35 22 (types: … … 40 27 Cost ( 1, 0, 0, 0, 0, 0, 0 ): Explicit Cast of: 41 28 Variable Expression: FX64: signed int 42 with resolved type:43 signed int44 29 ... to: 45 char46 with resolved type:47 30 char 48 31 (types: -
tests/meta/.expect/archVast.oast.x86.txt
rb5629d8 rf0d67e5 3 3 Name: FX86 4 4 ... to: 5 char6 with resolved type:7 5 char Alternatives are: 8 6 Cost ( 1, 0, 0, 0, 0, 0, 0 ): Explicit Cast of: … … 11 9 ... returning nothing 12 10 13 with resolved type:14 pointer to function15 accepting unspecified arguments16 ... returning nothing17 18 11 ... to: 19 char20 with resolved type:21 12 char 22 13 (types: … … 27 18 Cost ( 1, 0, 0, 0, 0, 0, 0 ): Explicit Cast of: 28 19 Variable Expression: FX86: double 29 with resolved type:30 double31 20 ... to: 32 char33 with resolved type:34 21 char 35 22 (types: … … 40 27 Cost ( 1, 0, 0, 0, 0, 0, 0 ): Explicit Cast of: 41 28 Variable Expression: FX86: signed int 42 with resolved type:43 signed int44 29 ... to: 45 char46 with resolved type:47 30 char 48 31 (types: -
tests/raii/.expect/ctor-autogen-ERR1.nast.txt
rb5629d8 rf0d67e5 7 7 signed int 8 8 ... returning nothing 9 10 ... with resolved type:11 function12 ... with parameters13 reference to instance of struct Managed with body14 signed int15 ... returning nothing16 9 17 10 ... deleted by: ?{}: function … … 30 23 signed int 31 24 32 ... with resolved type:33 pointer to function34 ... with parameters35 reference to signed int36 signed int37 ... returning38 signed int39 40 25 ... to arguments 41 26 Generated Cast of: … … 45 30 Generated Cast of: 46 31 Variable Expression: m: reference to instance of struct Managed with body 47 ... with resolved type:48 reference to instance of struct Managed with body49 32 ... to: 50 33 instance of struct Managed with body 51 ... with resolved type:52 instance of struct Managed with body53 ... with resolved type:54 signed int55 34 ... to: 56 reference to signed int57 ... with resolved type:58 35 reference to signed int 59 36 Generated Cast of: 60 37 Constant Expression (0: zero_t) 61 ... with resolved type:62 zero_t63 38 ... to: 64 39 signed int 65 ... with resolved type:66 signed int67 40 68 ... with resolved type:69 signed int70 41 ... with environment: 71 42 Types: … … 76 47 Generated Cast of: 77 48 Variable Expression: x: instance of struct Managed with body 78 ... with resolved type:79 instance of struct Managed with body80 49 ... to: 81 50 reference to instance of struct Managed with body 82 ... with resolved type:83 reference to instance of struct Managed with body84 51 Constant Expression (123: signed int) 85 ... with resolved type:86 signed int87 52 88 ... with resolved type:89 void90 53 ... to: nothing 91 ... with resolved type:92 void -
tests/raii/.expect/ctor-autogen-ERR1.oast.txt
rb5629d8 rf0d67e5 7 7 x: signed int 8 8 ... returning nothing 9 10 with resolved type:11 function12 ... with parameters13 _dst: reference to instance of struct Managed with body 114 x: signed int15 ... returning nothing16 9 17 10 ... deleted by: ?{}: function … … 33 26 34 27 35 with resolved type:36 pointer to function37 ... with parameters38 intrinsic reference to signed int39 intrinsic signed int40 ... returning41 _retval__operator_assign: signed int42 ... with attributes:43 Attribute with name: unused44 45 46 28 ... to arguments 47 29 Generated Cast of: … … 51 33 Generated Cast of: 52 34 Variable Expression: m: reference to instance of struct Managed with body 1 53 with resolved type:54 reference to instance of struct Managed with body 155 35 ... to: 56 36 instance of struct Managed with body 1 57 with resolved type:58 instance of struct Managed with body 159 with resolved type:60 signed int61 37 ... to: 62 reference to signed int63 with resolved type:64 38 reference to signed int 65 39 Generated Cast of: 66 40 constant expression (0 0: zero_t) 67 with resolved type:68 zero_t69 41 ... to: 70 42 signed int 71 with resolved type:72 signed int73 43 74 with resolved type:75 signed int76 44 ... with environment: 77 45 Types: … … 82 50 Generated Cast of: 83 51 Variable Expression: x: instance of struct Managed with body 1 84 with resolved type:85 instance of struct Managed with body 186 52 ... to: 87 53 reference to instance of struct Managed with body 1 88 with resolved type:89 reference to instance of struct Managed with body 190 54 constant expression (123 123: signed int) 91 with resolved type:92 signed int93 55 94 with resolved type:95 void96 56 ... to: nothing 97 with resolved type:98 void -
tests/warnings/.expect/self-assignment.nast.txt
rb5629d8 rf0d67e5 1 1 warnings/self-assignment.cfa:29:1 warning: self assignment of expression: Generated Cast of: 2 2 Variable Expression: j: signed int 3 ... with resolved type:4 signed int5 3 ... to: 6 reference to signed int7 ... with resolved type:8 4 reference to signed int 9 5 warnings/self-assignment.cfa:30:1 warning: self assignment of expression: Generated Cast of: 10 6 Variable Expression: s: instance of struct S with body 11 ... with resolved type:12 instance of struct S with body13 7 ... to: 14 reference to instance of struct S with body15 ... with resolved type:16 8 reference to instance of struct S with body 17 9 warnings/self-assignment.cfa:31:1 warning: self assignment of expression: Generated Cast of: … … 20 12 ... from aggregate: 21 13 Variable Expression: s: instance of struct S with body 22 ... with resolved type:23 instance of struct S with body24 ... with resolved type:25 signed int26 14 ... to: 27 reference to signed int28 ... with resolved type:29 15 reference to signed int 30 16 warnings/self-assignment.cfa:32:1 warning: self assignment of expression: Generated Cast of: … … 36 22 ... from aggregate: 37 23 Variable Expression: t: instance of struct T with body 38 ... with resolved type:39 instance of struct T with body40 ... with resolved type:41 instance of struct S with body42 ... with resolved type:43 signed int44 24 ... to: 45 reference to signed int46 ... with resolved type:47 25 reference to signed int 48 26 warnings/self-assignment.cfa: In function '_X4mainFi___1': -
tests/warnings/.expect/self-assignment.oast.txt
rb5629d8 rf0d67e5 1 1 warnings/self-assignment.cfa:29:1 warning: self assignment of expression: Generated Cast of: 2 2 Variable Expression: j: signed int 3 with resolved type:4 signed int5 3 ... to: 6 reference to signed int7 with resolved type:8 4 reference to signed int 9 5 warnings/self-assignment.cfa:30:1 warning: self assignment of expression: Generated Cast of: 10 6 Variable Expression: s: instance of struct S with body 1 11 with resolved type:12 instance of struct S with body 113 7 ... to: 14 reference to instance of struct S with body 115 with resolved type:16 8 reference to instance of struct S with body 1 17 9 warnings/self-assignment.cfa:31:1 warning: self assignment of expression: Generated Cast of: … … 20 12 ... from aggregate: 21 13 Variable Expression: s: instance of struct S with body 1 22 with resolved type:23 instance of struct S with body 124 with resolved type:25 signed int26 14 ... to: 27 reference to signed int28 with resolved type:29 15 reference to signed int 30 16 warnings/self-assignment.cfa:32:1 warning: self assignment of expression: Generated Cast of: … … 36 22 ... from aggregate: 37 23 Variable Expression: t: instance of struct T with body 1 38 with resolved type:39 instance of struct T with body 140 with resolved type:41 instance of struct S with body 142 with resolved type:43 signed int44 24 ... to: 45 reference to signed int46 with resolved type:47 25 reference to signed int 48 26 warnings/self-assignment.cfa: In function '_X4mainFi___1':
Note:
See TracChangeset
for help on using the changeset viewer.