Changeset 45c43e5 for src/prelude


Ignore:
Timestamp:
Feb 26, 2018, 12:49:55 PM (6 years ago)
Author:
Rob Schluntz <rschlunt@…>
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:
eddb399
Parents:
17fc7a5 (diff), 2c39855 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:/u/cforall/software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/prelude/builtins.c

    r17fc7a5 r45c43e5  
    2323void exit( int status, const char fmt[], ... ) __attribute__ (( format(printf, 2, 3), __nothrow__, __leaf__, __noreturn__ ));
    2424void abort ( const char fmt[], ... ) __attribute__ (( format(printf, 1, 2), __nothrow__, __leaf__, __noreturn__ ));
     25
     26// increment/decrement unification
     27
     28static inline forall( dtype T | { T& ?+=?( T&, one_t ); } )
     29T& ++? ( T& x ) { return x += 1; }
     30
     31static inline forall( dtype T | sized(T) | { void ?{}( T&, T ); void ^?{}( T& ); T& ?+=?( T&, one_t ); } )
     32T& ?++ ( T& x ) { T tmp = x; x += 1; return tmp; }
     33
     34static inline forall( dtype T | { T& ?-=?( T&, one_t ); } )
     35T& --? ( T& x ) { return x -= 1; }
     36
     37static inline forall( dtype T | sized(T) | { void ?{}( T&, T ); void ^?{}( T& ); T& ?-=?( T&, one_t ); } )
     38T& ?-- ( T& x ) { T tmp = x; x -= 1; return tmp; }
    2539
    2640// exponentiation operator implementation
Note: See TracChangeset for help on using the changeset viewer.