Changes in libcfa/prelude/builtins.c [b7c89aa:bf71cfd]
- File:
-
- 1 edited
-
libcfa/prelude/builtins.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/prelude/builtins.c
rb7c89aa rbf71cfd 10 10 // Created On : Fri Jul 21 16:21:03 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sun Aug 5 21:40:38201813 // Update Count : 2012 // Last Modified On : Thu Feb 8 12:47:59 2018 13 // Update Count : 19 14 14 // 15 15 … … 22 22 23 23 void exit( int status, const char fmt[], ... ) __attribute__ (( format(printf, 2, 3), __nothrow__, __leaf__, __noreturn__ )); 24 void abort ( const char fmt[], ... ) __attribute__ (( format(printf, 1, 2), __nothrow__, __leaf__, __noreturn__ ));24 void abort ( const char fmt[], ... ) __attribute__ (( format(printf, 1, 2), __nothrow__, __leaf__, __noreturn__ )); 25 25 26 26 // increment/decrement unification … … 111 111 static inline unsigned int ?\=?( unsigned int & x, unsigned long int y ) { x = x \ y; return x; } 112 112 113 // type that wraps a pointer and a destructor-like function - used in generating implicit destructor calls for struct members in user-defined functions114 forall(dtype T)115 struct __Destructor {116 T * object;117 void (*dtor)(T *);118 };119 120 // defined destructor in the case that non-generated code wants to use __Destructor121 forall(dtype T)122 static inline void ^?{}(__Destructor(T) & x) {123 if (x.object && x.dtor) {124 x.dtor(x.object);125 }126 }127 128 // easy interface into __Destructor's destructor for easy codegen purposes129 extern "C" {130 forall(dtype T)131 static inline void __destroy_Destructor(__Destructor(T) * dtor) {132 ^(*dtor){};133 }134 }135 136 113 // Local Variables: // 137 114 // mode: c //
Note:
See TracChangeset
for help on using the changeset viewer.