Ignore:
Timestamp:
Jan 21, 2021, 2:24:01 PM (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:
7d01186d
Parents:
5869cea (diff), 1adab3e (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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/zombies/hashtable.cfa

    r5869cea r7b91c0e  
    1414
    1515
    16 trait has_hash( otype K ) {
     16trait has_hash( K ) {
    1717    size_t hash(K);
    1818    int ?==?( K, K );
    1919};
    2020
    21 trait hkey( otype K, dtype tN | has_hash(K) ) {
     21trait hkey( K, tN & | has_hash(K) ) {
    2222    K key(tN &);
    2323};
    2424
    25 forall( otype K, dtype tN, dtype tE | $dlistable(tN, tE) | hkey(K, tN) ) {
     25forall( K, tN &, tE & | $dlistable(tN, tE) | hkey(K, tN) ) {
    2626
    2727    struct hashtable {
     
    3939}
    4040
    41 forall( otype K, dtype tN, dtype tE | $dlistable(tN, tE) | hkey(K, tN) | { void defaultResumptionHandler(ht_fill_limit_crossed &); } ) {
     41forall( K, tN &, tE & | $dlistable(tN, tE) | hkey(K, tN) | { void defaultResumptionHandler(ht_fill_limit_crossed &); } ) {
    4242
    4343    void ?{}( hashtable(K, tN, tE) & this, size_t n_buckets, dlist(tN, tE) *buckets ) {
     
    5757}
    5858
    59 forall( otype K, dtype tN, dtype tE | $dlistable(tN, tE) | hkey(K, tN) ) {
     59forall( K, tN &, tE & | $dlistable(tN, tE) | hkey(K, tN) ) {
    6060
    6161    float fill_frac( hashtable(K, tN, tE) & this ) with(this) {
     
    124124
    125125
    126 trait heaped(dtype T) {
     126trait heaped(T &) {
    127127    T * alloc( size_t );
    128128    void free( void * );
     
    133133}
    134134
    135 forall( otype K, dtype tN, dtype tE | $dlistable(tN, tE) | hkey(K, tN) | heaped( dlist(tN, tE) ) ) {
     135forall( K, tN &, tE & | $dlistable(tN, tE) | hkey(K, tN) | heaped( dlist(tN, tE) ) ) {
    136136
    137137    struct hashtable_dynamic {
Note: See TracChangeset for help on using the changeset viewer.