Changeset 627f585
- Timestamp:
- Jan 10, 2017, 2:32:33 PM (8 years ago)
- 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:
- dd0c97b
- Parents:
- f831177
- Location:
- src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
src/InitTweak/FixInit.cc
rf831177 r627f585 1100 1100 addDeclaration( tmp ); 1101 1101 1102 // xxx - this can be TupleAssignExpr now. Need to properly handle this case. 1102 1103 ApplicationExpr * callExpr = safe_dynamic_cast< ApplicationExpr * > ( ctorExpr->get_callExpr() ); 1103 1104 TypeSubstitution * env = ctorExpr->get_env(); -
src/libcfa/stdlib
rf831177 r627f585 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // stdlib -- 7 // stdlib -- 8 8 // 9 9 // Author : Peter A. Buhr … … 44 44 void free( void * ptr ); 45 45 } // extern "C" 46 47 forall( otype T, ttype Params | { void ?{}(T *, Params); } ) T * new( Params p ); 48 forall( dtype T | { void ^?{}(T *); } ) void delete( T * ptr ); 49 46 50 47 51 //--------------------------------------- -
src/libcfa/stdlib.c
rf831177 r627f585 78 78 } // posix_memalign 79 79 80 forall( otype T, ttype Params | { void ?{}(T *, Params); } ) 81 T * new( Params p ) { 82 return ((T*)malloc()){ p }; 83 } 84 85 forall( dtype T | { void ^?{}(T *); } ) 86 void delete( T * ptr ) { 87 if ( ptr ) { 88 ^ptr{}; 89 free( ptr ); 90 } 91 } 92 80 93 //--------------------------------------- 81 94 -
src/tests/avltree/avl.h
rf831177 r627f585 19 19 forall(otype T | Comparable(T)) 20 20 int ?>?(T t1, T t2); 21 22 // xxx - unbound type variable problems when trying to use new instead of create 23 // forall( otype T, ttype Params | { void ?{}(T *, Params); } ) T * new( Params p ); 21 24 22 25 forall(dtype T | { void ^?{}(T *); }) -
src/tests/avltree/avl0.c
rf831177 r627f585 10 10 return t2 < t1; 11 11 } 12 13 forall(dtype T | { void ^?{}(T *); })14 void delete(T * x) {15 if (x) {16 ^?{}(x);17 free(x);18 }19 } -
src/tests/tupleVariadic.c
rf831177 r627f585 29 29 } 30 30 31 forall(otype T) T * malloc(); 32 33 forall(otype T, ttype Params | sized(T) | { void ?{}(T *, Params); }) 34 T * new(Params p) { 35 return ((T*)malloc()){ p }; 36 } 31 forall(otype T, ttype Params | { void ?{}(T *, Params); }) 32 T * new(Params p); 37 33 38 34 struct array {
Note: See TracChangeset
for help on using the changeset viewer.