Changeset 5780d0d for libcfa/prelude
- Timestamp:
- Dec 18, 2024, 10:33:40 AM (5 weeks ago)
- Branches:
- master
- Children:
- faf9e19
- Parents:
- 94aa202
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/prelude/builtins.c
r94aa202 r5780d0d 66 66 forall( T & ) 67 67 trait is_generator { 68 69 68 void main( T & this ); 69 generator$ * get_generator( T & this ); 70 70 }; 71 71 … … 234 234 static inline 235 235 forall( E | Serial( E ) ) { 236 E ++?( E & l) {236 E ?+=?( E & l, one_t ) { 237 237 int pos = fromInstance( l ); 238 238 l = fromInt_unsafe( pos + 1 ); … … 240 240 } 241 241 242 E --?( E & l) {242 E ?-=?( E & l, one_t ) { 243 243 int pos = fromInstance( l ); 244 244 l = fromInt_unsafe( pos - 1 ); … … 246 246 } 247 247 248 E ?+=?( E & l, one_t ) {249 int pos = fromInstance( l );250 l = fromInt_unsafe( pos + 1 );251 return l;252 }253 254 E ?-=?( E & l, one_t ) {255 int pos = fromInstance( l );256 l = fromInt_unsafe( pos - 1 );257 return l;258 }259 260 248 E ?+=?( E & l, int i ) { 261 249 int pos = fromInstance( l ); … … 268 256 l = fromInt_unsafe( pos - i ); 269 257 return l; 270 }271 272 E ?++( E & l ) {273 int pos = fromInstance( l );274 l = fromInt_unsafe( pos + 1 );275 return fromInt_unsafe( pos );276 }277 278 E ?--( E & l ) {279 int pos = fromInstance( l );280 l = fromInt_unsafe( pos - 1 );281 return fromInt_unsafe( pos );282 258 } 283 259 }
Note: See TracChangeset
for help on using the changeset viewer.