- Timestamp:
- Mar 18, 2019, 2:32:26 PM (7 years ago)
- 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. - Location:
- libcfa/prelude
- Files:
-
- 2 edited
-
builtins.c (modified) (2 diffs)
-
prelude-gen.cc (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/prelude/builtins.c
r76d3ca6 r466b1c9 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:38 201813 // Update Count : 2012 // Last Modified On : Sun Mar 10 10:52:50 2019 13 // Update Count : 31 14 14 // 15 15 … … 26 26 // increment/decrement unification 27 27 28 static inline forall( dtype T | { T & ?+=?( T&, one_t ); } )29 T & ++? ( T& x ) { return x += 1; }28 static inline forall( dtype T | { T & ?+=?( T &, one_t ); } ) 29 T & ++? ( T & x ) { return x += 1; } 30 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; }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 33 34 static inline forall( dtype T | { T & ?-=?( T&, one_t ); } )35 T & --? ( T& x ) { return x -= 1; }34 static inline forall( dtype T | { T & ?-=?( T &, one_t ); } ) 35 T & --? ( T & x ) { return x -= 1; } 36 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; } 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; } 39 40 // universal typed pointer constant 41 42 static inline forall( dtype T ) T * intptr( uintptr_t addr ) { return (T *)addr; } 39 43 40 44 // exponentiation operator implementation -
libcfa/prelude/prelude-gen.cc
r76d3ca6 r466b1c9 10 10 // Created On : Sat Feb 16 08:44:58 2019 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Feb 18 09:47:33201913 // Update Count : 2 212 // Last Modified On : Fri Mar 8 16:00:22 2019 13 // Update Count : 26 14 14 // 15 15 … … 287 287 cout << "forall(ftype FT) FT * ?=?( FT * &, zero_t );" << endl; 288 288 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; 291 291 cout << endl; 292 292 … … 295 295 cout << "///////////////////////" << endl; 296 296 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; 304 303 305 304 for (auto op : pointerOperators) {
Note:
See TracChangeset
for help on using the changeset viewer.