Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/zombies/hashtable.cfa

    rfd54fef r87b9332  
    1414
    1515
    16 trait has_hash( K ) {
     16trait has_hash( otype K ) {
    1717    size_t hash(K);
    1818    int ?==?( K, K );
    1919};
    2020
    21 trait hkey( K, tN & | has_hash(K) ) {
     21trait hkey( otype K, dtype tN | has_hash(K) ) {
    2222    K key(tN &);
    2323};
    2424
    25 forall( K, tN &, tE & | $dlistable(tN, tE) | hkey(K, tN) ) {
     25forall( otype K, dtype tN, dtype tE | $dlistable(tN, tE) | hkey(K, tN) ) {
    2626
    2727    struct hashtable {
     
    3939}
    4040
    41 forall( K, tN &, tE & | $dlistable(tN, tE) | hkey(K, tN) | { void defaultResumptionHandler(ht_fill_limit_crossed &); } ) {
     41forall( otype K, dtype tN, dtype 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( K, tN &, tE & | $dlistable(tN, tE) | hkey(K, tN) ) {
     59forall( otype K, dtype tN, dtype tE | $dlistable(tN, tE) | hkey(K, tN) ) {
    6060
    6161    float fill_frac( hashtable(K, tN, tE) & this ) with(this) {
     
    124124
    125125
    126 trait heaped(T &) {
     126trait heaped(dtype T) {
    127127    T * alloc( size_t );
    128128    void free( void * );
     
    133133}
    134134
    135 forall( K, tN &, tE & | $dlistable(tN, tE) | hkey(K, tN) | heaped( dlist(tN, tE) ) ) {
     135forall( otype K, dtype tN, dtype 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.