Changeset 8e4aa05 for tests/zombies/hashtable.cfa
- Timestamp:
- Mar 4, 2021, 7:40:25 PM (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:
- 77d601f
- Parents:
- 342af53 (diff), a5040fe (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/zombies/hashtable.cfa
r342af53 r8e4aa05 14 14 15 15 16 trait has_hash( otypeK ) {16 trait has_hash( K ) { 17 17 size_t hash(K); 18 18 int ?==?( K, K ); 19 19 }; 20 20 21 trait hkey( otype K, dtype tN| has_hash(K) ) {21 trait hkey( K, tN & | has_hash(K) ) { 22 22 K key(tN &); 23 23 }; 24 24 25 forall( otype K, dtype tN, dtype tE| $dlistable(tN, tE) | hkey(K, tN) ) {25 forall( K, tN &, tE & | $dlistable(tN, tE) | hkey(K, tN) ) { 26 26 27 27 struct hashtable { … … 39 39 } 40 40 41 forall( otype K, dtype tN, dtype tE| $dlistable(tN, tE) | hkey(K, tN) | { void defaultResumptionHandler(ht_fill_limit_crossed &); } ) {41 forall( K, tN &, tE & | $dlistable(tN, tE) | hkey(K, tN) | { void defaultResumptionHandler(ht_fill_limit_crossed &); } ) { 42 42 43 43 void ?{}( hashtable(K, tN, tE) & this, size_t n_buckets, dlist(tN, tE) *buckets ) { … … 57 57 } 58 58 59 forall( otype K, dtype tN, dtype tE| $dlistable(tN, tE) | hkey(K, tN) ) {59 forall( K, tN &, tE & | $dlistable(tN, tE) | hkey(K, tN) ) { 60 60 61 61 float fill_frac( hashtable(K, tN, tE) & this ) with(this) { … … 124 124 125 125 126 trait heaped( dtype T) {126 trait heaped(T &) { 127 127 T * alloc( size_t ); 128 128 void free( void * ); … … 133 133 } 134 134 135 forall( otype K, dtype tN, dtype tE| $dlistable(tN, tE) | hkey(K, tN) | heaped( dlist(tN, tE) ) ) {135 forall( K, tN &, tE & | $dlistable(tN, tE) | hkey(K, tN) | heaped( dlist(tN, tE) ) ) { 136 136 137 137 struct hashtable_dynamic {
Note:
See TracChangeset
for help on using the changeset viewer.