Changeset 50be6444
- Timestamp:
- Dec 9, 2024, 10:51:32 AM (9 days ago)
- Branches:
- master
- Children:
- 283fbdd
- Parents:
- 18a7dcf1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/prelude/builtins.c
r18a7dcf1 r50be6444 19 19 // members in user-defined functions. Note: needs to occur early, because it is used to generate destructor calls during 20 20 // code generation 21 forall( T & )21 forall( T & ) 22 22 struct __Destructor { 23 23 T * object; … … 26 26 27 27 // Defined destructor in the case that non-generated code wants to use __Destructor. 28 forall( T & )28 forall( T & ) 29 29 static inline void ^?{}( __Destructor(T) & x ) { 30 30 if ( x.object && x.dtor ) { … … 35 35 // Easy interface into __Destructor's destructor for easy codegen purposes. 36 36 extern "C" { 37 forall( T & )37 forall( T & ) 38 38 static inline void __destroy_Destructor( __Destructor(T) * dtor ) { 39 39 ^(*dtor){}; … … 51 51 void abort( const char fmt[], ... ) __attribute__ (( format( printf, 1, 2 ), __nothrow__, __leaf__, __noreturn__ )); 52 52 53 forall( T & )53 forall( T & ) 54 54 static inline T & identity( T & i ) { 55 55 return i; … … 62 62 63 63 static inline void ?{}( generator$ & this ) { ((int&)this) = 0; } 64 static inline void ^?{}( generator$ & ) {}64 static inline void ^?{}( generator$ & ) {} 65 65 66 66 forall( T & ) … … 248 248 } 249 249 250 E ?+=? 250 E ?+=?( E & l, one_t ) { 251 251 int pos = posn( l ); 252 252 l = fromInt_unsafe( pos + 1 ); … … 254 254 } 255 255 256 E ?-=? 256 E ?-=?( E & l, one_t ) { 257 257 int pos = posn( l ); 258 258 l = fromInt_unsafe( pos - 1 ); … … 260 260 } 261 261 262 E ?+=? 262 E ?+=?( E & l, int i ) { 263 263 int pos = posn( l ); 264 264 l = fromInt_unsafe( pos + i ); … … 266 266 } 267 267 268 E ?-=? 268 E ?-=?( E & l, int i ) { 269 269 int pos = posn( l ); 270 270 l = fromInt_unsafe( pos - i );
Note: See TracChangeset
for help on using the changeset viewer.