Changeset f7136f7 for libcfa/src


Ignore:
Timestamp:
Nov 2, 2020, 11:35:41 AM (5 years ago)
Author:
Thierry Delisle <tdelisle@…>
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.
Message:

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

Location:
libcfa/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/concurrency/clib/cfathread.cfa

    r51e7583 rf7136f7  
    5959        void cfathread_setproccnt( int ncnt ) {
    6060                assert( ncnt >= 1 );
    61                 adelete(proc_cnt, procs);
     61                adelete( procs );
    6262
    6363                proc_cnt = ncnt - 1;
  • libcfa/src/stdlib.cfa

    r51e7583 rf7136f7  
    5858
    5959forall( dtype T | sized(T) | { void ^?{}( T & ); } )
    60 void adelete( size_t dim, T arr[] ) {
     60void adelete( T arr[] ) {
    6161        if ( arr ) {                                                                            // ignore null
     62                size_t dim = malloc_size( arr ) / sizeof( T );
    6263                for ( int i = dim - 1; i >= 0; i -= 1 ) {               // reverse allocation order, must be unsigned
    6364                        ^(arr[i]){};                                                            // run destructor
     
    6869
    6970forall( dtype T | sized(T) | { void ^?{}( T & ); }, ttype Params | { void adelete( Params ); } )
    70 void adelete( size_t dim, T arr[], Params rest ) {
     71void adelete( T arr[], Params rest ) {
    7172        if ( arr ) {                                                                            // ignore null
     73                size_t dim = malloc_size( arr ) / sizeof( T );
    7274                for ( int i = dim - 1; i >= 0; i -= 1 ) {               // reverse allocation order, must be unsigned
    7375                        ^(arr[i]){};                                                            // run destructor
  • libcfa/src/stdlib.hfa

    r51e7583 rf7136f7  
    263263// Cforall allocation/deallocation and constructor/destructor, array types
    264264forall( 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 );
     265forall( dtype T | sized(T) | { void ^?{}( T & ); } ) void adelete( T arr[] );
     266forall( dtype T | sized(T) | { void ^?{}( T & ); }, ttype Params | { void adelete( Params ); } ) void adelete( T arr[], Params rest );
    267267
    268268//---------------------------------------
Note: See TracChangeset for help on using the changeset viewer.