Changeset 466b1c9 for libcfa


Ignore:
Timestamp:
Mar 18, 2019, 2:32:26 PM (7 years ago)
Author:
tdelisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
78e109f
Parents:
76d3ca6 (diff), a927662 (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:software/cfa/cfa-cc

Location:
libcfa/prelude
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libcfa/prelude/builtins.c

    r76d3ca6 r466b1c9  
    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 : Sun Mar 10 10:52:50 2019
     13// Update Count     : 31
    1414//
    1515
     
    2626// increment/decrement unification
    2727
    28 static inline forall( dtype T | { T& ?+=?( T&, one_t ); } )
    29 T& ++? ( T& x ) { return x += 1; }
     28static inline forall( dtype T | { T & ?+=?( T &, one_t ); } )
     29T & ++? ( T & x ) { return x += 1; }
    3030
    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; }
     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; }
    3333
    34 static inline forall( dtype T | { T& ?-=?( T&, one_t ); } )
    35 T& --? ( T& x ) { return x -= 1; }
     34static inline forall( dtype T | { T & ?-=?( T &, one_t ); } )
     35T & --? ( T & x ) { return x -= 1; }
    3636
    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; }
     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; }
     39
     40// universal typed pointer constant
     41
     42static inline forall( dtype T ) T * intptr( uintptr_t addr ) { return (T *)addr; }
    3943
    4044// exponentiation operator implementation
  • libcfa/prelude/prelude-gen.cc

    r76d3ca6 r466b1c9  
    1010// Created On       : Sat Feb 16 08:44:58 2019
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Feb 18 09:47:33 2019
    13 // Update Count     : 22
     12// Last Modified On : Fri Mar  8 16:00:22 2019
     13// Update Count     : 26
    1414//
    1515
     
    287287        cout << "forall(ftype FT) FT *                  ?=?( FT *          &, zero_t );" << endl;
    288288        cout << "forall(ftype FT) FT *                  ?=?( FT * volatile &, zero_t );" << endl;
    289         cout << "forall( ftype FT ) void        ?{}( FT *          & );" << endl;
    290         cout << "forall( ftype FT ) void        ^?{}( FT *         & );" << endl;
     289        cout << "forall(ftype FT) void  ?{}( FT *          & );" << endl;
     290        cout << "forall(ftype FT) void  ^?{}( FT *         & );" << endl;
    291291        cout << endl;
    292292
     
    295295        cout << "///////////////////////" << endl;
    296296
    297         cout << "forall( ftype FT ) FT *                        ?=?( FT *&, FT * );" << endl;
    298         cout << "forall( ftype FT ) FT *                        ?=?( FT * volatile &, FT * );" << endl;
    299         cout << "forall( ftype FT ) int !?( FT * );" << endl;
    300         cout << "forall( ftype FT ) signed int ?==?( FT *, FT * );" << endl;
    301         cout << "forall( ftype FT ) signed int ?!=?( FT *, FT * );" << endl;
    302         cout << "forall( ftype FT ) FT &                 *?( FT * );" << endl;
    303 
     297        cout << "forall(ftype FT) FT *                  ?=?( FT *&, FT * );" << endl;
     298        cout << "forall(ftype FT) FT *                  ?=?( FT * volatile &, FT * );" << endl;
     299        cout << "forall(ftype FT) int !?( FT * );" << endl;
     300        cout << "forall(ftype FT) signed int ?==?( FT *, FT * );" << endl;
     301        cout << "forall(ftype FT) signed int ?!=?( FT *, FT * );" << endl;
     302        cout << "forall(ftype FT) FT &           *?( FT * );" << endl;
    304303
    305304        for (auto op : pointerOperators) {
Note: See TracChangeset for help on using the changeset viewer.