Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/prelude/builtins.c

    rb7c89aa rbf71cfd  
    1010// Created On       : Fri Jul 21 16:21:03 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun Aug  5 21:40:38 2018
    13 // Update Count     : 20
     12// Last Modified On : Thu Feb  8 12:47:59 2018
     13// Update Count     : 19
    1414//
    1515
     
    2222
    2323void 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__ ));
     24void abort ( const char fmt[], ... ) __attribute__ (( format(printf, 1, 2), __nothrow__, __leaf__, __noreturn__ ));
    2525
    2626// increment/decrement unification
     
    111111static inline unsigned int ?\=?( unsigned int & x, unsigned long int y ) { x = x \ y; return x; }
    112112
    113 // type that wraps a pointer and a destructor-like function - used in generating implicit destructor calls for struct members in user-defined functions
    114 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 __Destructor
    121 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 purposes
    129 extern "C" {
    130   forall(dtype T)
    131   static inline void __destroy_Destructor(__Destructor(T) * dtor) {
    132     ^(*dtor){};
    133   }
    134 }
    135 
    136113// Local Variables: //
    137114// mode: c //
Note: See TracChangeset for help on using the changeset viewer.