Changeset d2887f7
- Timestamp:
- Feb 22, 2018, 3:45:12 PM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 8f13c98, d8548e2
- Parents:
- 4136ae4
- Location:
- src
- Files:
-
- 2 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/prelude/builtins.c
r4136ae4 rd2887f7 23 23 void exit( int status, const char fmt[], ... ) __attribute__ (( format(printf, 2, 3), __nothrow__, __leaf__, __noreturn__ )); 24 24 void abort ( const char fmt[], ... ) __attribute__ (( format(printf, 1, 2), __nothrow__, __leaf__, __noreturn__ )); 25 26 // increment/decrement unification 27 28 static inline forall( dtype T | { T& ?+=?( T&, one_t ); } ) 29 T& ++? ( T& x ) { return x += 1; } 30 31 static inline forall( dtype T | sized(T) | { void ?{}( T&, T ); void ^?{}( T& ); T& ?+=?( T&, one_t ); } ) 32 T& ?++ ( T& x ) { T tmp = x; x += 1; return tmp; } 33 34 static inline forall( dtype T | { T& ?-=?( T&, one_t ); } ) 35 T& --? ( T& x ) { return x -= 1; } 36 37 static inline forall( dtype T | sized(T) | { void ?{}( T&, T ); void ^?{}( T& ); T& ?-=?( T&, one_t ); } ) 38 T& ?-- ( T& x ) { T tmp = x; x -= 1; return tmp; } 25 39 26 40 // exponentiation operator implementation
Note: See TracChangeset
for help on using the changeset viewer.