Changeset f7136f7 for libcfa/src
- Timestamp:
- Nov 2, 2020, 11:35:41 AM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- e873838
- Parents:
- 51e7583 (diff), ea3fa25 (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/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/clib/cfathread.cfa
r51e7583 rf7136f7 59 59 void cfathread_setproccnt( int ncnt ) { 60 60 assert( ncnt >= 1 ); 61 adelete( proc_cnt, procs);61 adelete( procs ); 62 62 63 63 proc_cnt = ncnt - 1; -
libcfa/src/stdlib.cfa
r51e7583 rf7136f7 58 58 59 59 forall( dtype T | sized(T) | { void ^?{}( T & ); } ) 60 void adelete( size_t dim,T arr[] ) {60 void adelete( T arr[] ) { 61 61 if ( arr ) { // ignore null 62 size_t dim = malloc_size( arr ) / sizeof( T ); 62 63 for ( int i = dim - 1; i >= 0; i -= 1 ) { // reverse allocation order, must be unsigned 63 64 ^(arr[i]){}; // run destructor … … 68 69 69 70 forall( dtype T | sized(T) | { void ^?{}( T & ); }, ttype Params | { void adelete( Params ); } ) 70 void adelete( size_t dim,T arr[], Params rest ) {71 void adelete( T arr[], Params rest ) { 71 72 if ( arr ) { // ignore null 73 size_t dim = malloc_size( arr ) / sizeof( T ); 72 74 for ( int i = dim - 1; i >= 0; i -= 1 ) { // reverse allocation order, must be unsigned 73 75 ^(arr[i]){}; // run destructor -
libcfa/src/stdlib.hfa
r51e7583 rf7136f7 263 263 // Cforall allocation/deallocation and constructor/destructor, array types 264 264 forall( dtype T | sized(T), ttype Params | { void ?{}( T &, Params ); } ) T * anew( size_t dim, Params p ); 265 forall( dtype T | sized(T) | { void ^?{}( T & ); } ) void adelete( size_t dim,T arr[] );266 forall( dtype T | sized(T) | { void ^?{}( T & ); }, ttype Params | { void adelete( Params ); } ) void adelete( size_t dim,T arr[], Params rest );265 forall( dtype T | sized(T) | { void ^?{}( T & ); } ) void adelete( T arr[] ); 266 forall( dtype T | sized(T) | { void ^?{}( T & ); }, ttype Params | { void adelete( Params ); } ) void adelete( T arr[], Params rest ); 267 267 268 268 //---------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.