diff --git a/LOG b/LOG index 366d9d29f0..6942081fb1 100644 --- a/LOG +++ b/LOG @@ -532,3 +532,8 @@ - don't remove the pariah form in the cp0 pass cp0.ss, misc.ms +- revert use of ephemerons in weak hashtables, add ephemeron + hashtables + newhash.ss, hashtable-types.ss, library.ss, primdata.ss, + fasl.ss, fasl.c, gc.c, globals.h, + hash.ms, objects.stex, release_notes.stex \ No newline at end of file diff --git a/c/fasl.c b/c/fasl.c index 8bc65837a7..e24934d4d7 100644 --- a/c/fasl.c +++ b/c/fasl.c @@ -722,7 +722,7 @@ static void faslin(ptr tc, ptr *x, ptr t, ptr *pstrbuf, faslFile f) { return; } case fasl_type_eq_hashtable: { - ptr rtd, ht, v; IBOOL weakp; uptr veclen, i, n; + ptr rtd, ht, v; uptr subtype; uptr veclen, i, n; if ((rtd = S_G.eq_ht_rtd) == Sfalse) { S_G.eq_ht_rtd = rtd = SYMVAL(S_intern((const unsigned char *)"$eq-ht-rtd")); if (!Srecordp(rtd)) S_error_abort("$eq-ht-rtd has not been set"); @@ -731,7 +731,15 @@ static void faslin(ptr tc, ptr *x, ptr t, ptr *pstrbuf, faslFile f) { RECORDINSTTYPE(ht) = rtd; INITPTRFIELD(ht,eq_hashtable_type_disp) = S_G.eq_symbol; INITPTRFIELD(ht,eq_hashtable_mutablep_disp) = bytein(f) ? Strue : Sfalse; - INITPTRFIELD(ht,eq_hashtable_weakp_disp) = (weakp = bytein(f)) ? Strue : Sfalse; + switch ((subtype = bytein(f))) { + case eq_hashtable_subtype_normal: + case eq_hashtable_subtype_weak: + case eq_hashtable_subtype_ephemeron: + INITPTRFIELD(ht,eq_hashtable_subtype_disp) = FIX(subtype); + break; + default: + S_error2("", "invalid eq-hashtable subtype code", FIX(subtype), f->uf->path); + } INITPTRFIELD(ht,eq_hashtable_minlen_disp) = FIX(uptrin(f)); veclen = uptrin(f); INITPTRFIELD(ht,eq_hashtable_vec_disp) = v = S_vector(veclen); @@ -740,7 +748,18 @@ static void faslin(ptr tc, ptr *x, ptr t, ptr *pstrbuf, faslFile f) { for (i = 0; i < veclen ; i += 1) { INITVECTIT(v, i) = FIX(i); } while (n > 0) { ptr keyval; - keyval = weakp ? S_cons_in(space_weakpair, 0, FIX(0), FIX(0)) : Scons(FIX(0), FIX(0)); + switch (subtype) { + case eq_hashtable_subtype_normal: + keyval = Scons(FIX(0), FIX(0)); + break; + case eq_hashtable_subtype_weak: + keyval = S_cons_in(space_weakpair, 0, FIX(0), FIX(0)); + break; + case eq_hashtable_subtype_ephemeron: + default: + keyval = S_cons_in(space_ephemeron, 0, FIX(0), FIX(0)); + break; + } faslin(tc, &INITCAR(keyval), t, pstrbuf, f); faslin(tc, &INITCDR(keyval), t, pstrbuf, f); i = ((uptr)Scar(keyval) >> primary_type_bits) & (veclen - 1); diff --git a/c/gc.c b/c/gc.c index e67bf87ddc..329d576eba 100644 --- a/c/gc.c +++ b/c/gc.c @@ -1205,7 +1205,7 @@ void GCENTRY(ptr tc, IGEN mcg, IGEN tg) { for (b = TLCNEXT(tlc); !Sfixnump(b); b = TLCNEXT(b)); old_idx = UNFIX(b); - if (key == Sbwp_object && PTRFIELD(ht,eq_hashtable_weakp_disp) != Sfalse) { + if (key == Sbwp_object && PTRFIELD(ht,eq_hashtable_subtype_disp) != FIX(eq_hashtable_subtype_normal)) { /* remove tlc */ b = Svector_ref(vec, old_idx); if (b == tlc) { diff --git a/csug/objects.stex b/csug/objects.stex index d243e7107a..f92a428756 100644 --- a/csug/objects.stex +++ b/csug/objects.stex @@ -1847,9 +1847,13 @@ except the keys of the hashtable are held weakly, i.e., they are not protected from the garbage collector. Keys reclaimed by the garbage collector are removed from the table, and their associated values are dropped the next time the table -is modified, if not sooner. A value in the hashtable can refer to a -key in the hashtable without preventing the garbage collector from -reclaiming the key (because keys are paired values using ephemeron pairs). +is modified, if not sooner. + +Values in the hashtable are referenced normally as long as the key is +not reclaimed, since keys are paired values using weak pairs. Consequently, +if a value in the hashtable refers to its own key, then +garbage collection is prevented from reclaiming the key. See +\scheme{make-ephemeron-eq-hashtable} and \scheme{make-ephemeron-eqv-hashtable}. A copy of a weak eq or eqv hashtable created by \scheme{hashtable-copy} is also weak. @@ -1864,6 +1868,32 @@ The effect of this can be observed via \scheme{hashtable-keys} and \endschemedisplay +%---------------------------------------------------------------------------- +\entryheader +\formdef{make-ephemeron-eq-hashtable}{\categoryprocedure}{(make-ephemeron-eq-hashtable)} +\formdef{make-ephemeron-eq-hashtable}{\categoryprocedure}{(make-ephemeron-eq-hashtable \var{size})} +\formdef{make-ephemeron-eqv-hashtable}{\categoryprocedure}{(make-ephemeron-eqv-hashtable)} +\formdef{make-ephemeron-eqv-hashtable}{\categoryprocedure}{(make-ephemeron-eqv-hashtable \var{size})} +\returns a new ephemeron eq hashtable +\listlibraries +\endentryheader + +These procedures are like \scheme{make-weak-eq-hashtable} and +\scheme{make-weak-eqv-hashtable}, but a value in the hashtable can refer to a +key in the hashtable without preventing garbage collection from +reclaiming the key, because keys are paired with values using ephemeron pairs. + +A copy of an ephemeron eq or eqv hashtable created by +\scheme{hashtable-copy} is also an ephemeron table, and inaccesible +key can be dropped from an immutable ephemeron hashtable in the same +way as for an immutable weak hashtable. + +\schemedisplay +(define ht1 (make-ephemeron-eq-hashtable)) +(define ht2 (make-ephemeron-eq-hashtable 32)) +\endschemedisplay + + %---------------------------------------------------------------------------- \entryheader \formdef{hashtable-weak?}{\categoryprocedure}{(hashtable-weak? \var{obj})} @@ -1878,6 +1908,20 @@ The effect of this can be observed via \scheme{hashtable-keys} and \endschemedisplay +%---------------------------------------------------------------------------- +\entryheader +\formdef{hashtable-ephemeron?}{\categoryprocedure}{(hashtable-ephemeron? \var{obj})} +\returns \scheme{#t} if \var{obj} is an ephemeron eq or eqv hashtable, \scheme{#f} otherwise +\listlibraries +\endentryheader + +\schemedisplay +(define ht1 (make-ephemeron-eq-hashtable)) +(define ht2 (hashtable-copy ht1)) +(hashtable-ephemeron? ht2) ;=> #t +\endschemedisplay + + %---------------------------------------------------------------------------- \entryheader \formdef{eq-hashtable?}{\categoryprocedure}{(eq-hashtable? \var{obj})} @@ -1904,6 +1948,20 @@ The effect of this can be observed via \scheme{hashtable-keys} and (eq-hashtable-weak? (make-weak-eq-hashtable)) ;=> #t \endschemedisplay +%---------------------------------------------------------------------------- +\entryheader +\formdef{eq-hashtable-ephemeron?}{\categoryprocedure}{(eq-hashtable-ephemeron? \var{hashtable})} +\returns \scheme{#t} if \var{hashtable} uses ephemeron pairs, \scheme{#f} otherwise +\listlibraries +\endentryheader + +\var{hashtable} must be an eq hashtable. + +\schemedisplay +(eq-hashtable-ephemeron? (make-eq-hashtable)) ;=> #f +(eq-hashtable-ephemeron? (make-ephemeron-eq-hashtable)) ;=> #t +\endschemedisplay + %---------------------------------------------------------------------------- \entryheader \formdef{eq-hashtable-set!}{\categoryprocedure}{(eq-hashtable-set! \var{hashtable} \var{key} \var{value})} diff --git a/mats/hash.ms b/mats/hash.ms index dcc77b45f9..38211f89b7 100644 --- a/mats/hash.ms +++ b/mats/hash.ms @@ -348,16 +348,22 @@ (hashtable-mutable? $ht) (not (hashtable-weak? $ht)) (not (eq-hashtable-weak? $ht)) + (not (hashtable-ephemeron? $ht)) + (not (eq-hashtable-ephemeron? $ht)) (hashtable? $imht) (eq-hashtable? $imht) (not (hashtable-mutable? $imht)) (not (hashtable-weak? $imht)) (not (eq-hashtable-weak? $imht)) + (not (hashtable-ephemeron? $imht)) + (not (eq-hashtable-ephemeron? $imht)) (hashtable? $ht2) (eq-hashtable? $ht2) (hashtable-mutable? $ht2) (not (hashtable-weak? $ht2)) - (not (eq-hashtable-weak? $ht2)))) + (not (eq-hashtable-weak? $ht2)) + (not (hashtable-ephemeron? $ht2)) + (not (eq-hashtable-ephemeron? $ht2)))) (not (hashtable? 3)) (not (hashtable? (make-vector 3))) (not (eq-hashtable? 3)) @@ -519,6 +525,13 @@ (hashtable-weak? $ht 3)) (error? ; not a hashtable (hashtable-weak? '(hash . table))) + ; hashtable-ephemeron? + (error? ; wrong argument count + (hashtable-ephemeron?)) + (error? ; wrong argument count + (hashtable-ephemeron? $ht 3)) + (error? ; not a hashtable + (hashtable-ephemeron? '(hash . table))) ) (mat hash-return-value @@ -612,25 +625,64 @@ (make-weak-eq-hashtable #t)) (error? ; invalid size (make-weak-eq-hashtable #f)) + ; make-weak-eq-hashtable + (error? ; wrong argument count + (make-ephemeron-eq-hashtable 3 #t)) + (error? ; invalid size + (make-ephemeron-eq-hashtable -1)) + (error? ; invalid size + (make-ephemeron-eq-hashtable #t)) + (error? ; invalid size + (make-ephemeron-eq-hashtable #f)) (begin (define $wht (make-weak-eq-hashtable 50)) + (define $eht (make-ephemeron-eq-hashtable 50)) (define $imht (hashtable-copy $wht)) + (define $imeht (hashtable-copy $eht)) (define $wht2 (make-weak-eq-hashtable)) + (define $eht2 (make-ephemeron-eq-hashtable)) (and (hashtable? $wht) + (hashtable? $eht) (eq-hashtable? $wht) + (eq-hashtable? $eht) (hashtable-weak? $wht) + (not (hashtable-ephemeron? $wht)) + (hashtable-ephemeron? $eht) + (not (hashtable-weak? $eht)) (eq-hashtable-weak? $wht) + (not (eq-hashtable-ephemeron? $wht)) + (eq-hashtable-ephemeron? $eht) + (not (eq-hashtable-weak? $eht)) (hashtable-mutable? $wht) + (hashtable-mutable? $eht) (hashtable? $imht) + (hashtable? $imeht) (eq-hashtable? $imht) + (eq-hashtable? $imeht) (hashtable-weak? $imht) + (not (hashtable-ephemeron? $imht)) + (hashtable-ephemeron? $imeht) + (not (hashtable-weak? $imeht)) (eq-hashtable-weak? $imht) + (not (eq-hashtable-ephemeron? $imht)) + (eq-hashtable-ephemeron? $imeht) + (not (eq-hashtable-weak? $imeht)) (not (hashtable-mutable? $imht)) + (not (hashtable-mutable? $imeht)) (hashtable? $wht2) + (hashtable? $eht2) (eq-hashtable? $wht2) + (eq-hashtable? $eht2) (hashtable-weak? $wht2) + (not (hashtable-ephemeron? $wht2)) + (hashtable-ephemeron? $eht2) + (not (hashtable-weak? $eht2)) (eq-hashtable-weak? $wht2) - (hashtable-mutable? $wht2))) + (not (eq-hashtable-ephemeron? $ht2)) + (eq-hashtable-ephemeron? $eht2) + (not (eq-hashtable-weak? $eht2)) + (hashtable-mutable? $wht2) + (hashtable-mutable? $eht2))) ; eq-hashtable-ref (error? ; wrong argument count (eq-hashtable-ref)) @@ -708,6 +760,13 @@ (eq-hashtable-weak? $ht 3)) (error? ; not a hashtable (eq-hashtable-weak? '(hash . table))) + ; eq-hashtable-ephemeron? + (error? ; wrong argument count + (eq-hashtable-ephemeron?)) + (error? ; wrong argument count + (eq-hashtable-ephemeron? $ht 3)) + (error? ; not a hashtable + (eq-hashtable-ephemeron? '(hash . table))) ) (mat symbol-hashtable-arguments @@ -833,6 +892,15 @@ (make-weak-eqv-hashtable #t)) (error? ; invalid size (make-weak-eqv-hashtable #f)) + ; make-ephemeron-eqv-hashtable + (error? ; wrong argument count + (make-ephemeron-eqv-hashtable 3 #t)) + (error? ; invalid size + (make-ephemeron-eqv-hashtable -1)) + (error? ; invalid size + (make-ephemeron-eqv-hashtable #t)) + (error? ; invalid size + (make-ephemeron-eqv-hashtable #f)) ) (mat nonweak-eq-hashtable @@ -842,7 +910,9 @@ (eq-hashtable? h) (hashtable-mutable? h) (not (eq-hashtable-weak? h)) - (not (hashtable-weak? h)))) + (not (eq-hashtable-ephemeron? h)) + (not (hashtable-weak? h)) + (not (hashtable-ephemeron? h)))) (eq? (hashtable-hash-function h) #f) (eq? (hashtable-equivalence-function h) eq?) (equal? (hashtable-size h) 0) @@ -899,7 +969,9 @@ (eq-hashtable? h2) (hashtable-mutable? h2) (not (hashtable-weak? h2)) - (not (eq-hashtable-weak? h2)))) + (not (eq-hashtable-weak? h2)) + (not (hashtable-ephemeron? h2)) + (not (eq-hashtable-ephemeron? h2)))) (eq? (hashtable-hash-function h2) #f) (eq? (hashtable-equivalence-function h2) eq?) (equal? (hashtable-size h2) 2) @@ -1174,8 +1246,7 @@ (list (hashtable-size ht) (= (#%$hashtable-veclen ht) len))) '(0 #t)) - ; test that weak-hashtable values do not imply that values - ; are reachable + ; test that weak-hashtable values *do* make keys reachable (let ([wk1 (list 1)] [wk2 (list 2)] [wk3 (list 3)] @@ -1186,6 +1257,242 @@ (hashtable-set! ht wk3 wk3) (hashtable-set! ht wk4 wk2) (collect (collect-maximum-generation)) + (and + (same-elements? (hashtable-keys ht) '#((1) (2) (3) (4))) + (equal? (hashtable-ref ht wk1 #f) wk1) + (equal? (hashtable-ref ht wk2 #f) wk1) + (equal? (hashtable-ref ht wk3 #f) wk3) + (equal? (hashtable-ref ht wk4 #f) wk2) + (begin + (set! wk1 #f) + (set! wk2 #f) + (set! wk3 #f) + (collect (collect-maximum-generation)) + (and + (same-elements? (hashtable-keys ht) '#((1) (2) (3) (4))) + (equal? (hashtable-ref ht wk4 #f) '(2)) + (begin + (set! wk4 #f) + (collect (collect-maximum-generation)) + (same-elements? (hashtable-keys ht) '#((1) (2) (3)))))))) +) + +(mat ephemeron-eq-hashtable + (begin + (define ka (list 'a)) ; will map to self \ Doesn't do anything to check + (define kb (list 'b)) ; will map to kc \ | ephemeronness, but just in + (define kc (list 'c)) ; will map to kb / / case. + (define kq (list 'q)) + (define ky (list 'y)) + (define kz (list 'z)) + #t) + (begin + (define h (make-ephemeron-eq-hashtable 32)) + (and (hashtable? h) + (eq-hashtable? h) + (hashtable-mutable? h) + (hashtable-ephemeron? h) + (eq-hashtable-ephemeron? h))) + (eq? (hashtable-hash-function h) #f) + (eq? (hashtable-equivalence-function h) eq?) + (equal? (hashtable-size h) 0) + (same-elements? (hashtable-keys h) '#()) + (same-elements? (hashtable-values h) '#()) + (equal-entries? (hashtable-entries h) '#() '#()) + (eqv? (hashtable-set! h ka ka) (void)) + (equal? + (list + (hashtable-contains? h ka) + (hashtable-contains? h kb) + (hashtable-contains? h kc)) + '(#t #f #f)) + (eqv? (hashtable-set! h kb kc) (void)) + (equal? + (list + (hashtable-contains? h ka) + (hashtable-contains? h kb) + (hashtable-contains? h kc)) + '(#t #t #f)) + (eqv? (hashtable-set! h kc kb) (void)) + (equal? + (list + (hashtable-contains? h ka) + (hashtable-contains? h kb) + (hashtable-contains? h kc)) + '(#t #t #t)) + (equal? (hashtable-size h) 3) + (same-elements? (hashtable-keys h) '#((a) (b) (c))) + (same-elements? (hashtable-values h) '#((a) (b) (c))) + (equal-entries? (hashtable-entries h) '#((a) (b) (c)) '#((a) (c) (b))) + #;(same-elements? (list->vector (hashtable-map h cons)) '#(((a) . a) ((b) . c) ((c) . b))) + #;(same-elements? + (let ([v (make-vector 3)] [i 0]) + (hashtable-for-each h (lambda (key val) (vector-set! v i (cons key val)) (set! i (fx+ i 1)))) + v) + '#(((a) . a) ((b) . c) ((c) . b))) + #;(same-elements? + (let ([v (make-vector 3)] [i 0]) + (hashtable-for-each-cell h (lambda (a) (vector-set! v i a) (set! i (fx+ i 1)))) + v) + '#(((a) . a) ((b) . c) ((c) . b))) + (equal? (hashtable-ref h ka 1) '(a)) + (equal? (hashtable-ref h kb #f) '(c)) + (equal? (hashtable-ref h kc 'nope) '(b)) + (eqv? (hashtable-delete! h kb) (void)) + (equal? (hashtable-size h) 2) + (same-elements? (hashtable-keys h) '#((a) (c))) + (same-elements? (hashtable-values h) '#((a) (b))) + (equal-entries? (hashtable-entries h) '#((a) (c)) '#((a) (b))) + (begin + (define h2 (hashtable-copy h #t)) + (and (hashtable? h2) + (eq-hashtable? h2) + (hashtable-mutable? h2) + (eq-hashtable-ephemeron? h2) + (hashtable-ephemeron? h2))) + (eq? (hashtable-hash-function h2) #f) + (eq? (hashtable-equivalence-function h2) eq?) + (equal? (hashtable-size h2) 2) + (same-elements? (hashtable-keys h2) '#((a) (c))) + (same-elements? (hashtable-values h2) '#((a) (b))) + (equal-entries? (hashtable-entries h2) '#((a) (c)) '#((a) (b))) + (eqv? (hashtable-clear! h 4) (void)) + (equal? + (list + (hashtable-size h) + (hashtable-ref h ka 1) + (hashtable-ref h kb #f) + (hashtable-ref h kc 'nope)) + '(0 1 #f nope)) + (same-elements? (hashtable-keys h) '#()) + (same-elements? (hashtable-values h) '#()) + (equal-entries? (hashtable-entries h) '#() '#()) + (equal? + (list + (hashtable-size h2) + (hashtable-ref h2 ka 1) + (hashtable-ref h2 kb #f) + (hashtable-ref h2 kc 'nope)) + '(2 (a) #f (b))) + (same-elements? (hashtable-keys h2) '#((a) (c))) + (same-elements? (hashtable-values h2) '#((a) (b))) + (equal-entries? (hashtable-entries h2) '#((a) (c)) '#((a) (b))) + (eqv? + (hashtable-update! h kq + (lambda (x) (+ x 1)) + 17) + (void)) + (equal? (hashtable-ref h kq #f) 18) + (eqv? + (hashtable-update! h kq + (lambda (x) (+ x 1)) + 17) + (void)) + (equal? (hashtable-ref h kq #f) 19) + (equal? (hashtable-size h) 1) + (same-elements? (hashtable-keys h) '#((q))) + (same-elements? (hashtable-values h) '#(19)) + (eqv? + (begin + (set! kq (void)) + (collect (collect-maximum-generation)) + (hashtable-size h)) + 0) + (same-elements? (hashtable-keys h) '#()) + (same-elements? (hashtable-values h) '#()) + (equal-entries? (hashtable-entries h) '#() '#()) + #;(eqv? (hashtable-map h (lambda args (error #f "oops"))) '()) + #;(eqv? (hashtable-for-each h (lambda args (error #f "oops"))) (void)) + #;(eqv? (hashtable-for-each-cell h (lambda args (error #f "oops"))) (void)) + (equal? (hashtable-ref h ky #f) #f) + (eqv? + (hashtable-set! h ky 'toad) + (void)) + (equal? (hashtable-ref h ky #f) 'toad) + (equal? (hashtable-ref h kz #f) #f) + (eqv? + (hashtable-update! h kz list 'frog) + (void)) + (equal? (hashtable-ref h kz #f) '(frog)) + (same-elements? (hashtable-keys h) (vector ky kz)) + (same-elements? (hashtable-values h) (vector (hashtable-ref h kz #f) 'toad)) + (equal-entries? + (hashtable-entries h) + (vector kz ky) + (vector (hashtable-ref h kz #f) 'toad)) + (eqv? (hashtable-ref h '(zippo) 'nil) 'nil) + (begin + (define h3 (hashtable-copy h2 #f)) + (and (hashtable? h3) + (eq-hashtable? h3) + (not (hashtable-mutable? h3)) + (eq-hashtable-ephemeron? h3) + (hashtable-ephemeron? h3))) + (same-elements? (hashtable-keys h2) '#((a) (c))) + (same-elements? (hashtable-keys h3) '#((a) (c))) + (same-elements? (hashtable-values h2) '#((a) (b))) + (same-elements? (hashtable-values h3) '#((a) (b))) + (equal? + (begin + (set! ka (void)) + (collect (collect-maximum-generation)) + (list (hashtable-size h2) (hashtable-size h3))) + '(1 1)) + (same-elements? (hashtable-keys h2) '#((c))) + (same-elements? (hashtable-keys h3) '#((c))) + (same-elements? (hashtable-values h2) '#((b))) + (same-elements? (hashtable-values h3) '#((b))) + (equal-entries? (hashtable-entries h2) '#((c)) '#((b))) + (equal-entries? (hashtable-entries h3) '#((c)) '#((b))) + (eqv? + (begin + (set! h3 (void)) + (collect (collect-maximum-generation)) + (hashtable-size h2)) + 1) + (same-elements? (hashtable-keys h2) '#((c))) + (same-elements? (hashtable-values h2) '#((b))) + (equal-entries? (hashtable-entries h2) '#((c)) '#((b))) + + ; test for proper shrinkage + (eqv? + (let ([ht (make-eq-hashtable 32)]) + (for-each + (lambda (k*) (for-each (lambda (k) (hashtable-delete! ht k)) k*)) + (let ([k** (map (lambda (x) (map list (make-list 1000))) + (make-list 100))]) + (for-each + (lambda (k*) (map (lambda (k) (hashtable-set! ht k 75)) k*)) + k**) + k**)) + (#%$hashtable-veclen ht)) + 32) + + ; test for proper shrinkage as objects are bwp'd + ; uses delete to trigger final shrinkage + (equal? + (let* ([ht (make-ephemeron-eq-hashtable 32)] + [len (#%$hashtable-veclen ht)]) + (hashtable-set! ht 'a 'b) + (for-each + (lambda (k*) (map (lambda (k) (hashtable-set! ht k 75)) k*)) + (map (lambda (x) (map list (make-list 1000))) (make-list 100))) + (collect (collect-maximum-generation)) + (hashtable-delete! ht 'a) + (list (hashtable-size ht) (= (#%$hashtable-veclen ht) len))) + '(0 #t)) + + ; test that ephemeron-hashtable values don't make keys reachable + (let ([wk1 (list 1)] + [wk2 (list 2)] + [wk3 (list 3)] + [wk4 (list 4)] + [ht (make-ephemeron-eq-hashtable)]) + (hashtable-set! ht wk1 wk1) + (hashtable-set! ht wk2 wk1) + (hashtable-set! ht wk3 wk3) + (hashtable-set! ht wk4 wk2) + (collect (collect-maximum-generation)) (and (same-elements? (hashtable-keys ht) '#((1) (2) (3) (4))) (equal? (hashtable-ref ht wk1 #f) wk1) @@ -1228,19 +1535,28 @@ (cons (random-object 4) (random-object 7)) (f (fx- n 1)))))] [ht (make-eq-hashtable)] - [wht (make-weak-eq-hashtable)]) + [wht (make-weak-eq-hashtable)] + [eht (make-ephemeron-eq-hashtable)]) (let ([ls2 (map (lambda (a1) (eq-hashtable-cell ht (car a1) (cdr a1))) ls1)] - [ls3 (map (lambda (a1) (hashtable-cell wht (car a1) (cdr a1))) ls1)]) - (unless (andmap (lambda (a1 a2 a3) + [ls3 (map (lambda (a1) (hashtable-cell wht (car a1) (cdr a1))) ls1)] + [ls4 (map (lambda (a1) (hashtable-cell eht (car a1) (cdr a1))) ls1)]) + (unless (andmap (lambda (a1 a2 a3 a4) (and (eq? (car a1) (car a2)) - (eq? (car a2) (car a3)))) - ls1 ls2 ls3) + (eq? (car a2) (car a3)) + (eq? (car a2) (car a4)))) + ls1 ls2 ls3 ls4) (errorf #f "keys are not eq")) - (unless (andmap (lambda (a1 a2 a3) + (unless (andmap (lambda (a1 a2 a3 a4) (and (eq? (cdr a1) (cdr a2)) - (eq? (cdr a2) (cdr a3)))) - ls1 ls2 ls3) + (eq? (cdr a2) (cdr a3)) + (eq? (cdr a2) (cdr a4)))) + ls1 ls2 ls3 ls4) (errorf #f "values are not eq")) + (for-each (lambda (a1) + (let ([o (random-object 3)]) + ;; Value refers to key: + (hashtable-set! eht o (list o (car a1))))) + ls1) (for-each (lambda (a1) (when (fx< (random 10) 5) @@ -1249,9 +1565,11 @@ (let loop ([i (min (expt (collect-generation-radix) (collect-maximum-generation)) 1000)]) (unless (fx= i 0) (collect) - (unless (andmap (lambda (a2 a3) (eq? (car a2) (car a3))) ls2 ls3) - (errorf #f "a2/a3 keys not eq after collection")) - (unless (andmap (lambda (a3) (not (bwp-object? (car a3)))) ls3) + (unless (andmap (lambda (a2 a3 a4) (and (eq? (car a2) (car a3)) (eq? (car a2) (car a4)))) + ls2 ls3 ls4) + (errorf #f "a2/a3/a4 keys not eq after collection")) + (unless (and (andmap (lambda (a3) (not (bwp-object? (car a3)))) ls3) + (andmap (lambda (a4) (not (bwp-object? (car a4)))) ls4)) (errorf #f "keys have been bwp'd")) (loop (fx- i 1)))) (for-each @@ -1262,28 +1580,37 @@ (unless (and (equal? (hashtable-keys ht) '#()) (equal? (hashtable-values ht) '#()) (zero? (hashtable-size ht))) - (errorf #f "wht has not been cleared out")) + (errorf #f "ht has not been cleared out")) (let loop ([i (min (expt (collect-generation-radix) (collect-maximum-generation)) 1000)]) (unless (fx= i 0) (collect) - (unless (andmap (lambda (a1 a3) - (or (not (car a1)) (eq? (car a1) (car a3)))) - ls1 ls3) - (errorf #f "a1/a3 keys not eq after collection")) + (unless (andmap (lambda (a1 a3 a4) + (or (not (car a1)) + (and (eq? (car a1) (car a3)) + (eq? (car a1) (car a4))))) + ls1 ls3 ls4) + (errorf #f "a1/a3/a4 keys not eq after collection")) (loop (fx- i 1)))) (for-each - (lambda (a1 a3) - (unless (or (car a1) (bwp-object? (car a3))) + (lambda (a1 a3 a4) + (unless (or (car a1) + (and (bwp-object? (car a3)) + (bwp-object? (car a4)))) (errorf #f "~s has not been bwp'd I" (car a3)))) - ls1 ls3) + ls1 ls3 ls4) (for-each (lambda (a1) (set-car! a1 #f)) ls1) (collect (collect-maximum-generation)) - (unless (andmap (lambda (a3) (bwp-object? (car a3))) ls3) + (unless (and (andmap (lambda (a3) (bwp-object? (car a3))) ls3) + (andmap (lambda (a4) (bwp-object? (car a4))) ls4)) (errorf #f "keys have not been bwp'd II")) (unless (and (equal? (hashtable-keys wht) '#()) (equal? (hashtable-values wht) '#()) - (zero? (hashtable-size ht))) - (errorf #f "wht has not been cleared out")))) + (zero? (hashtable-size wht))) + (errorf #f "wht has not been cleared out")) + (unless (and (equal? (hashtable-keys eht) '#()) + (equal? (hashtable-values eht) '#()) + (zero? (hashtable-size eht))) + (errorf #f "eht has not been cleared out")))) #t) ) @@ -1294,7 +1621,9 @@ (eq-hashtable? h) (hashtable-mutable? h) (not (eq-hashtable-weak? h)) - (not (hashtable-weak? h)))) + (not (hashtable-weak? h)) + (not (eq-hashtable-ephemeron? h)) + (not (hashtable-ephemeron? h)))) (eq? (hashtable-hash-function h) #f) (eq? (hashtable-equivalence-function h) eq?) (equal? (hashtable-size h) 0) @@ -1611,24 +1940,221 @@ (eq-hashtable-delete! ht 'a) (list (hashtable-size ht) (= (#%$hashtable-veclen ht) len))) '(0 #t)) + ) + +(mat $ephemeron-eq-hashtable + (begin + (define ka (list 'a)) + (define kb (list 'b)) + (define kc (list 'c)) + (define kq (list 'q)) + (define ky (list 'y)) + (define kz (list 'z)) + #t) + (begin + (define h (make-ephemeron-eq-hashtable 32)) + (and (hashtable? h) + (eq-hashtable? h) + (hashtable-mutable? h) + (eq-hashtable-ephemeron? h) + (hashtable-ephemeron? h))) + (eq? (hashtable-hash-function h) #f) + (eq? (hashtable-equivalence-function h) eq?) + (equal? (hashtable-size h) 0) + (same-elements? (hashtable-keys h) '#()) + (same-elements? (hashtable-values h) '#()) + (equal-entries? (hashtable-entries h) '#() '#()) + (eqv? (eq-hashtable-set! h ka 'aval) (void)) + (equal? + (list + (eq-hashtable-contains? h ka) + (eq-hashtable-contains? h kb) + (eq-hashtable-contains? h kc)) + '(#t #f #f)) + (eqv? (eq-hashtable-set! h kb 'bval) (void)) + (equal? + (list + (eq-hashtable-contains? h ka) + (eq-hashtable-contains? h kb) + (eq-hashtable-contains? h kc)) + '(#t #t #f)) + (eqv? (eq-hashtable-set! h kc 'cval) (void)) + (equal? + (list + (eq-hashtable-contains? h ka) + (eq-hashtable-contains? h kb) + (eq-hashtable-contains? h kc)) + '(#t #t #t)) + (equal? (hashtable-size h) 3) + (same-elements? (hashtable-keys h) '#((a) (b) (c))) + (same-elements? (hashtable-values h) '#(aval bval cval)) + (equal-entries? (hashtable-entries h) '#((a) (b) (c)) '#(aval bval cval)) + (equal? (eq-hashtable-ref h ka 1) 'aval) + (equal? (eq-hashtable-ref h kb #f) 'bval) + (equal? (eq-hashtable-ref h kc 'nope) 'cval) + (eqv? (eq-hashtable-delete! h kb) (void)) + (equal? (hashtable-size h) 2) + (same-elements? (hashtable-keys h) '#((a) (c))) + (same-elements? (hashtable-values h) '#(aval cval)) + (equal-entries? (hashtable-entries h) '#((a) (c)) '#(aval cval)) + (begin + (define h2 (hashtable-copy h #t)) + (and (hashtable? h2) + (eq-hashtable? h2) + (hashtable-mutable? h2) + (hashtable-ephemeron? h2) + (eq-hashtable-ephemeron? h2))) + (equal? (hashtable-size h2) 2) + (same-elements? (hashtable-keys h2) '#((a) (c))) + (same-elements? (hashtable-values h2) '#(aval cval)) + (equal-entries? (hashtable-entries h2) '#((a) (c)) '#(aval cval)) + (eqv? (hashtable-clear! h 4) (void)) + (equal? + (list + (hashtable-size h) + (eq-hashtable-ref h ka 1) + (eq-hashtable-ref h kb #f) + (eq-hashtable-ref h kc 'nope)) + '(0 1 #f nope)) + (same-elements? (hashtable-keys h) '#()) + (same-elements? (hashtable-values h) '#()) + (equal-entries? (hashtable-entries h) '#() '#()) + (equal? + (list + (hashtable-size h2) + (eq-hashtable-ref h2 ka 1) + (eq-hashtable-ref h2 kb #f) + (eq-hashtable-ref h2 kc 'nope)) + '(2 aval #f cval)) + (same-elements? (hashtable-keys h2) '#((a) (c))) + (same-elements? (hashtable-values h2) '#(aval cval)) + (equal-entries? (hashtable-entries h2) '#((a) (c)) '#(aval cval)) + (eqv? + (eq-hashtable-update! h kq + (lambda (x) (+ x 1)) + 17) + (void)) + (equal? (eq-hashtable-ref h kq #f) 18) + (eqv? + (eq-hashtable-update! h kq + (lambda (x) (+ x 1)) + 17) + (void)) + (equal? (eq-hashtable-ref h kq #f) 19) + (equal? (hashtable-size h) 1) + (same-elements? (hashtable-keys h) '#((q))) + (same-elements? (hashtable-values h) '#(19)) + (eqv? + (begin + (set! kq (void)) + (collect (collect-maximum-generation)) + (hashtable-size h)) + 0) + (same-elements? (hashtable-keys h) '#()) + (same-elements? (hashtable-values h) '#()) + (equal-entries? (hashtable-entries h) '#() '#()) + (equal? (eq-hashtable-ref h ky #f) #f) + (eqv? + (eq-hashtable-set! h ky 'toad) + (void)) + (equal? (eq-hashtable-ref h ky #f) 'toad) + (equal? (eq-hashtable-ref h kz #f) #f) + (eqv? + (eq-hashtable-update! h kz list 'frog) + (void)) + (equal? (eq-hashtable-ref h kz #f) '(frog)) + (same-elements? (hashtable-keys h) (vector ky kz)) + (same-elements? (hashtable-values h) (vector (eq-hashtable-ref h kz #f) 'toad)) + (equal-entries? + (hashtable-entries h) + (vector kz ky) + (vector (eq-hashtable-ref h kz #f) 'toad)) + (eqv? (eq-hashtable-ref h '(zippo) 'nil) 'nil) + (begin + (define h3 (hashtable-copy h2 #f)) + (and (hashtable? h3) + (eq-hashtable? h3) + (not (hashtable-mutable? h3)) + (eq-hashtable-ephemeron? h3) + (hashtable-ephemeron? h3))) + (same-elements? (hashtable-keys h2) '#((a) (c))) + (same-elements? (hashtable-keys h3) '#((a) (c))) + (same-elements? (hashtable-values h2) '#(aval cval)) + (same-elements? (hashtable-values h3) '#(aval cval)) + (equal? + (begin + (set! ka (void)) + (collect (collect-maximum-generation)) + (list (hashtable-size h2) (hashtable-size h3))) + '(1 1)) + (same-elements? (hashtable-keys h2) '#((c))) + (same-elements? (hashtable-keys h3) '#((c))) + (same-elements? (hashtable-values h2) '#(cval)) + (same-elements? (hashtable-values h3) '#(cval)) + (equal-entries? (hashtable-entries h2) '#((c)) '#(cval)) + (equal-entries? (hashtable-entries h3) '#((c)) '#(cval)) + (eqv? + (begin + (set! h3 (void)) + (collect (collect-maximum-generation)) + (hashtable-size h2)) + 1) + (same-elements? (hashtable-keys h2) '#((c))) + (same-elements? (hashtable-values h2) '#(cval)) + (equal-entries? (hashtable-entries h2) '#((c)) '#(cval)) + + ; test for proper shrinkage + (eqv? + (let ([ht (make-eq-hashtable 32)]) + (for-each + (lambda (k*) (for-each (lambda (k) (eq-hashtable-delete! ht k)) k*)) + (let ([k** (map (lambda (x) (map list (make-list 1000))) + (make-list 100))]) + (for-each + (lambda (k*) (map (lambda (k) (eq-hashtable-set! ht k 75)) k*)) + k**) + k**)) + (#%$hashtable-veclen ht)) + 32) + + ; test for proper shrinkage as objects are bwp'd + ; uses delete to trigger final shrinkage + (equal? + (let* ([ht (make-ephemeron-eq-hashtable 32)] + [len (#%$hashtable-veclen ht)]) + (eq-hashtable-set! ht 'a 'b) + (for-each + (lambda (k*) (map (lambda (k) (eq-hashtable-set! ht k 75)) k*)) + (map (lambda (x) (map list (make-list 1000))) (make-list 100))) + (collect (collect-maximum-generation)) + (eq-hashtable-delete! ht 'a) + (list (hashtable-size ht) (= (#%$hashtable-veclen ht) len))) + '(0 #t)) ) (mat eq-strange (begin (define $ht (make-eq-hashtable)) (define $wht (make-weak-eq-hashtable)) + (define $eht (make-ephemeron-eq-hashtable)) (and (hashtable? $ht) (eq-hashtable? $ht) (hashtable? $wht) - (eq-hashtable? $wht))) + (eq-hashtable? $wht) + (hashtable? $eht) + (eq-hashtable? $eht))) (eqv? (hashtable-set! $ht #f 75) (void)) (eqv? (hashtable-ref $ht #f 80) 75) (eqv? (hashtable-set! $wht #f 75) (void)) (eqv? (hashtable-ref $wht #f 80) 75) + (eqv? (hashtable-set! $eht #f 75) (void)) + (eqv? (hashtable-ref $eht #f 80) 75) (eqv? (hashtable-set! $ht #!bwp "hello") (void)) (equal? (hashtable-ref $ht #!bwp "goodbye") "hello") (eqv? (hashtable-set! $wht #!bwp "hello") (void)) (and (member (hashtable-ref $wht #!bwp "goodbye") '("hello" "goodbye")) #t) + (eqv? (hashtable-set! $eht #!bwp "hello") (void)) + (and (member (hashtable-ref $eht #!bwp "goodbye") '("hello" "goodbye")) #t) ; make sure that association isn't added before procedure is called (equal? (begin @@ -1644,6 +2170,13 @@ 'doll) (hashtable-ref $wht 'cupie 'oops)) '(barbie . doll)) + (equal? + (begin + (hashtable-update! $eht 'cupie + (lambda (x) (hashtable-ref $eht 'cupie (cons 'barbie x))) + 'doll) + (hashtable-ref $eht 'cupie 'oops)) + '(barbie . doll)) ) (mat eq-hashtable-stress @@ -1721,6 +2254,44 @@ (f (+ i 1) (remq k keep) drop))) (f (+ i 1) keep drop))))))))) + (let () ; ephemeron + (define pick + (lambda (ls) + (list-ref ls (random (length ls))))) + (define ht (make-ephemeron-eq-hashtable 4)) + (let ([ls (remq '|| (oblist))] [n 50000]) + (let f ([i 0] [keep '()] [drop '()]) + (if (= i n) + (and (<= (hashtable-size ht) (- n (length drop))) + (begin + (collect (collect-maximum-generation)) + (= (hashtable-size ht) (length keep))) + (andmap (lambda (k) + (string=? + (symbol->string (hashtable-ref ht k #f)) + (cond + [(string? k) k] + [(pair? k) (car k)] + [(vector? k) (vector-ref k 0)]))) + keep) + (andmap (lambda (k) (eq? (hashtable-ref ht k 'no) 'no)) + drop)) + (let* ([x (pick ls)] [s (string-copy (symbol->string x))]) + (let ([k (case (pick '(string pair vector)) + [(string) s] + [(pair) (list s)] + [(vector) (vector s)])]) + (hashtable-set! ht k x) + (let ([keep (if (= (modulo i 5) 0) (cons k keep) keep)]) + (if (= (modulo i 17) 5) + (let ([k (pick keep)]) + (hashtable-delete! ht k) + (let ([drop (cons k drop)]) + (when (= (random 5) 3) + (hashtable-delete! ht (pick drop))) + (f (+ i 1) (remq k keep) drop))) + (f (+ i 1) keep drop))))))))) + ) (mat nonweak-eqv-hashtable @@ -1729,7 +2300,8 @@ (and (hashtable? h) (not (eq-hashtable? h)) (hashtable-mutable? h) - (not (hashtable-weak? h)))) + (not (hashtable-weak? h)) + (not (hashtable-ephemeron? h)))) (eq? (hashtable-hash-function h) #f) (eq? (hashtable-equivalence-function h) eqv?) (equal? (hashtable-size h) 0) @@ -1784,7 +2356,8 @@ (define h2 (hashtable-copy h #t)) (and (hashtable? h2) (hashtable-mutable? h2) - (not (hashtable-weak? h2)))) + (not (hashtable-weak? h2)) + (not (hashtable-ephemeron? h2)))) (eq? (hashtable-hash-function h2) #f) (eq? (hashtable-equivalence-function h2) eqv?) (equal? (hashtable-size h2) 2) @@ -2104,6 +2677,258 @@ (let-values ([(n1 n2) (#%$hashtable-veclen ht)]) (= n1 n2 32)))) '(0 #t)) + ) + +(mat ephemeron-eqv-hashtable + (begin + (define ka (list 'a)) + (define kb (list 'b)) + (define kc (list 'c)) + (define kq (list 'q)) + (define ky (list 'y)) + (define kz (list 'z)) + (define km -5.75) + (define kn 17) + (define ko (+ (most-positive-fixnum) 5)) + #t) + (begin + (define h (make-ephemeron-eqv-hashtable 32)) + (and (hashtable? h) + (not (eq-hashtable? h)) + (hashtable-mutable? h) + (hashtable-ephemeron? h))) + (eq? (hashtable-hash-function h) #f) + (eq? (hashtable-equivalence-function h) eqv?) + (equal? (hashtable-size h) 0) + (same-elements? (hashtable-keys h) '#()) + (same-elements? (hashtable-values h) '#()) + (equal-entries? (hashtable-entries h) '#() '#()) + (eqv? (hashtable-set! h ka 'aval) (void)) + (equal? + (list + (hashtable-contains? h ka) + (hashtable-contains? h kb) + (hashtable-contains? h kc) + (hashtable-contains? h km) + (hashtable-contains? h kn) + (hashtable-contains? h ko)) + '(#t #f #f #f #f #f)) + (eqv? (hashtable-set! h kb 'bval) (void)) + (equal? + (list + (hashtable-contains? h ka) + (hashtable-contains? h kb) + (hashtable-contains? h kc) + (hashtable-contains? h km) + (hashtable-contains? h kn) + (hashtable-contains? h ko)) + '(#t #t #f #f #f #f)) + (eqv? (hashtable-set! h kc 'cval) (void)) + (equal? + (list + (hashtable-contains? h ka) + (hashtable-contains? h kb) + (hashtable-contains? h kc) + (hashtable-contains? h km) + (hashtable-contains? h kn) + (hashtable-contains? h ko)) + '(#t #t #t #f #f #f)) + (eqv? (hashtable-set! h km 'mval) (void)) + (equal? + (list + (hashtable-contains? h ka) + (hashtable-contains? h kb) + (hashtable-contains? h kc) + (hashtable-contains? h km) + (hashtable-contains? h kn) + (hashtable-contains? h ko)) + '(#t #t #t #t #f #f)) + (eqv? (hashtable-set! h kn 'nval) (void)) + (equal? + (list + (hashtable-contains? h ka) + (hashtable-contains? h kb) + (hashtable-contains? h kc) + (hashtable-contains? h km) + (hashtable-contains? h kn) + (hashtable-contains? h ko)) + '(#t #t #t #t #t #f)) + (eqv? (hashtable-set! h ko 'oval) (void)) + (equal? + (list + (hashtable-contains? h ka) + (hashtable-contains? h kb) + (hashtable-contains? h kc) + (hashtable-contains? h km) + (hashtable-contains? h kn) + (hashtable-contains? h ko)) + '(#t #t #t #t #t #t)) + (equal? (hashtable-size h) 6) + (same-elements? (hashtable-keys h) `#((a) (b) (c) -5.75 17 ,ko)) + (same-elements? (hashtable-values h) '#(aval bval cval mval nval oval)) + (equal-entries? (hashtable-entries h) `#((a) (b) (c) -5.75 17 ,ko) '#(aval bval cval mval nval oval)) + #;(same-elements? + (list->vector (hashtable-map h cons)) + `#(((a) . aval) ((b) . bval) ((c) . cval) (-5.75 . mval) (17 . nval) (,ko . oval))) + #;(same-elements? + (let ([v (make-vector 6)] [i 0]) + (hashtable-for-each h (lambda (key val) (vector-set! v i (cons key val)) (set! i (fx+ i 1)))) + v) + `#(((a) . aval) ((b) . bval) ((c) . cval) (-5.75 . mval) (17 . nval) (,ko . oval))) + #;(same-elements? + (let ([v (make-vector 6)] [i 0]) + (hashtable-for-each-cell h (lambda (a) (vector-set! v i a) (set! i (fx+ i 1)))) + v) + `#(((a) . aval) ((b) . bval) ((c) . cval) (-5.75 . mval) (17 . nval) (,ko . oval))) + (eq? (hashtable-ref h ka 1) 'aval) + (eq? (hashtable-ref h kb #f) 'bval) + (eq? (hashtable-ref h kc 'nope) 'cval) + (eq? (hashtable-ref h (+ 2 -7.75) 'ugh) 'mval) + (eq? (hashtable-ref h (/ 34 2) 'ugh) 'nval) + (eq? (hashtable-ref h (+ (most-positive-fixnum) 7 -2) 'ugh) 'oval) + (eqv? (hashtable-delete! h kb) (void)) + (equal? (hashtable-size h) 5) + (same-elements? (hashtable-keys h) `#((a) (c) -5.75 17 ,ko)) + (same-elements? (hashtable-values h) '#(aval cval mval nval oval)) + (equal-entries? (hashtable-entries h) `#((a) (c) -5.75 17 ,ko) '#(aval cval mval nval oval)) + (begin + (define h2 (hashtable-copy h #t)) + (and (hashtable? h2) + (hashtable-mutable? h2) + (hashtable-ephemeron? h2))) + (eq? (hashtable-hash-function h2) #f) + (eq? (hashtable-equivalence-function h2) eqv?) + (equal? (hashtable-size h2) 5) + (same-elements? (hashtable-keys h) `#((a) (c) -5.75 17 ,ko)) + (same-elements? (hashtable-values h) '#(aval cval mval nval oval)) + (equal-entries? (hashtable-entries h) `#((a) (c) -5.75 17 ,ko) '#(aval cval mval nval oval)) + (eqv? (hashtable-clear! h 4) (void)) + (equal? + (list + (hashtable-size h) + (hashtable-ref h ka 1) + (hashtable-ref h kb #f) + (hashtable-ref h kc 'nope) + (hashtable-ref h km 'nope) + (hashtable-ref h kn 'nope) + (hashtable-ref h ko 'nope)) + '(0 1 #f nope nope nope nope)) + (same-elements? (hashtable-keys h) '#()) + (same-elements? (hashtable-values h) '#()) + (equal-entries? (hashtable-entries h) '#() '#()) + (equal? + (list + (hashtable-size h2) + (hashtable-ref h2 ka 1) + (hashtable-ref h2 kb #f) + (hashtable-ref h2 kc 'nope) + (hashtable-ref h2 (- (+ km 1) 1) 'nope) + (hashtable-ref h2 (- (+ kn 1) 1) 'nope) + (hashtable-ref h2 (- (+ ko 1) 1) 'nope)) + '(5 aval #f cval mval nval oval)) + (same-elements? (hashtable-keys h2) `#((a) (c) -5.75 17 ,ko)) + (same-elements? (hashtable-values h2) '#(aval cval mval nval oval)) + (equal-entries? (hashtable-entries h2) `#((a) (c) -5.75 17 ,ko) '#(aval cval mval nval oval)) + (eqv? + (hashtable-update! h kq + (lambda (x) (+ x 1)) + 17) + (void)) + (equal? (hashtable-ref h kq #f) 18) + (eqv? + (hashtable-update! h kq + (lambda (x) (+ x 1)) + 17) + (void)) + (equal? (hashtable-ref h kq #f) 19) + (equal? (hashtable-size h) 1) + (same-elements? (hashtable-keys h) '#((q))) + (eqv? + (begin + (set! kq (void)) + (collect (collect-maximum-generation)) + (hashtable-size h)) + 0) + (same-elements? (hashtable-keys h) '#()) + (same-elements? (hashtable-values h) '#()) + (equal-entries? (hashtable-entries h) '#() '#()) + (equal? (hashtable-ref h ky #f) #f) + (eqv? + (hashtable-set! h ky 'toad) + (void)) + (equal? (hashtable-ref h ky #f) 'toad) + (equal? (hashtable-ref h kz #f) #f) + (eqv? + (hashtable-update! h kz list 'frog) + (void)) + (equal? (hashtable-ref h kz #f) '(frog)) + (same-elements? (hashtable-keys h) (vector ky kz)) + (same-elements? (hashtable-values h) (vector (hashtable-ref h kz #f) 'toad)) + (equal-entries? + (hashtable-entries h) + (vector kz ky) + (vector (hashtable-ref h kz #f) 'toad)) + (eqv? (hashtable-ref h '(zippo) 'nil) 'nil) + (begin + (define h3 (hashtable-copy h2 #f)) + (and (hashtable? h3) + (not (hashtable-mutable? h3)) + (hashtable-ephemeron? h3))) + (same-elements? (hashtable-keys h2) `#((a) (c) -5.75 17 ,ko)) + (same-elements? (hashtable-keys h3) `#((a) (c) -5.75 17 ,ko)) + (equal? + (begin + (set! ka (void)) + (set! km (void)) + (set! kn (void)) + (set! ko (void)) + (collect (collect-maximum-generation)) + (list (hashtable-size h2) (hashtable-size h3))) + '(4 4)) + (same-elements? (hashtable-keys h2) `#((c) -5.75 17 ,(+ (most-positive-fixnum) 5))) + (same-elements? (hashtable-keys h3) `#((c) -5.75 17 ,(+ (most-positive-fixnum) 5))) + (same-elements? (hashtable-values h2) '#(cval mval nval oval)) + (same-elements? (hashtable-values h3) '#(cval mval nval oval)) + (equal-entries? (hashtable-entries h2) `#((c) -5.75 17 ,(+ (most-positive-fixnum) 5)) '#(cval mval nval oval)) + (equal-entries? (hashtable-entries h3) `#((c) -5.75 17 ,(+ (most-positive-fixnum) 5)) '#(cval mval nval oval)) + (eqv? + (begin + (set! h3 (void)) + (collect (collect-maximum-generation)) + (hashtable-size h2)) + 4) + (same-elements? (hashtable-keys h2) `#((c) -5.75 17 ,(+ (most-positive-fixnum) 5))) + (same-elements? (hashtable-values h2) '#(cval mval nval oval)) + (equal-entries? (hashtable-entries h2) `#((c) -5.75 17 ,(+ (most-positive-fixnum) 5)) '#(cval mval nval oval)) + + ; test for proper shrinkage + (equal? + (let ([ht (make-eqv-hashtable 32)]) + (for-each + (lambda (k*) (for-each (lambda (k) (hashtable-delete! ht k)) k*)) + (let ([k** (map (lambda (x) (map list (make-list 1000))) + (make-list 100))]) + (for-each + (lambda (k*) (map (lambda (k) (hashtable-set! ht k 75)) k*)) + k**) + k**)) + (call-with-values (lambda () (#%$hashtable-veclen ht)) cons)) + '(32 . 32)) + + ; test for proper shrinkage as objects are bwp'd + ; uses delete to trigger final shrinkage + (equal? + (let ([ht (make-ephemeron-eqv-hashtable 32)]) + (hashtable-set! ht 'a 'b) + (for-each + (lambda (k*) (map (lambda (k) (hashtable-set! ht k 75)) k*)) + (map (lambda (x) (map list (make-list 1000))) (make-list 100))) + (collect (collect-maximum-generation)) + (hashtable-delete! ht 'a) + (list (hashtable-size ht) + (let-values ([(n1 n2) (#%$hashtable-veclen ht)]) + (= n1 n2 32)))) + '(0 #t)) ) (mat eqv-hashtable-cell @@ -2128,19 +2953,28 @@ (cons (random-object 4) (random-object 7)) (f (fx- n 1)))))] [ht (make-eqv-hashtable)] - [wht (make-weak-eqv-hashtable)]) + [wht (make-weak-eqv-hashtable)] + [eht (make-ephemeron-eqv-hashtable)]) (let ([ls2 (map (lambda (a1) (hashtable-cell ht (car a1) (cdr a1))) ls1)] - [ls3 (map (lambda (a1) (hashtable-cell wht (car a1) (cdr a1))) ls1)]) - (unless (andmap (lambda (a1 a2 a3) + [ls3 (map (lambda (a1) (hashtable-cell wht (car a1) (cdr a1))) ls1)] + [ls4 (map (lambda (a1) (hashtable-cell eht (car a1) (cdr a1))) ls1)]) + (unless (andmap (lambda (a1 a2 a3 a4) (and (eqv? (car a1) (car a2)) - (eqv? (car a2) (car a3)))) - ls1 ls2 ls3) + (eqv? (car a2) (car a3)) + (eqv? (car a2) (car a4)))) + ls1 ls2 ls3 ls4) (errorf #f "keys are not eqv")) - (unless (andmap (lambda (a1 a2 a3) + (unless (andmap (lambda (a1 a2 a3 a4) (and (eqv? (cdr a1) (cdr a2)) - (eqv? (cdr a2) (cdr a3)))) - ls1 ls2 ls3) + (eqv? (cdr a2) (cdr a3)) + (eqv? (cdr a2) (cdr a4)))) + ls1 ls2 ls3 ls4) (errorf #f "values are not eqv")) + (for-each (lambda (a1) + (let ([o (random-object 3)]) + ;; Value refers to key: + (hashtable-set! eht o (list o (car a1))))) + ls1) (for-each (lambda (a1) (when (fx< (random 10) 5) @@ -2149,9 +2983,11 @@ (let loop ([i (min (expt (collect-generation-radix) (collect-maximum-generation)) 1000)]) (unless (fx= i 0) (collect) - (unless (andmap (lambda (a2 a3) (eqv? (car a2) (car a3))) ls2 ls3) - (errorf #f "a2/a3 keys not eqv after collection")) - (unless (andmap (lambda (a3) (not (bwp-object? (car a3)))) ls3) + (unless (andmap (lambda (a2 a3 a4) (and (eqv? (car a2) (car a3)) (eqv? (car a2) (car a4)))) + ls2 ls3 ls4) + (errorf #f "a2/a3/a4 keys not eqv after collection")) + (unless (and (andmap (lambda (a3) (not (bwp-object? (car a3)))) ls3) + (andmap (lambda (a4) (not (bwp-object? (car a4)))) ls4)) (errorf #f "keys have been bwp'd")) (loop (fx- i 1)))) (for-each @@ -2162,45 +2998,60 @@ (unless (and (equal? (hashtable-keys ht) '#()) (equal? (hashtable-values ht) '#()) (zero? (hashtable-size ht))) - (errorf #f "wht has not been cleared out")) + (errorf #f "ht has not been cleared out")) (let loop ([i (min (expt (collect-generation-radix) (collect-maximum-generation)) 1000)]) (unless (fx= i 0) (collect) - (unless (andmap (lambda (a1 a3) - (or (not (car a1)) (eqv? (car a1) (car a3)))) - ls1 ls3) - (errorf #f "a1/a3 keys not eqv after collection")) + (unless (andmap (lambda (a1 a3 a4) + (or (not (car a1)) + (and (eqv? (car a1) (car a3)) + (eqv? (car a1) (car a4))))) + ls1 ls3 ls4) + (errorf #f "a1/a3/a4 keys not eqv after collection")) (loop (fx- i 1)))) (for-each - (lambda (a1 a3) - (unless (or (car a1) (bwp-object? (car a3))) + (lambda (a1 a3 a4) + (unless (or (car a1) + (and (bwp-object? (car a3)) + (bwp-object? (car a4)))) (errorf #f "~s has not been bwp'd I" (car a3)))) - ls1 ls3) + ls1 ls3 ls4) (for-each (lambda (a1) (set-car! a1 #f)) ls1) (collect (collect-maximum-generation)) - (unless (andmap (lambda (a3) (bwp-object? (car a3))) ls3) + (unless (and (andmap (lambda (a3) (bwp-object? (car a3))) ls3) + (andmap (lambda (a4) (bwp-object? (car a4))) ls4)) (errorf #f "keys have not been bwp'd II")) (unless (and (equal? (hashtable-keys wht) '#()) - (equal? (hashtable-values ht) '#()) - (zero? (hashtable-size ht))) - (errorf #f "wht has not been cleared out")))) + (equal? (hashtable-values wht) '#()) + (zero? (hashtable-size wht))) + (errorf #f "wht has not been cleared out")) + (unless (and (equal? (hashtable-keys eht) '#()) + (equal? (hashtable-values eht) '#()) + (zero? (hashtable-size eht))) + (errorf #f "eht has not been cleared out")))) #t) -) + ) (mat eqv-strange (begin (define $ht (make-eqv-hashtable)) (define $wht (make-weak-eqv-hashtable)) + (define $eht (make-weak-eqv-hashtable)) (and (hashtable? $ht) - (hashtable? $wht))) + (hashtable? $wht) + (hashtable? $eht))) (eqv? (hashtable-set! $ht #f 75) (void)) (eqv? (hashtable-ref $ht #f 80) 75) (eqv? (hashtable-set! $wht #f 75) (void)) (eqv? (hashtable-ref $wht #f 80) 75) + (eqv? (hashtable-set! $eht #f 75) (void)) + (eqv? (hashtable-ref $eht #f 80) 75) (eqv? (hashtable-set! $ht #!bwp "hello") (void)) (equal? (hashtable-ref $ht #!bwp "goodbye") "hello") (eqv? (hashtable-set! $wht #!bwp "hello") (void)) + (eqv? (hashtable-set! $eht #!bwp "hello") (void)) (and (member (hashtable-ref $wht #!bwp "goodbye") '("hello" "goodbye")) #t) + (and (member (hashtable-ref $eht #!bwp "goodbye") '("hello" "goodbye")) #t) ; make sure that association isn't added before procedure is called (equal? (begin @@ -2216,6 +3067,13 @@ 'doll) (hashtable-ref $wht 'cupie 'oops)) '(barbie . doll)) + (equal? + (begin + (hashtable-update! $eht 'cupie + (lambda (x) (hashtable-ref $eht 'cupie (cons 'barbie x))) + 'doll) + (hashtable-ref $eht 'cupie 'oops)) + '(barbie . doll)) ) (mat eqv-hashtable-stress @@ -2293,6 +3151,44 @@ (f (+ i 1) (remq k keep) drop))) (f (+ i 1) keep drop))))))))) + (let () ; ephemeron + (define pick + (lambda (ls) + (list-ref ls (random (length ls))))) + (define ht (make-ephemeron-eqv-hashtable 4)) + (let ([ls (remq '|| (oblist))] [n 50000]) + (let f ([i 0] [keep '()] [drop '()]) + (if (= i n) + (and (<= (hashtable-size ht) (- n (length drop))) + (begin + (collect (collect-maximum-generation)) + (= (hashtable-size ht) (length keep))) + (andmap (lambda (k) + (string=? + (symbol->string (hashtable-ref ht k #f)) + (cond + [(string? k) k] + [(pair? k) (car k)] + [(vector? k) (vector-ref k 0)]))) + keep) + (andmap (lambda (k) (eqv? (hashtable-ref ht k 'no) 'no)) + drop)) + (let* ([x (pick ls)] [s (string-copy (symbol->string x))]) + (let ([k (case (pick '(string pair vector)) + [(string) s] + [(pair) (list s)] + [(vector) (vector s)])]) + (hashtable-set! ht k x) + (let ([keep (if (= (modulo i 5) 0) (cons k keep) keep)]) + (if (= (modulo i 17) 5) + (let ([k (pick keep)]) + (hashtable-delete! ht k) + (let ([drop (cons k drop)]) + (when (= (random 5) 3) + (hashtable-delete! ht (pick drop))) + (f (+ i 1) (remq k keep) drop))) + (f (+ i 1) keep drop))))))))) + ) (mat symbol-hashtable @@ -2318,7 +3214,8 @@ (symbol-hashtable? h) (hashtable-mutable? h) (not (eq-hashtable? h)) - (not (hashtable-weak? h)))) + (not (hashtable-weak? h)) + (not (hashtable-ephemeron? h)))) (eq? (hashtable-hash-function h) symbol-hash) (eq? (hashtable-equivalence-function h) eq?) (equal? (hashtable-size h) 0) @@ -2375,6 +3272,7 @@ (symbol-hashtable? h2) (hashtable-mutable? h2) (not (hashtable-weak? h2)) + (not (hashtable-ephemeron? h2)) (not (eq-hashtable? h2)))) (eq? (hashtable-hash-function h2) symbol-hash) (eq? (hashtable-equivalence-function h2) eq?) @@ -2451,7 +3349,8 @@ (symbol-hashtable? h) (hashtable-mutable? h) (not (eq-hashtable? h)) - (not (hashtable-weak? h)))) + (not (hashtable-weak? h)) + (not (hashtable-ephemeron? h)))) (eq? (hashtable-hash-function h) symbol-hash) (eq? (hashtable-equivalence-function h) eq?) (equal? (hashtable-size h) 0) @@ -2508,6 +3407,7 @@ (symbol-hashtable? h2) (hashtable-mutable? h2) (not (hashtable-weak? h2)) + (not (hashtable-ephemeron? h2)) (not (eq-hashtable? h2)))) (eq? (hashtable-hash-function h2) symbol-hash) (eq? (hashtable-equivalence-function h2) eq?) @@ -2635,6 +3535,7 @@ (eq? (hashtable-equivalence-function $ght) equal?) (eq? (hashtable-mutable? $ght) #t) (not (hashtable-weak? $ght)) + (not (hashtable-ephemeron? $ght)) (eqv? (hashtable-size $ght) (vector-length $ght-keys1)) (eqv? (#%$hashtable-veclen $ght) 8) (same-elements? (hashtable-keys $ght) $ght-keys1) @@ -2689,14 +3590,16 @@ (define $ght2 (hashtable-copy $ght)) (and (hashtable? $ght2) (not (hashtable-mutable? $ght2)) - (not (hashtable-weak? $ght2)))) + (not (hashtable-weak? $ght2)) + (not (hashtable-ephemeron? $ght2)))) (eq? (hashtable-hash-function $ght) equal-hash) (eq? (hashtable-equivalence-function $ght) equal?) (begin (define $ght3 (hashtable-copy $ght #t)) (and (hashtable? $ght3) (hashtable-mutable? $ght3) - (not (hashtable-weak? $ght3)))) + (not (hashtable-weak? $ght3)) + (not (hashtable-ephemeron? $ght3)))) (eq? (hashtable-hash-function $ght) equal-hash) (eq? (hashtable-equivalence-function $ght) equal?) (begin @@ -2885,9 +3788,11 @@ (open-file-input-port "testfile.ss") fasl-read))]) (list + (eq-hashtable-weak? ht2) + (eq-hashtable-ephemeron? ht2) (eq-hashtable-ref ht2 x2 #f) (eq-hashtable-ref ht2 'foo #f)))) - '(because "foo")) + '(#f #f because "foo")) ; fasling out weak eq hash table (equal? (with-interrupts-disabled @@ -2904,9 +3809,41 @@ (open-file-input-port "testfile.ss") fasl-read))]) (list + (eq-hashtable-weak? ht2) + (eq-hashtable-ephemeron? ht2) (eq-hashtable-ref ht2 x2 #f) (eq-hashtable-ref ht2 'foo #f))))) - '(because "foo")) + '(#t #f because "foo")) + (equal? + (let ([ht2 (cadr (call-with-port + (open-file-input-port "testfile.ss") + fasl-read))]) + (collect (collect-maximum-generation)) + (list + (hashtable-keys ht2) + (eq-hashtable-ref ht2 'foo #f))) + '(#(foo) "foo")) + ; fasling out ephemeron eq hash table + (equal? + (with-interrupts-disabled + (let ([x (cons 'y '!)]) + (define ht (make-ephemeron-eq-hashtable)) + (eq-hashtable-set! ht x 'because) + (eq-hashtable-set! ht 'foo "foo") + (let ([p (open-file-output-port "testfile.ss" (file-options replace))]) + (fasl-write (list x ht) p) + (close-port p)) + (let-values ([(x2 ht2) + (apply values + (call-with-port + (open-file-input-port "testfile.ss") + fasl-read))]) + (list + (eq-hashtable-weak? ht2) + (eq-hashtable-ephemeron? ht2) + (eq-hashtable-ref ht2 x2 #f) + (eq-hashtable-ref ht2 'foo #f))))) + '(#f #t because "foo")) (equal? (let ([ht2 (cadr (call-with-port (open-file-input-port "testfile.ss") diff --git a/mats/patch-compile-0-f-t-f b/mats/patch-compile-0-f-t-f index f456c0fe97..f4df09cb11 100644 --- a/mats/patch-compile-0-f-t-f +++ b/mats/patch-compile-0-f-t-f @@ -1,5 +1,5 @@ -*** errors-compile-0-f-f-f 2017-06-08 02:10:03.000000000 -0400 ---- errors-compile-0-f-t-f 2017-06-08 01:38:37.000000000 -0400 +*** errors-compile-0-f-f-f 2017-07-06 20:31:25.000000000 -0600 +--- errors-compile-0-f-t-f 2017-07-06 19:50:33.000000000 -0600 *************** *** 125,131 **** 3.mo:Expected error in mat dipa-letrec: "attempt to reference undefined variable a". @@ -92,7 +92,7 @@ 4.mo:Expected error in mat for-each: "for-each: (a . b) is not a proper list". 4.mo:Expected error in mat for-each: "for-each: (a a a a a a ...) is circular". *************** -*** 3645,3651 **** +*** 3655,3661 **** misc.mo:Expected error in mat cpletrec: "foreign-procedure: no entry for "foo"". misc.mo:Expected error in mat cpletrec: "attempt to reference undefined variable q". misc.mo:Expected error in mat cpletrec: "attempt to reference undefined variable bar". @@ -100,7 +100,7 @@ misc.mo:Expected error in mat cpletrec: "attempt to reference undefined variable b". misc.mo:Expected error in mat cpletrec: "attempt to reference undefined variable b". misc.mo:Expected error in mat cpletrec: "attempt to reference undefined variable a". ---- 3645,3651 ---- +--- 3655,3661 ---- misc.mo:Expected error in mat cpletrec: "foreign-procedure: no entry for "foo"". misc.mo:Expected error in mat cpletrec: "attempt to reference undefined variable q". misc.mo:Expected error in mat cpletrec: "attempt to reference undefined variable bar". @@ -109,7 +109,7 @@ misc.mo:Expected error in mat cpletrec: "attempt to reference undefined variable b". misc.mo:Expected error in mat cpletrec: "attempt to reference undefined variable a". *************** -*** 7095,7102 **** +*** 7105,7112 **** 7.mo:Expected error in mat bytes-allocated: "bytes-allocated: invalid space gnu". 7.mo:Expected error in mat error: "a: hit me!". 7.mo:Expected error in mat error: "f: n is 0". @@ -118,7 +118,7 @@ record.mo:Expected error in mat record2: "invalid value 3 for foreign type double-float". record.mo:Expected error in mat record2: "3 is not of type #". record.mo:Expected error in mat record2: "make-record-type: invalid field list ((immutable double-float a) . b)". ---- 7095,7102 ---- +--- 7105,7112 ---- 7.mo:Expected error in mat bytes-allocated: "bytes-allocated: invalid space gnu". 7.mo:Expected error in mat error: "a: hit me!". 7.mo:Expected error in mat error: "f: n is 0". @@ -128,7 +128,7 @@ record.mo:Expected error in mat record2: "3 is not of type #". record.mo:Expected error in mat record2: "make-record-type: invalid field list ((immutable double-float a) . b)". *************** -*** 7104,7118 **** +*** 7114,7128 **** record.mo:Expected error in mat type-descriptor: "invalid syntax (type-descriptor 3)". record.mo:Expected error in mat type-descriptor: "type-descriptor: unrecognized record car". record.mo:Expected error in mat record3: "variable set-fudge-a! is not bound". @@ -144,7 +144,7 @@ record.mo:Expected error in mat record9: "record-reader: invalid input #f". record.mo:Expected error in mat record9: "record-reader: invalid second argument fudge". record.mo:Expected error in mat record9: "record-reader: invalid second argument fudge". ---- 7104,7118 ---- +--- 7114,7128 ---- record.mo:Expected error in mat type-descriptor: "invalid syntax (type-descriptor 3)". record.mo:Expected error in mat type-descriptor: "type-descriptor: unrecognized record car". record.mo:Expected error in mat record3: "variable set-fudge-a! is not bound". @@ -161,7 +161,7 @@ record.mo:Expected error in mat record9: "record-reader: invalid second argument fudge". record.mo:Expected error in mat record9: "record-reader: invalid second argument fudge". *************** -*** 7125,7150 **** +*** 7135,7160 **** record.mo:Expected error in mat record10: "read: unresolvable cycle constructing record of type # at char 3 of #". record.mo:Expected error in mat record16: "read: unresolvable cycle constructing record of type # at char 3 of #". record.mo:Expected error in mat record16: "read: unresolvable cycle constructing record of type # at char 3 of #". @@ -188,7 +188,7 @@ record.mo:Expected error in mat foreign-data: "foreign-alloc: 0 is not a positive fixnum". record.mo:Expected error in mat foreign-data: "foreign-alloc: is not a positive fixnum". record.mo:Expected error in mat foreign-data: "foreign-alloc: -5 is not a positive fixnum". ---- 7125,7150 ---- +--- 7135,7160 ---- record.mo:Expected error in mat record10: "read: unresolvable cycle constructing record of type # at char 3 of #". record.mo:Expected error in mat record16: "read: unresolvable cycle constructing record of type # at char 3 of #". record.mo:Expected error in mat record16: "read: unresolvable cycle constructing record of type # at char 3 of #". @@ -216,7 +216,7 @@ record.mo:Expected error in mat foreign-data: "foreign-alloc: is not a positive fixnum". record.mo:Expected error in mat foreign-data: "foreign-alloc: -5 is not a positive fixnum". *************** -*** 7275,7313 **** +*** 7285,7323 **** record.mo:Expected error in mat record22: "invalid field specifier (immutable creepy q)". record.mo:Expected error in mat record22: "invalid field specifier (immutable creepy q)". record.mo:Expected error in mat record23: "make-record-type: cannot extend sealed record type #". @@ -256,7 +256,7 @@ record.mo:Expected error in mat record?: "record?: 4 is not a record type descriptor". record.mo:Expected error in mat record?: "record?: a is not a record type descriptor". record.mo:Expected error in mat record?: "record?: #(1) is not a record type descriptor". ---- 7275,7313 ---- +--- 7285,7323 ---- record.mo:Expected error in mat record22: "invalid field specifier (immutable creepy q)". record.mo:Expected error in mat record22: "invalid field specifier (immutable creepy q)". record.mo:Expected error in mat record23: "make-record-type: cannot extend sealed record type #". @@ -297,7 +297,7 @@ record.mo:Expected error in mat record?: "record?: a is not a record type descriptor". record.mo:Expected error in mat record?: "record?: #(1) is not a record type descriptor". *************** -*** 7322,7378 **** +*** 7332,7388 **** record.mo:Expected error in mat r6rs-records-procedural: "make-record-constructor-descriptor: invalid protocol flimflam". record.mo:Expected error in mat r6rs-records-procedural: "attempt to apply non-procedure not-a-procedure". record.mo:Expected error in mat r6rs-records-procedural: "attempt to apply non-procedure spam". @@ -355,7 +355,7 @@ record.mo:Expected error in mat r6rs-records-syntactic: "define-record-type: incompatible record type cpoint - different parent". record.mo:Expected error in mat r6rs-records-syntactic: "define-record-type: incompatible record type cpoint - different parent". record.mo:Expected error in mat r6rs-records-syntactic: "cannot extend define-record-type parent fratrat". ---- 7322,7378 ---- +--- 7332,7388 ---- record.mo:Expected error in mat r6rs-records-procedural: "make-record-constructor-descriptor: invalid protocol flimflam". record.mo:Expected error in mat r6rs-records-procedural: "attempt to apply non-procedure not-a-procedure". record.mo:Expected error in mat r6rs-records-procedural: "attempt to apply non-procedure spam". diff --git a/mats/patch-compile-0-t-f-f b/mats/patch-compile-0-t-f-f index ea4110779d..84f3247ba1 100644 --- a/mats/patch-compile-0-t-f-f +++ b/mats/patch-compile-0-t-f-f @@ -1,5 +1,5 @@ -*** errors-compile-0-f-f-f 2017-06-08 02:10:03.000000000 -0400 ---- errors-compile-0-t-f-f 2017-06-08 01:45:53.000000000 -0400 +*** errors-compile-0-f-f-f 2017-07-06 20:31:25.000000000 -0600 +--- errors-compile-0-t-f-f 2017-07-06 19:59:12.000000000 -0600 *************** *** 93,99 **** 3.mo:Expected error in mat case-lambda: "incorrect number of arguments to #". @@ -3711,8 +3711,8 @@ bytevector.mo:Expected error in mat bytevector=?: "bytevector=?: "a" is not a bytevector". bytevector.mo:Expected error in mat tspl/csug-examples: "invalid endianness "spam"". *************** -*** 3575,3586 **** - bytevector.mo:Expected error in mat bytevector->immutable-bytevector: "bytevector-truncate!: #vu8(42 42 42 42 42 42 ...) is not a mutable bytevector". +*** 3585,3596 **** + bytevector.mo:Expected error in mat bytevector-compress: "bytevector-uncompress: bytevector #vu8(255 255 255 255 255 255 ...) claims invalid uncompressed size ". misc.mo:Expected error in mat compiler1: "variable i-am-not-bound is not bound". misc.mo:Expected error in mat compiler1: "attempt to apply non-procedure oops". ! misc.mo:Expected error in mat compiler1: "incorrect argument count in call (g (list))". @@ -3724,8 +3724,8 @@ misc.mo:Expected error in mat compiler3: "incorrect argument count in call (consumer 1 2) at line 3, char 19 of testfile.ss". misc.mo:Expected error in mat compiler3: "incorrect argument count in call (consumer 1 2)". misc.mo:Expected error in mat compiler3: "variable goto is not bound". ---- 3575,3586 ---- - bytevector.mo:Expected error in mat bytevector->immutable-bytevector: "bytevector-truncate!: #vu8(42 42 42 42 42 42 ...) is not a mutable bytevector". +--- 3585,3596 ---- + bytevector.mo:Expected error in mat bytevector-compress: "bytevector-uncompress: bytevector #vu8(255 255 255 255 255 255 ...) claims invalid uncompressed size ". misc.mo:Expected error in mat compiler1: "variable i-am-not-bound is not bound". misc.mo:Expected error in mat compiler1: "attempt to apply non-procedure oops". ! misc.mo:Expected error in mat compiler1: "incorrect argument count in call (g (($top-level-value (...))))". @@ -3738,7 +3738,7 @@ misc.mo:Expected error in mat compiler3: "incorrect argument count in call (consumer 1 2)". misc.mo:Expected error in mat compiler3: "variable goto is not bound". *************** -*** 3652,3672 **** +*** 3662,3682 **** misc.mo:Expected error in mat cpletrec: "attempt to reference undefined variable b". misc.mo:Expected error in mat cpletrec: "attempt to assign undefined variable b". misc.mo:Expected error in mat compile-profile: "compile-profile: invalid mode src [must be #f, #t, source, or block]". @@ -3760,7 +3760,7 @@ misc.mo:Expected error in mat compile-profile: "profile-dump-data: #t is not a string". misc.mo:Expected error in mat compile-profile: "profile-dump-data: invalid dump 17". misc.mo:Expected error in mat compile-profile: "profile-dump-data: invalid dump (17)". ---- 3652,3672 ---- +--- 3662,3682 ---- misc.mo:Expected error in mat cpletrec: "attempt to reference undefined variable b". misc.mo:Expected error in mat cpletrec: "attempt to assign undefined variable b". misc.mo:Expected error in mat compile-profile: "compile-profile: invalid mode src [must be #f, #t, source, or block]". @@ -3783,7 +3783,7 @@ misc.mo:Expected error in mat compile-profile: "profile-dump-data: invalid dump 17". misc.mo:Expected error in mat compile-profile: "profile-dump-data: invalid dump (17)". *************** -*** 3699,3705 **** +*** 3709,3715 **** misc.mo:Expected error in mat $fasl-file-equal?: "$fasl-file-equal?: failed for probably-does-not-exist: no such file or directory". misc.mo:Expected error in mat $fasl-file-equal?: "$fasl-file-equal?: failed for probably-does-not-exist: no such file or directory". misc.mo:Expected error in mat $fasl-file-equal?: "$fasl-file-equal?: record comparison failed while comparing testfile-fatfib1.so and testfile-fatfib3.so within fasl entry 2". @@ -3791,7 +3791,7 @@ misc.mo:Expected error in mat cost-center: "with-cost-center: foo is not a cost center". misc.mo:Expected error in mat cost-center: "with-cost-center: bar is not a procedure". misc.mo:Expected error in mat cost-center: "cost-center-instruction-count: 5 is not a cost center". ---- 3699,3705 ---- +--- 3709,3715 ---- misc.mo:Expected error in mat $fasl-file-equal?: "$fasl-file-equal?: failed for probably-does-not-exist: no such file or directory". misc.mo:Expected error in mat $fasl-file-equal?: "$fasl-file-equal?: failed for probably-does-not-exist: no such file or directory". misc.mo:Expected error in mat $fasl-file-equal?: "$fasl-file-equal?: record comparison failed while comparing testfile-fatfib1.so and testfile-fatfib3.so within fasl entry 2". @@ -3800,7 +3800,7 @@ misc.mo:Expected error in mat cost-center: "with-cost-center: bar is not a procedure". misc.mo:Expected error in mat cost-center: "cost-center-instruction-count: 5 is not a cost center". *************** -*** 3753,3760 **** +*** 3763,3770 **** misc.mo:Expected error in mat apropos: "apropos: 3 is not a symbol or string". misc.mo:Expected error in mat apropos: "apropos: (hit me) is not a symbol or string". misc.mo:Expected error in mat apropos: "apropos-list: b is not an environment". @@ -3809,7 +3809,7 @@ misc.mo:Expected error in mat apropos: "variable $apropos-unbound1 is not bound". misc.mo:Expected error in mat apropos: "variable $apropos-unbound2 is not bound". misc.mo:Expected error in mat simplify-if: "textual-port?: a is not a port". ---- 3753,3760 ---- +--- 3763,3770 ---- misc.mo:Expected error in mat apropos: "apropos: 3 is not a symbol or string". misc.mo:Expected error in mat apropos: "apropos: (hit me) is not a symbol or string". misc.mo:Expected error in mat apropos: "apropos-list: b is not an environment". @@ -3819,7 +3819,7 @@ misc.mo:Expected error in mat apropos: "variable $apropos-unbound2 is not bound". misc.mo:Expected error in mat simplify-if: "textual-port?: a is not a port". *************** -*** 3780,3788 **** +*** 3790,3798 **** cp0.mo:Expected error in mat cp0-regression: "source-object-efp: #f is not a source object". cp0.mo:Expected error in mat cp0-regression: "source-object-sfd: #f is not a source object". cp0.mo:Expected error in mat cp0-regression: "condition: #f is not a condition". @@ -3829,7 +3829,7 @@ cp0.mo:Expected error in mat expand-output: "expand-output: #t is not a textual output port or #f". cp0.mo:Expected error in mat expand-output: "expand-output: # is not a textual output port or #f". cp0.mo:Expected error in mat expand/optimize-output: "expand/optimize-output: #t is not a textual output port or #f". ---- 3780,3788 ---- +--- 3790,3798 ---- cp0.mo:Expected error in mat cp0-regression: "source-object-efp: #f is not a source object". cp0.mo:Expected error in mat cp0-regression: "source-object-sfd: #f is not a source object". cp0.mo:Expected error in mat cp0-regression: "condition: #f is not a condition". @@ -3840,7 +3840,7 @@ cp0.mo:Expected error in mat expand-output: "expand-output: # is not a textual output port or #f". cp0.mo:Expected error in mat expand/optimize-output: "expand/optimize-output: #t is not a textual output port or #f". *************** -*** 3846,3854 **** +*** 3856,3864 **** 5_6.mo:Expected error in mat list->fxvector: "list->fxvector: (1 2 . 3) is not a proper list". 5_6.mo:Expected error in mat list->fxvector: "list->fxvector: (1 2 3 2 3 2 ...) is circular". 5_6.mo:Expected error in mat fxvector->list: "fxvector->list: (a b c) is not an fxvector". @@ -3850,7 +3850,7 @@ 5_6.mo:Expected error in mat vector-map: "vector-map: #() is not a procedure". 5_6.mo:Expected error in mat vector-map: "vector-map: #() is not a procedure". 5_6.mo:Expected error in mat vector-map: "vector-map: #() is not a procedure". ---- 3846,3854 ---- +--- 3856,3864 ---- 5_6.mo:Expected error in mat list->fxvector: "list->fxvector: (1 2 . 3) is not a proper list". 5_6.mo:Expected error in mat list->fxvector: "list->fxvector: (1 2 3 2 3 2 ...) is circular". 5_6.mo:Expected error in mat fxvector->list: "fxvector->list: (a b c) is not an fxvector". @@ -3861,7 +3861,7 @@ 5_6.mo:Expected error in mat vector-map: "vector-map: #() is not a procedure". 5_6.mo:Expected error in mat vector-map: "vector-map: #() is not a procedure". *************** -*** 3863,3871 **** +*** 3873,3881 **** 5_6.mo:Expected error in mat vector-map: "vector-map: lengths of input vectors #() and #(x) differ". 5_6.mo:Expected error in mat vector-map: "vector-map: lengths of input vectors #(y) and #() differ". 5_6.mo:Expected error in mat vector-map: "vector-map: lengths of input vectors #(y) and #() differ". @@ -3871,7 +3871,7 @@ 5_6.mo:Expected error in mat vector-for-each: "vector-for-each: #() is not a procedure". 5_6.mo:Expected error in mat vector-for-each: "vector-for-each: #() is not a procedure". 5_6.mo:Expected error in mat vector-for-each: "vector-for-each: #() is not a procedure". ---- 3863,3871 ---- +--- 3873,3881 ---- 5_6.mo:Expected error in mat vector-map: "vector-map: lengths of input vectors #() and #(x) differ". 5_6.mo:Expected error in mat vector-map: "vector-map: lengths of input vectors #(y) and #() differ". 5_6.mo:Expected error in mat vector-map: "vector-map: lengths of input vectors #(y) and #() differ". @@ -3882,7 +3882,7 @@ 5_6.mo:Expected error in mat vector-for-each: "vector-for-each: #() is not a procedure". 5_6.mo:Expected error in mat vector-for-each: "vector-for-each: #() is not a procedure". *************** -*** 3880,3897 **** +*** 3890,3907 **** 5_6.mo:Expected error in mat vector-for-each: "vector-for-each: lengths of input vectors #() and #(x) differ". 5_6.mo:Expected error in mat vector-for-each: "vector-for-each: lengths of input vectors #(y) and #() differ". 5_6.mo:Expected error in mat vector-for-each: "vector-for-each: lengths of input vectors #(y) and #() differ". @@ -3901,7 +3901,7 @@ 5_6.mo:Expected error in mat vector-sort!: "vector-sort!: 3 is not a mutable vector". 5_6.mo:Expected error in mat vector-sort!: "vector-sort!: (1 2 3) is not a mutable vector". 5_6.mo:Expected error in mat vector-sort!: "vector-sort!: #(a b c) is not a procedure". ---- 3880,3897 ---- +--- 3890,3907 ---- 5_6.mo:Expected error in mat vector-for-each: "vector-for-each: lengths of input vectors #() and #(x) differ". 5_6.mo:Expected error in mat vector-for-each: "vector-for-each: lengths of input vectors #(y) and #() differ". 5_6.mo:Expected error in mat vector-for-each: "vector-for-each: lengths of input vectors #(y) and #() differ". @@ -3921,7 +3921,7 @@ 5_6.mo:Expected error in mat vector-sort!: "vector-sort!: (1 2 3) is not a mutable vector". 5_6.mo:Expected error in mat vector-sort!: "vector-sort!: #(a b c) is not a procedure". *************** -*** 3959,3980 **** +*** 3969,3990 **** 6.mo:Expected error in mat port-operations: "clear-output-port: not permitted on closed port #". 6.mo:Expected error in mat port-operations: "current-output-port: a is not a textual output port". 6.mo:Expected error in mat port-operations: "current-input-port: a is not a textual input port". @@ -3944,7 +3944,7 @@ 6.mo:Expected error in mat port-operations1: "open-input-output-file: furball is not a string". 6.mo:Expected error in mat port-operations1: "open-input-output-file: failed for /probably/not/a/good/path: no such file or directory". 6.mo:Expected error in mat port-operations1: "open-input-output-file: invalid option compressed". ---- 3959,3980 ---- +--- 3969,3990 ---- 6.mo:Expected error in mat port-operations: "clear-output-port: not permitted on closed port #". 6.mo:Expected error in mat port-operations: "current-output-port: a is not a textual output port". 6.mo:Expected error in mat port-operations: "current-input-port: a is not a textual input port". @@ -3968,7 +3968,7 @@ 6.mo:Expected error in mat port-operations1: "open-input-output-file: failed for /probably/not/a/good/path: no such file or directory". 6.mo:Expected error in mat port-operations1: "open-input-output-file: invalid option compressed". *************** -*** 3983,3989 **** +*** 3993,3999 **** 6.mo:Expected error in mat port-operations1: "truncate-file: all-the-way is not a valid length". 6.mo:Expected error in mat port-operations1: "truncate-file: # is not an output port". 6.mo:Expected error in mat port-operations1: "truncate-file: animal-crackers is not an output port". @@ -3976,7 +3976,7 @@ 6.mo:Expected error in mat port-operations1: "truncate-file: not permitted on closed port #". 6.mo:Expected error in mat port-operations1: "get-output-string: # is not a string output port". 6.mo:Expected error in mat port-operations1: "get-output-string: # is not a string output port". ---- 3983,3989 ---- +--- 3993,3999 ---- 6.mo:Expected error in mat port-operations1: "truncate-file: all-the-way is not a valid length". 6.mo:Expected error in mat port-operations1: "truncate-file: # is not an output port". 6.mo:Expected error in mat port-operations1: "truncate-file: animal-crackers is not an output port". @@ -3985,7 +3985,7 @@ 6.mo:Expected error in mat port-operations1: "get-output-string: # is not a string output port". 6.mo:Expected error in mat port-operations1: "get-output-string: # is not a string output port". *************** -*** 4000,4007 **** +*** 4010,4017 **** 6.mo:Expected error in mat string-port-file-position: "file-position: -1 is not a valid position". 6.mo:Expected error in mat fresh-line: "fresh-line: 3 is not a textual output port". 6.mo:Expected error in mat fresh-line: "fresh-line: # is not a textual output port". @@ -3994,7 +3994,7 @@ 6.mo:Expected error in mat pretty-print: "pretty-format: 3 is not a symbol". 6.mo:Expected error in mat pretty-print: "pretty-format: invalid format (bad 0 ... ... 0 format)". 6.mo:Expected warning in mat cp1in-verify-format-warnings: "compile: too few arguments for control string "~a~~~s" in call to format". ---- 4000,4007 ---- +--- 4010,4017 ---- 6.mo:Expected error in mat string-port-file-position: "file-position: -1 is not a valid position". 6.mo:Expected error in mat fresh-line: "fresh-line: 3 is not a textual output port". 6.mo:Expected error in mat fresh-line: "fresh-line: # is not a textual output port". @@ -4004,7 +4004,7 @@ 6.mo:Expected error in mat pretty-print: "pretty-format: invalid format (bad 0 ... ... 0 format)". 6.mo:Expected warning in mat cp1in-verify-format-warnings: "compile: too few arguments for control string "~a~~~s" in call to format". *************** -*** 6485,6516 **** +*** 6495,6526 **** io.mo:Expected error in mat port-operations: "put-u8: not permitted on closed port #". io.mo:Expected error in mat port-operations: "put-bytevector: not permitted on closed port #". io.mo:Expected error in mat port-operations: "flush-output-port: not permitted on closed port #". @@ -4037,7 +4037,7 @@ io.mo:Expected error in mat port-operations1: "open-file-input/output-port: failed for /probably/not/a/good/path: no such file or directory". io.mo:Expected error in mat port-operations1: "invalid file option uncompressed". io.mo:Expected error in mat port-operations1: "invalid file option truncate". ---- 6485,6516 ---- +--- 6495,6526 ---- io.mo:Expected error in mat port-operations: "put-u8: not permitted on closed port #". io.mo:Expected error in mat port-operations: "put-bytevector: not permitted on closed port #". io.mo:Expected error in mat port-operations: "flush-output-port: not permitted on closed port #". @@ -4071,7 +4071,7 @@ io.mo:Expected error in mat port-operations1: "invalid file option uncompressed". io.mo:Expected error in mat port-operations1: "invalid file option truncate". *************** -*** 6521,6527 **** +*** 6531,6537 **** io.mo:Expected error in mat port-operations1: "set-port-length!: all-the-way is not a valid length". io.mo:Expected error in mat port-operations1: "truncate-port: # is not an output port". io.mo:Expected error in mat port-operations1: "truncate-port: animal-crackers is not an output port". @@ -4079,7 +4079,7 @@ io.mo:Expected error in mat port-operations1: "truncate-port: not permitted on closed port #". io.mo:Expected error in mat port-operations3: "file-port?: "not a port" is not a port". io.mo:Expected error in mat port-operations3: "port-file-descriptor: oops is not a port". ---- 6521,6527 ---- +--- 6531,6537 ---- io.mo:Expected error in mat port-operations1: "set-port-length!: all-the-way is not a valid length". io.mo:Expected error in mat port-operations1: "truncate-port: # is not an output port". io.mo:Expected error in mat port-operations1: "truncate-port: animal-crackers is not an output port". @@ -4088,7 +4088,7 @@ io.mo:Expected error in mat port-operations3: "file-port?: "not a port" is not a port". io.mo:Expected error in mat port-operations3: "port-file-descriptor: oops is not a port". *************** -*** 6704,6716 **** +*** 6714,6726 **** io.mo:Expected error in mat low-level-port-operations: "set-binary-port-output-size!: #vu8(1 2 3) is not a valid size for #". io.mo:Expected error in mat low-level-port-operations: "set-binary-port-output-size!: -1 is not a valid size for #". io.mo:Expected error in mat low-level-port-operations: "set-binary-port-output-size!: 6 is not a valid size for #". @@ -4102,7 +4102,7 @@ io.mo:Expected error in mat custom-port-buffer-size: "custom-port-buffer-size: shoe is not a positive fixnum". io.mo:Expected error in mat custom-port-buffer-size: "custom-port-buffer-size: 0 is not a positive fixnum". io.mo:Expected error in mat custom-port-buffer-size: "custom-port-buffer-size: -15 is not a positive fixnum". ---- 6704,6716 ---- +--- 6714,6726 ---- io.mo:Expected error in mat low-level-port-operations: "set-binary-port-output-size!: #vu8(1 2 3) is not a valid size for #". io.mo:Expected error in mat low-level-port-operations: "set-binary-port-output-size!: -1 is not a valid size for #". io.mo:Expected error in mat low-level-port-operations: "set-binary-port-output-size!: 6 is not a valid size for #". @@ -4117,7 +4117,7 @@ io.mo:Expected error in mat custom-port-buffer-size: "custom-port-buffer-size: 0 is not a positive fixnum". io.mo:Expected error in mat custom-port-buffer-size: "custom-port-buffer-size: -15 is not a positive fixnum". *************** -*** 6718,6733 **** +*** 6728,6743 **** io.mo:Expected error in mat custom-port-buffer-size: "custom-port-buffer-size: 1024.0 is not a positive fixnum". io.mo:Expected error in mat compression: "port-file-compressed!: # is not a file port". io.mo:Expected error in mat compression: "port-file-compressed!: cannot compress input/output port #". @@ -4134,7 +4134,7 @@ io.mo:Expected error in mat custom-binary-ports: "unget-u8: cannot unget 255 on #". io.mo:Expected error in mat custom-binary-ports: "put-u8: # is not a binary output port". io.mo:Expected error in mat custom-binary-ports: "port-length: # does not support operation". ---- 6718,6733 ---- +--- 6728,6743 ---- io.mo:Expected error in mat custom-port-buffer-size: "custom-port-buffer-size: 1024.0 is not a positive fixnum". io.mo:Expected error in mat compression: "port-file-compressed!: # is not a file port". io.mo:Expected error in mat compression: "port-file-compressed!: cannot compress input/output port #". @@ -4152,7 +4152,7 @@ io.mo:Expected error in mat custom-binary-ports: "put-u8: # is not a binary output port". io.mo:Expected error in mat custom-binary-ports: "port-length: # does not support operation". *************** -*** 6799,6814 **** +*** 6809,6824 **** io.mo:Expected error in mat current-ports: "console-output-port: # is not a textual output port". io.mo:Expected error in mat current-ports: "console-error-port: # is not a textual output port". io.mo:Expected error in mat current-transcoder: "current-transcoder: # is not a transcoder". @@ -4169,7 +4169,7 @@ io.mo:Expected error in mat utf-16-codec: "utf-16-codec: invalid endianness #f". io.mo:Expected error in mat to-fold-or-not-to-fold: "get-datum: invalid character name #\newLine at char 0 of #". io.mo:Expected error in mat to-fold-or-not-to-fold: "get-datum: invalid character name #\newLine at char 15 of #". ---- 6799,6814 ---- +--- 6809,6824 ---- io.mo:Expected error in mat current-ports: "console-output-port: # is not a textual output port". io.mo:Expected error in mat current-ports: "console-error-port: # is not a textual output port". io.mo:Expected error in mat current-transcoder: "current-transcoder: # is not a transcoder". @@ -4187,7 +4187,7 @@ io.mo:Expected error in mat to-fold-or-not-to-fold: "get-datum: invalid character name #\newLine at char 0 of #". io.mo:Expected error in mat to-fold-or-not-to-fold: "get-datum: invalid character name #\newLine at char 15 of #". *************** -*** 6979,6985 **** +*** 6989,6995 **** 7.mo:Expected error in mat eval-when: "invalid syntax visit-x". 7.mo:Expected error in mat eval-when: "invalid syntax revisit-x". 7.mo:Expected error in mat compile-whole-program: "compile-whole-program: failed for nosuchfile.wpo: no such file or directory". @@ -4195,7 +4195,7 @@ 7.mo:Expected error in mat compile-whole-program: "separate-eval: Exception: library (testfile-wpo-a4) not found 7.mo:Expected error in mat compile-whole-program: "separate-eval: Exception: library (testfile-wpo-c4) not found 7.mo:Expected error in mat compile-whole-program: "separate-eval: Exception: attempt to invoke library (testfile-wpo-c5) while it is still being loaded ---- 6979,6985 ---- +--- 6989,6995 ---- 7.mo:Expected error in mat eval-when: "invalid syntax visit-x". 7.mo:Expected error in mat eval-when: "invalid syntax revisit-x". 7.mo:Expected error in mat compile-whole-program: "compile-whole-program: failed for nosuchfile.wpo: no such file or directory". @@ -4204,7 +4204,7 @@ 7.mo:Expected error in mat compile-whole-program: "separate-eval: Exception: library (testfile-wpo-c4) not found 7.mo:Expected error in mat compile-whole-program: "separate-eval: Exception: attempt to invoke library (testfile-wpo-c5) while it is still being loaded *************** -*** 6993,7019 **** +*** 7003,7029 **** 7.mo:Expected error in mat compile-whole-library: "separate-eval: Exception: library (testfile-cwl-c6) not found 7.mo:Expected error in mat compile-whole-library: "separate-compile: Exception in compile-whole-library: encountered visit-only run-time library (testfile-cwl-a9) while processing file "testfile-cwl-a9.wpo" 7.mo:Expected error in mat top-level-value-functions: "top-level-bound?: "hello" is not a symbol". @@ -4232,7 +4232,7 @@ 7.mo:Expected error in mat top-level-value-functions: "define-top-level-value: hello is not an environment". 7.mo:Expected error in mat top-level-value-functions: "define-top-level-value: # is not a symbol". 7.mo:Expected error in mat top-level-value-functions: "variable i-am-not-bound-i-hope is not bound". ---- 6993,7019 ---- +--- 7003,7029 ---- 7.mo:Expected error in mat compile-whole-library: "separate-eval: Exception: library (testfile-cwl-c6) not found 7.mo:Expected error in mat compile-whole-library: "separate-compile: Exception in compile-whole-library: encountered visit-only run-time library (testfile-cwl-a9) while processing file "testfile-cwl-a9.wpo" 7.mo:Expected error in mat top-level-value-functions: "top-level-bound?: "hello" is not a symbol". @@ -4261,7 +4261,7 @@ 7.mo:Expected error in mat top-level-value-functions: "define-top-level-value: # is not a symbol". 7.mo:Expected error in mat top-level-value-functions: "variable i-am-not-bound-i-hope is not bound". *************** -*** 7410,7500 **** +*** 7420,7513 **** hash.mo:Expected error in mat old-hash-table: "hash-table-for-each: ((a . b)) is not an eq hashtable". hash.mo:Expected error in mat old-hash-table: "incorrect number of arguments to #". hash.mo:Expected error in mat old-hash-table: "incorrect number of arguments to #". @@ -4351,9 +4351,12 @@ ! hash.mo:Expected error in mat hashtable-arguments: "incorrect argument count in call (hashtable-weak?)". ! hash.mo:Expected error in mat hashtable-arguments: "incorrect argument count in call (hashtable-weak? $ht 3)". hash.mo:Expected error in mat hashtable-arguments: "hashtable-weak?: (hash . table) is not a hashtable". +! hash.mo:Expected error in mat hashtable-arguments: "incorrect argument count in call (hashtable-ephemeron?)". +! hash.mo:Expected error in mat hashtable-arguments: "incorrect argument count in call (hashtable-ephemeron? $ht 3)". + hash.mo:Expected error in mat hashtable-arguments: "hashtable-ephemeron?: (hash . table) is not a hashtable". hash.mo:Expected error in mat hash-return-value: "hashtable-ref: invalid hash-function # return value "oops" for any". hash.mo:Expected error in mat hash-return-value: "hashtable-ref: invalid hash-function # return value 3.5 for any". ---- 7410,7500 ---- +--- 7420,7513 ---- hash.mo:Expected error in mat old-hash-table: "hash-table-for-each: ((a . b)) is not an eq hashtable". hash.mo:Expected error in mat old-hash-table: "incorrect number of arguments to #". hash.mo:Expected error in mat old-hash-table: "incorrect number of arguments to #". @@ -4443,10 +4446,13 @@ ! hash.mo:Expected error in mat hashtable-arguments: "incorrect number of arguments to #". ! hash.mo:Expected error in mat hashtable-arguments: "incorrect number of arguments to #". hash.mo:Expected error in mat hashtable-arguments: "hashtable-weak?: (hash . table) is not a hashtable". +! hash.mo:Expected error in mat hashtable-arguments: "incorrect number of arguments to #". +! hash.mo:Expected error in mat hashtable-arguments: "incorrect number of arguments to #". + hash.mo:Expected error in mat hashtable-arguments: "hashtable-ephemeron?: (hash . table) is not a hashtable". hash.mo:Expected error in mat hash-return-value: "hashtable-ref: invalid hash-function # return value "oops" for any". hash.mo:Expected error in mat hash-return-value: "hashtable-ref: invalid hash-function # return value 3.5 for any". *************** -*** 7514,7609 **** +*** 7527,7633 **** hash.mo:Expected error in mat hash-return-value: "hashtable-delete!: invalid hash-function # return value "oops" for any". hash.mo:Expected error in mat hash-return-value: "hashtable-delete!: invalid hash-function # return value 3.5 for any". hash.mo:Expected error in mat hash-return-value: "hashtable-delete!: invalid hash-function # return value 1+2i for any". @@ -4454,6 +4460,10 @@ hash.mo:Expected error in mat eq-hashtable-arguments: "make-weak-eq-hashtable: invalid size argument -1". hash.mo:Expected error in mat eq-hashtable-arguments: "make-weak-eq-hashtable: invalid size argument #t". hash.mo:Expected error in mat eq-hashtable-arguments: "make-weak-eq-hashtable: invalid size argument #f". +! hash.mo:Expected error in mat eq-hashtable-arguments: "incorrect argument count in call (make-ephemeron-eq-hashtable 3 #t)". + hash.mo:Expected error in mat eq-hashtable-arguments: "make-ephemeron-eq-hashtable: invalid size argument -1". + hash.mo:Expected error in mat eq-hashtable-arguments: "make-ephemeron-eq-hashtable: invalid size argument #t". + hash.mo:Expected error in mat eq-hashtable-arguments: "make-ephemeron-eq-hashtable: invalid size argument #f". ! hash.mo:Expected error in mat eq-hashtable-arguments: "incorrect argument count in call (eq-hashtable-ref)". ! hash.mo:Expected error in mat eq-hashtable-arguments: "incorrect argument count in call (eq-hashtable-ref $wht)". ! hash.mo:Expected error in mat eq-hashtable-arguments: "incorrect argument count in call (eq-hashtable-ref $wht (quote a))". @@ -4489,6 +4499,9 @@ ! hash.mo:Expected error in mat eq-hashtable-arguments: "incorrect argument count in call (eq-hashtable-weak?)". ! hash.mo:Expected error in mat eq-hashtable-arguments: "incorrect argument count in call (eq-hashtable-weak? $ht 3)". hash.mo:Expected error in mat eq-hashtable-arguments: "eq-hashtable-weak?: (hash . table) is not an eq hashtable". +! hash.mo:Expected error in mat eq-hashtable-arguments: "incorrect argument count in call (eq-hashtable-ephemeron?)". +! hash.mo:Expected error in mat eq-hashtable-arguments: "incorrect argument count in call (eq-hashtable-ephemeron? $ht 3)". + hash.mo:Expected error in mat eq-hashtable-arguments: "eq-hashtable-ephemeron?: (hash . table) is not an eq hashtable". ! hash.mo:Expected error in mat symbol-hashtable-arguments: "incorrect argument count in call (symbol-hashtable-ref)". ! hash.mo:Expected error in mat symbol-hashtable-arguments: "incorrect argument count in call (symbol-hashtable-ref $symht)". ! hash.mo:Expected error in mat symbol-hashtable-arguments: "incorrect argument count in call (symbol-hashtable-ref $symht (quote a))". @@ -4543,7 +4556,11 @@ hash.mo:Expected error in mat eqv-hashtable-arguments: "make-weak-eqv-hashtable: invalid size argument -1". hash.mo:Expected error in mat eqv-hashtable-arguments: "make-weak-eqv-hashtable: invalid size argument #t". hash.mo:Expected error in mat eqv-hashtable-arguments: "make-weak-eqv-hashtable: invalid size argument #f". ---- 7514,7609 ---- +! hash.mo:Expected error in mat eqv-hashtable-arguments: "incorrect argument count in call (make-ephemeron-eqv-hashtable 3 #t)". + hash.mo:Expected error in mat eqv-hashtable-arguments: "make-ephemeron-eqv-hashtable: invalid size argument -1". + hash.mo:Expected error in mat eqv-hashtable-arguments: "make-ephemeron-eqv-hashtable: invalid size argument #t". + hash.mo:Expected error in mat eqv-hashtable-arguments: "make-ephemeron-eqv-hashtable: invalid size argument #f". +--- 7527,7633 ---- hash.mo:Expected error in mat hash-return-value: "hashtable-delete!: invalid hash-function # return value "oops" for any". hash.mo:Expected error in mat hash-return-value: "hashtable-delete!: invalid hash-function # return value 3.5 for any". hash.mo:Expected error in mat hash-return-value: "hashtable-delete!: invalid hash-function # return value 1+2i for any". @@ -4551,6 +4568,10 @@ hash.mo:Expected error in mat eq-hashtable-arguments: "make-weak-eq-hashtable: invalid size argument -1". hash.mo:Expected error in mat eq-hashtable-arguments: "make-weak-eq-hashtable: invalid size argument #t". hash.mo:Expected error in mat eq-hashtable-arguments: "make-weak-eq-hashtable: invalid size argument #f". +! hash.mo:Expected error in mat eq-hashtable-arguments: "incorrect number of arguments to #". + hash.mo:Expected error in mat eq-hashtable-arguments: "make-ephemeron-eq-hashtable: invalid size argument -1". + hash.mo:Expected error in mat eq-hashtable-arguments: "make-ephemeron-eq-hashtable: invalid size argument #t". + hash.mo:Expected error in mat eq-hashtable-arguments: "make-ephemeron-eq-hashtable: invalid size argument #f". ! hash.mo:Expected error in mat eq-hashtable-arguments: "incorrect number of arguments to #". ! hash.mo:Expected error in mat eq-hashtable-arguments: "incorrect number of arguments to #". ! hash.mo:Expected error in mat eq-hashtable-arguments: "incorrect number of arguments to #". @@ -4586,6 +4607,9 @@ ! hash.mo:Expected error in mat eq-hashtable-arguments: "incorrect number of arguments to #". ! hash.mo:Expected error in mat eq-hashtable-arguments: "incorrect number of arguments to #". hash.mo:Expected error in mat eq-hashtable-arguments: "eq-hashtable-weak?: (hash . table) is not an eq hashtable". +! hash.mo:Expected error in mat eq-hashtable-arguments: "incorrect number of arguments to #". +! hash.mo:Expected error in mat eq-hashtable-arguments: "incorrect number of arguments to #". + hash.mo:Expected error in mat eq-hashtable-arguments: "eq-hashtable-ephemeron?: (hash . table) is not an eq hashtable". ! hash.mo:Expected error in mat symbol-hashtable-arguments: "incorrect number of arguments to #". ! hash.mo:Expected error in mat symbol-hashtable-arguments: "incorrect number of arguments to #". ! hash.mo:Expected error in mat symbol-hashtable-arguments: "incorrect number of arguments to #". @@ -4640,8 +4664,12 @@ hash.mo:Expected error in mat eqv-hashtable-arguments: "make-weak-eqv-hashtable: invalid size argument -1". hash.mo:Expected error in mat eqv-hashtable-arguments: "make-weak-eqv-hashtable: invalid size argument #t". hash.mo:Expected error in mat eqv-hashtable-arguments: "make-weak-eqv-hashtable: invalid size argument #f". +! hash.mo:Expected error in mat eqv-hashtable-arguments: "incorrect number of arguments to #". + hash.mo:Expected error in mat eqv-hashtable-arguments: "make-ephemeron-eqv-hashtable: invalid size argument -1". + hash.mo:Expected error in mat eqv-hashtable-arguments: "make-ephemeron-eqv-hashtable: invalid size argument #t". + hash.mo:Expected error in mat eqv-hashtable-arguments: "make-ephemeron-eqv-hashtable: invalid size argument #f". *************** -*** 7611,7626 **** +*** 7635,7650 **** hash.mo:Expected error in mat generic-hashtable: "hashtable-delete!: # is not mutable". hash.mo:Expected error in mat generic-hashtable: "hashtable-update!: # is not mutable". hash.mo:Expected error in mat generic-hashtable: "hashtable-update!: # is not mutable". @@ -4658,7 +4686,7 @@ hash.mo:Expected error in mat hash-functions: "string-ci-hash: hello is not a string". hash.mo:Expected error in mat fasl-other-hashtable: "fasl-write: invalid fasl object #". hash.mo:Expected error in mat fasl-other-hashtable: "fasl-write: invalid fasl object #". ---- 7611,7626 ---- +--- 7635,7650 ---- hash.mo:Expected error in mat generic-hashtable: "hashtable-delete!: # is not mutable". hash.mo:Expected error in mat generic-hashtable: "hashtable-update!: # is not mutable". hash.mo:Expected error in mat generic-hashtable: "hashtable-update!: # is not mutable". @@ -4676,7 +4704,7 @@ hash.mo:Expected error in mat fasl-other-hashtable: "fasl-write: invalid fasl object #". hash.mo:Expected error in mat fasl-other-hashtable: "fasl-write: invalid fasl object #". *************** -*** 7736,7743 **** +*** 7760,7767 **** 8.mo:Expected error in mat with-syntax: "invalid syntax a". 8.mo:Expected error in mat with-syntax: "duplicate pattern variable x in (x x)". 8.mo:Expected error in mat with-syntax: "duplicate pattern variable x in (x x)". @@ -4685,7 +4713,7 @@ 8.mo:Expected error in mat generate-temporaries: "generate-temporaries: improper list structure (a b . c)". 8.mo:Expected error in mat generate-temporaries: "generate-temporaries: cyclic list structure (a b c b c b ...)". 8.mo:Expected error in mat syntax->list: "syntax->list: invalid argument #". ---- 7736,7743 ---- +--- 7760,7767 ---- 8.mo:Expected error in mat with-syntax: "invalid syntax a". 8.mo:Expected error in mat with-syntax: "duplicate pattern variable x in (x x)". 8.mo:Expected error in mat with-syntax: "duplicate pattern variable x in (x x)". @@ -4695,7 +4723,7 @@ 8.mo:Expected error in mat generate-temporaries: "generate-temporaries: cyclic list structure (a b c b c b ...)". 8.mo:Expected error in mat syntax->list: "syntax->list: invalid argument #". *************** -*** 8325,8340 **** +*** 8349,8364 **** 8.mo:Expected error in mat rnrs-eval: "attempt to assign unbound identifier foo". 8.mo:Expected error in mat rnrs-eval: "invalid definition in immutable environment (define cons (quote #))". 8.mo:Expected error in mat top-level-syntax-functions: "top-level-syntax: "hello" is not a symbol". @@ -4712,7 +4740,7 @@ 8.mo:Expected error in mat top-level-syntax-functions: "define-top-level-syntax: hello is not an environment". 8.mo:Expected error in mat top-level-syntax-functions: "define-top-level-syntax: # is not a symbol". 8.mo:Expected error in mat top-level-syntax-functions: "define-top-level-syntax: cannot modify immutable environment #". ---- 8325,8340 ---- +--- 8349,8364 ---- 8.mo:Expected error in mat rnrs-eval: "attempt to assign unbound identifier foo". 8.mo:Expected error in mat rnrs-eval: "invalid definition in immutable environment (define cons (quote #))". 8.mo:Expected error in mat top-level-syntax-functions: "top-level-syntax: "hello" is not a symbol". @@ -4730,7 +4758,7 @@ 8.mo:Expected error in mat top-level-syntax-functions: "define-top-level-syntax: # is not a symbol". 8.mo:Expected error in mat top-level-syntax-functions: "define-top-level-syntax: cannot modify immutable environment #". *************** -*** 8413,8435 **** +*** 8437,8459 **** fx.mo:Expected error in mat fx=?: "fx=?: (a) is not a fixnum". fx.mo:Expected error in mat fx=?: "fx=?: is not a fixnum". fx.mo:Expected error in mat fx=?: "fx=?: <-int> is not a fixnum". @@ -4754,7 +4782,7 @@ fx.mo:Expected error in mat $fxu<: "incorrect number of arguments to #". fx.mo:Expected error in mat $fxu<: "incorrect number of arguments to #". fx.mo:Expected error in mat $fxu<: "$fxu<: <-int> is not a fixnum". ---- 8413,8435 ---- +--- 8437,8459 ---- fx.mo:Expected error in mat fx=?: "fx=?: (a) is not a fixnum". fx.mo:Expected error in mat fx=?: "fx=?: is not a fixnum". fx.mo:Expected error in mat fx=?: "fx=?: <-int> is not a fixnum". @@ -4779,7 +4807,7 @@ fx.mo:Expected error in mat $fxu<: "incorrect number of arguments to #". fx.mo:Expected error in mat $fxu<: "$fxu<: <-int> is not a fixnum". *************** -*** 8461,8473 **** +*** 8485,8497 **** fx.mo:Expected error in mat r6rs:fx-: "fx-: #f is not a fixnum". fx.mo:Expected error in mat r6rs:fx-: "fx-: #f is not a fixnum". fx.mo:Expected error in mat fx*: "fx*: (a . b) is not a fixnum". @@ -4793,7 +4821,7 @@ fx.mo:Expected error in mat r6rs:fx*: "fx*: is not a fixnum". fx.mo:Expected error in mat r6rs:fx*: "fx*: <-int> is not a fixnum". fx.mo:Expected error in mat r6rs:fx*: "fx*: #f is not a fixnum". ---- 8461,8473 ---- +--- 8485,8497 ---- fx.mo:Expected error in mat r6rs:fx-: "fx-: #f is not a fixnum". fx.mo:Expected error in mat r6rs:fx-: "fx-: #f is not a fixnum". fx.mo:Expected error in mat fx*: "fx*: (a . b) is not a fixnum". @@ -4808,7 +4836,7 @@ fx.mo:Expected error in mat r6rs:fx*: "fx*: <-int> is not a fixnum". fx.mo:Expected error in mat r6rs:fx*: "fx*: #f is not a fixnum". *************** -*** 8517,8529 **** +*** 8541,8553 **** fx.mo:Expected error in mat fx1+: "fx1+: <-int> is not a fixnum". fx.mo:Expected error in mat fx1+: "fx1+: is not a fixnum". fx.mo:Expected error in mat fx1+: "fx1+: a is not a fixnum". @@ -4822,7 +4850,7 @@ fx.mo:Expected error in mat fxmax: "fxmax: a is not a fixnum". fx.mo:Expected error in mat fxmax: "fxmax: is not a fixnum". fx.mo:Expected error in mat fxmax: "fxmax: <-int> is not a fixnum". ---- 8517,8529 ---- +--- 8541,8553 ---- fx.mo:Expected error in mat fx1+: "fx1+: <-int> is not a fixnum". fx.mo:Expected error in mat fx1+: "fx1+: is not a fixnum". fx.mo:Expected error in mat fx1+: "fx1+: a is not a fixnum". @@ -4837,7 +4865,7 @@ fx.mo:Expected error in mat fxmax: "fxmax: is not a fixnum". fx.mo:Expected error in mat fxmax: "fxmax: <-int> is not a fixnum". *************** -*** 8621,8630 **** +*** 8645,8654 **** fx.mo:Expected error in mat fxarithmetic-shift: "fxarithmetic-shift: fixnum overflow with arguments and 10". fx.mo:Expected error in mat fxarithmetic-shift: "fxarithmetic-shift: fixnum overflow with arguments -4097 and ". fx.mo:Expected error in mat fxarithmetic-shift: "fxarithmetic-shift: fixnum overflow with arguments <-int> and 1". @@ -4848,7 +4876,7 @@ fx.mo:Expected error in mat fxbit-field: "fxbit-field: 35.0 is not a fixnum". fx.mo:Expected error in mat fxbit-field: "fxbit-field: 5.0 is not a valid start index". fx.mo:Expected error in mat fxbit-field: "fxbit-field: 8.0 is not a valid end index". ---- 8621,8630 ---- +--- 8645,8654 ---- fx.mo:Expected error in mat fxarithmetic-shift: "fxarithmetic-shift: fixnum overflow with arguments and 10". fx.mo:Expected error in mat fxarithmetic-shift: "fxarithmetic-shift: fixnum overflow with arguments -4097 and ". fx.mo:Expected error in mat fxarithmetic-shift: "fxarithmetic-shift: fixnum overflow with arguments <-int> and 1". @@ -4860,7 +4888,7 @@ fx.mo:Expected error in mat fxbit-field: "fxbit-field: 5.0 is not a valid start index". fx.mo:Expected error in mat fxbit-field: "fxbit-field: 8.0 is not a valid end index". *************** -*** 8638,8671 **** +*** 8662,8695 **** fx.mo:Expected error in mat fxbit-field: "fxbit-field: is not a valid end index". fx.mo:Expected error in mat fxbit-field: "fxbit-field: is not a valid start index". fx.mo:Expected error in mat fxbit-field: "fxbit-field: is not a valid end index". @@ -4895,7 +4923,7 @@ fx.mo:Expected error in mat fxif: "fxif: a is not a fixnum". fx.mo:Expected error in mat fxif: "fxif: 3.4 is not a fixnum". fx.mo:Expected error in mat fxif: "fxif: (a) is not a fixnum". ---- 8638,8671 ---- +--- 8662,8695 ---- fx.mo:Expected error in mat fxbit-field: "fxbit-field: is not a valid end index". fx.mo:Expected error in mat fxbit-field: "fxbit-field: is not a valid start index". fx.mo:Expected error in mat fxbit-field: "fxbit-field: is not a valid end index". @@ -4931,7 +4959,7 @@ fx.mo:Expected error in mat fxif: "fxif: 3.4 is not a fixnum". fx.mo:Expected error in mat fxif: "fxif: (a) is not a fixnum". *************** -*** 8675,8718 **** +*** 8699,8742 **** fx.mo:Expected error in mat fxif: "fxif: <-int> is not a fixnum". fx.mo:Expected error in mat fxif: "fxif: <-int> is not a fixnum". fx.mo:Expected error in mat fxif: "fxif: <-int> is not a fixnum". @@ -4976,7 +5004,7 @@ fx.mo:Expected error in mat fxcopy-bit: "fxcopy-bit: 3.4 is not a fixnum". fx.mo:Expected error in mat fxcopy-bit: "fxcopy-bit: "3" is not a fixnum". fx.mo:Expected error in mat fxcopy-bit: "fxcopy-bit: is not a fixnum". ---- 8675,8718 ---- +--- 8699,8742 ---- fx.mo:Expected error in mat fxif: "fxif: <-int> is not a fixnum". fx.mo:Expected error in mat fxif: "fxif: <-int> is not a fixnum". fx.mo:Expected error in mat fxif: "fxif: <-int> is not a fixnum". @@ -5022,7 +5050,7 @@ fx.mo:Expected error in mat fxcopy-bit: "fxcopy-bit: "3" is not a fixnum". fx.mo:Expected error in mat fxcopy-bit: "fxcopy-bit: is not a fixnum". *************** -*** 8721,8731 **** +*** 8745,8755 **** fx.mo:Expected error in mat fxcopy-bit: "fxcopy-bit: invalid bit index -1". fx.mo:Expected error in mat fxcopy-bit: "fxcopy-bit: invalid bit index ". fx.mo:Expected error in mat fxcopy-bit: "fxcopy-bit: invalid bit index ". @@ -5034,7 +5062,7 @@ fx.mo:Expected error in mat fxcopy-bit-field: "fxcopy-bit-field: "3" is not a fixnum". fx.mo:Expected error in mat fxcopy-bit-field: "fxcopy-bit-field: 3.4 is not a valid start index". fx.mo:Expected error in mat fxcopy-bit-field: "fxcopy-bit-field: 3/4 is not a valid end index". ---- 8721,8731 ---- +--- 8745,8755 ---- fx.mo:Expected error in mat fxcopy-bit: "fxcopy-bit: invalid bit index -1". fx.mo:Expected error in mat fxcopy-bit: "fxcopy-bit: invalid bit index ". fx.mo:Expected error in mat fxcopy-bit: "fxcopy-bit: invalid bit index ". @@ -5047,7 +5075,7 @@ fx.mo:Expected error in mat fxcopy-bit-field: "fxcopy-bit-field: 3.4 is not a valid start index". fx.mo:Expected error in mat fxcopy-bit-field: "fxcopy-bit-field: 3/4 is not a valid end index". *************** -*** 8785,8794 **** +*** 8809,8818 **** fx.mo:Expected error in mat fxdiv0-and-mod0: "fxmod0: (a) is not a fixnum". fx.mo:Expected error in mat fxdiv0-and-mod0: "fxmod0: undefined for 0". fx.mo:Expected error in mat fxdiv0-and-mod0: "fxmod0: undefined for 0". @@ -5058,7 +5086,7 @@ fx.mo:Expected error in mat fx+/carry: "fx+/carry: 1.0 is not a fixnum". fx.mo:Expected error in mat fx+/carry: "fx+/carry: 2.0 is not a fixnum". fx.mo:Expected error in mat fx+/carry: "fx+/carry: 3.0 is not a fixnum". ---- 8785,8794 ---- +--- 8809,8818 ---- fx.mo:Expected error in mat fxdiv0-and-mod0: "fxmod0: (a) is not a fixnum". fx.mo:Expected error in mat fxdiv0-and-mod0: "fxmod0: undefined for 0". fx.mo:Expected error in mat fxdiv0-and-mod0: "fxmod0: undefined for 0". @@ -5070,7 +5098,7 @@ fx.mo:Expected error in mat fx+/carry: "fx+/carry: 2.0 is not a fixnum". fx.mo:Expected error in mat fx+/carry: "fx+/carry: 3.0 is not a fixnum". *************** -*** 8804,8813 **** +*** 8828,8837 **** fx.mo:Expected error in mat fx+/carry: "fx+/carry: <-int> is not a fixnum". fx.mo:Expected error in mat fx+/carry: "fx+/carry: <-int> is not a fixnum". fx.mo:Expected error in mat fx+/carry: "fx+/carry: <-int> is not a fixnum". @@ -5081,7 +5109,7 @@ fx.mo:Expected error in mat fx-/carry: "fx-/carry: 1.0 is not a fixnum". fx.mo:Expected error in mat fx-/carry: "fx-/carry: 2.0 is not a fixnum". fx.mo:Expected error in mat fx-/carry: "fx-/carry: 3.0 is not a fixnum". ---- 8804,8813 ---- +--- 8828,8837 ---- fx.mo:Expected error in mat fx+/carry: "fx+/carry: <-int> is not a fixnum". fx.mo:Expected error in mat fx+/carry: "fx+/carry: <-int> is not a fixnum". fx.mo:Expected error in mat fx+/carry: "fx+/carry: <-int> is not a fixnum". @@ -5093,7 +5121,7 @@ fx.mo:Expected error in mat fx-/carry: "fx-/carry: 2.0 is not a fixnum". fx.mo:Expected error in mat fx-/carry: "fx-/carry: 3.0 is not a fixnum". *************** -*** 8823,8832 **** +*** 8847,8856 **** fx.mo:Expected error in mat fx-/carry: "fx-/carry: <-int> is not a fixnum". fx.mo:Expected error in mat fx-/carry: "fx-/carry: <-int> is not a fixnum". fx.mo:Expected error in mat fx-/carry: "fx-/carry: <-int> is not a fixnum". @@ -5104,7 +5132,7 @@ fx.mo:Expected error in mat fx*/carry: "fx*/carry: 1.0 is not a fixnum". fx.mo:Expected error in mat fx*/carry: "fx*/carry: 2.0 is not a fixnum". fx.mo:Expected error in mat fx*/carry: "fx*/carry: 3.0 is not a fixnum". ---- 8823,8832 ---- +--- 8847,8856 ---- fx.mo:Expected error in mat fx-/carry: "fx-/carry: <-int> is not a fixnum". fx.mo:Expected error in mat fx-/carry: "fx-/carry: <-int> is not a fixnum". fx.mo:Expected error in mat fx-/carry: "fx-/carry: <-int> is not a fixnum". @@ -5116,7 +5144,7 @@ fx.mo:Expected error in mat fx*/carry: "fx*/carry: 2.0 is not a fixnum". fx.mo:Expected error in mat fx*/carry: "fx*/carry: 3.0 is not a fixnum". *************** -*** 8842,8852 **** +*** 8866,8876 **** fx.mo:Expected error in mat fx*/carry: "fx*/carry: <-int> is not a fixnum". fx.mo:Expected error in mat fx*/carry: "fx*/carry: <-int> is not a fixnum". fx.mo:Expected error in mat fx*/carry: "fx*/carry: <-int> is not a fixnum". @@ -5128,7 +5156,7 @@ fx.mo:Expected error in mat fxrotate-bit-field: "fxrotate-bit-field: a is not a fixnum". fx.mo:Expected error in mat fxrotate-bit-field: "fxrotate-bit-field: invalid start index 0.0". fx.mo:Expected error in mat fxrotate-bit-field: "fxrotate-bit-field: invalid end index 2.0". ---- 8842,8852 ---- +--- 8866,8876 ---- fx.mo:Expected error in mat fx*/carry: "fx*/carry: <-int> is not a fixnum". fx.mo:Expected error in mat fx*/carry: "fx*/carry: <-int> is not a fixnum". fx.mo:Expected error in mat fx*/carry: "fx*/carry: <-int> is not a fixnum". @@ -5141,7 +5169,7 @@ fx.mo:Expected error in mat fxrotate-bit-field: "fxrotate-bit-field: invalid start index 0.0". fx.mo:Expected error in mat fxrotate-bit-field: "fxrotate-bit-field: invalid end index 2.0". *************** -*** 8869,8878 **** +*** 8893,8902 **** fx.mo:Expected error in mat fxrotate-bit-field: "fxrotate-bit-field: invalid end index ". fx.mo:Expected error in mat fxrotate-bit-field: "fxrotate-bit-field: invalid end index ". fx.mo:Expected error in mat fxrotate-bit-field: "fxrotate-bit-field: count 1 is greater than difference between end index 5 and start index 5". @@ -5152,7 +5180,7 @@ fx.mo:Expected error in mat fxreverse-bit-field: "fxreverse-bit-field: a is not a fixnum". fx.mo:Expected error in mat fxreverse-bit-field: "fxreverse-bit-field: invalid start index 0.0". fx.mo:Expected error in mat fxreverse-bit-field: "fxreverse-bit-field: invalid end index 2.0". ---- 8869,8878 ---- +--- 8893,8902 ---- fx.mo:Expected error in mat fxrotate-bit-field: "fxrotate-bit-field: invalid end index ". fx.mo:Expected error in mat fxrotate-bit-field: "fxrotate-bit-field: invalid end index ". fx.mo:Expected error in mat fxrotate-bit-field: "fxrotate-bit-field: count 1 is greater than difference between end index 5 and start index 5". @@ -5164,7 +5192,7 @@ fx.mo:Expected error in mat fxreverse-bit-field: "fxreverse-bit-field: invalid start index 0.0". fx.mo:Expected error in mat fxreverse-bit-field: "fxreverse-bit-field: invalid end index 2.0". *************** -*** 8888,8905 **** +*** 8912,8929 **** fx.mo:Expected error in mat fxreverse-bit-field: "fxreverse-bit-field: invalid end index ". fx.mo:Expected error in mat fxreverse-bit-field: "fxreverse-bit-field: invalid end index <-int>". fx.mo:Expected error in mat fxreverse-bit-field: "fxreverse-bit-field: start index 7 is greater than end index 5". @@ -5183,7 +5211,7 @@ fl.mo:Expected error in mat fl=: "fl=: (a) is not a flonum". fl.mo:Expected error in mat fl=: "fl=: a is not a flonum". fl.mo:Expected error in mat fl=: "fl=: a is not a flonum". ---- 8888,8905 ---- +--- 8912,8929 ---- fx.mo:Expected error in mat fxreverse-bit-field: "fxreverse-bit-field: invalid end index ". fx.mo:Expected error in mat fxreverse-bit-field: "fxreverse-bit-field: invalid end index <-int>". fx.mo:Expected error in mat fxreverse-bit-field: "fxreverse-bit-field: start index 7 is greater than end index 5". @@ -5203,7 +5231,7 @@ fl.mo:Expected error in mat fl=: "fl=: a is not a flonum". fl.mo:Expected error in mat fl=: "fl=: a is not a flonum". *************** -*** 8907,8913 **** +*** 8931,8937 **** fl.mo:Expected error in mat fl=: "fl=: 3 is not a flonum". fl.mo:Expected error in mat fl=: "fl=: 7/2 is not a flonum". fl.mo:Expected error in mat fl=: "fl=: 7/2 is not a flonum". @@ -5211,7 +5239,7 @@ fl.mo:Expected error in mat fl<: "fl<: (a) is not a flonum". fl.mo:Expected error in mat fl<: "fl<: a is not a flonum". fl.mo:Expected error in mat fl<: "fl<: a is not a flonum". ---- 8907,8913 ---- +--- 8931,8937 ---- fl.mo:Expected error in mat fl=: "fl=: 3 is not a flonum". fl.mo:Expected error in mat fl=: "fl=: 7/2 is not a flonum". fl.mo:Expected error in mat fl=: "fl=: 7/2 is not a flonum". @@ -5220,7 +5248,7 @@ fl.mo:Expected error in mat fl<: "fl<: a is not a flonum". fl.mo:Expected error in mat fl<: "fl<: a is not a flonum". *************** -*** 8915,8921 **** +*** 8939,8945 **** fl.mo:Expected error in mat fl<: "fl<: 3 is not a flonum". fl.mo:Expected error in mat fl<: "fl<: 7/2 is not a flonum". fl.mo:Expected error in mat fl<: "fl<: 7/2 is not a flonum". @@ -5228,7 +5256,7 @@ fl.mo:Expected error in mat fl>: "fl>: (a) is not a flonum". fl.mo:Expected error in mat fl>: "fl>: a is not a flonum". fl.mo:Expected error in mat fl>: "fl>: a is not a flonum". ---- 8915,8921 ---- +--- 8939,8945 ---- fl.mo:Expected error in mat fl<: "fl<: 3 is not a flonum". fl.mo:Expected error in mat fl<: "fl<: 7/2 is not a flonum". fl.mo:Expected error in mat fl<: "fl<: 7/2 is not a flonum". @@ -5237,7 +5265,7 @@ fl.mo:Expected error in mat fl>: "fl>: a is not a flonum". fl.mo:Expected error in mat fl>: "fl>: a is not a flonum". *************** -*** 8923,8929 **** +*** 8947,8953 **** fl.mo:Expected error in mat fl>: "fl>: 3 is not a flonum". fl.mo:Expected error in mat fl>: "fl>: 7/2 is not a flonum". fl.mo:Expected error in mat fl>: "fl>: 7/2 is not a flonum". @@ -5245,7 +5273,7 @@ fl.mo:Expected error in mat fl<=: "fl<=: (a) is not a flonum". fl.mo:Expected error in mat fl<=: "fl<=: a is not a flonum". fl.mo:Expected error in mat fl<=: "fl<=: a is not a flonum". ---- 8923,8929 ---- +--- 8947,8953 ---- fl.mo:Expected error in mat fl>: "fl>: 3 is not a flonum". fl.mo:Expected error in mat fl>: "fl>: 7/2 is not a flonum". fl.mo:Expected error in mat fl>: "fl>: 7/2 is not a flonum". @@ -5254,7 +5282,7 @@ fl.mo:Expected error in mat fl<=: "fl<=: a is not a flonum". fl.mo:Expected error in mat fl<=: "fl<=: a is not a flonum". *************** -*** 8931,8937 **** +*** 8955,8961 **** fl.mo:Expected error in mat fl<=: "fl<=: 3 is not a flonum". fl.mo:Expected error in mat fl<=: "fl<=: 7/2 is not a flonum". fl.mo:Expected error in mat fl<=: "fl<=: 7/2 is not a flonum". @@ -5262,7 +5290,7 @@ fl.mo:Expected error in mat fl>=: "fl>=: (a) is not a flonum". fl.mo:Expected error in mat fl>=: "fl>=: a is not a flonum". fl.mo:Expected error in mat fl>=: "fl>=: a is not a flonum". ---- 8931,8937 ---- +--- 8955,8961 ---- fl.mo:Expected error in mat fl<=: "fl<=: 3 is not a flonum". fl.mo:Expected error in mat fl<=: "fl<=: 7/2 is not a flonum". fl.mo:Expected error in mat fl<=: "fl<=: 7/2 is not a flonum". @@ -5271,7 +5299,7 @@ fl.mo:Expected error in mat fl>=: "fl>=: a is not a flonum". fl.mo:Expected error in mat fl>=: "fl>=: a is not a flonum". *************** -*** 8939,8978 **** +*** 8963,9002 **** fl.mo:Expected error in mat fl>=: "fl>=: 3 is not a flonum". fl.mo:Expected error in mat fl>=: "fl>=: 7/2 is not a flonum". fl.mo:Expected error in mat fl>=: "fl>=: 7/2 is not a flonum". @@ -5312,7 +5340,7 @@ fl.mo:Expected error in mat fl>=?: "fl>=?: a is not a flonum". fl.mo:Expected error in mat fl>=?: "fl>=?: a is not a flonum". fl.mo:Expected error in mat fl>=?: "fl>=?: 3 is not a flonum". ---- 8939,8978 ---- +--- 8963,9002 ---- fl.mo:Expected error in mat fl>=: "fl>=: 3 is not a flonum". fl.mo:Expected error in mat fl>=: "fl>=: 7/2 is not a flonum". fl.mo:Expected error in mat fl>=: "fl>=: 7/2 is not a flonum". @@ -5354,7 +5382,7 @@ fl.mo:Expected error in mat fl>=?: "fl>=?: a is not a flonum". fl.mo:Expected error in mat fl>=?: "fl>=?: 3 is not a flonum". *************** -*** 8982,8988 **** +*** 9006,9012 **** fl.mo:Expected error in mat fl+: "fl+: (a . b) is not a flonum". fl.mo:Expected error in mat fl+: "fl+: 1 is not a flonum". fl.mo:Expected error in mat fl+: "fl+: 2/3 is not a flonum". @@ -5362,7 +5390,7 @@ fl.mo:Expected error in mat fl-: "fl-: (a . b) is not a flonum". fl.mo:Expected error in mat fl-: "fl-: 1 is not a flonum". fl.mo:Expected error in mat fl-: "fl-: a is not a flonum". ---- 8982,8988 ---- +--- 9006,9012 ---- fl.mo:Expected error in mat fl+: "fl+: (a . b) is not a flonum". fl.mo:Expected error in mat fl+: "fl+: 1 is not a flonum". fl.mo:Expected error in mat fl+: "fl+: 2/3 is not a flonum". @@ -5371,7 +5399,7 @@ fl.mo:Expected error in mat fl-: "fl-: 1 is not a flonum". fl.mo:Expected error in mat fl-: "fl-: a is not a flonum". *************** -*** 8992,9074 **** +*** 9016,9098 **** fl.mo:Expected error in mat fl*: "fl*: (a . b) is not a flonum". fl.mo:Expected error in mat fl*: "fl*: 1 is not a flonum". fl.mo:Expected error in mat fl*: "fl*: 2/3 is not a flonum". @@ -5455,7 +5483,7 @@ fl.mo:Expected error in mat flround: "flround: a is not a flonum". fl.mo:Expected error in mat flround: "flround: 2.0+1.0i is not a flonum". fl.mo:Expected error in mat flround: "flround: 2+1i is not a flonum". ---- 8992,9074 ---- +--- 9016,9098 ---- fl.mo:Expected error in mat fl*: "fl*: (a . b) is not a flonum". fl.mo:Expected error in mat fl*: "fl*: 1 is not a flonum". fl.mo:Expected error in mat fl*: "fl*: 2/3 is not a flonum". @@ -5540,7 +5568,7 @@ fl.mo:Expected error in mat flround: "flround: 2.0+1.0i is not a flonum". fl.mo:Expected error in mat flround: "flround: 2+1i is not a flonum". *************** -*** 9088,9136 **** +*** 9112,9160 **** fl.mo:Expected error in mat flinfinite?: "flinfinite?: 3 is not a flonum". fl.mo:Expected error in mat flinfinite?: "flinfinite?: 3/4 is not a flonum". fl.mo:Expected error in mat flinfinite?: "flinfinite?: hi is not a flonum". @@ -5590,7 +5618,7 @@ fl.mo:Expected error in mat flmin: "flmin: a is not a flonum". fl.mo:Expected error in mat flmin: "flmin: a is not a flonum". fl.mo:Expected error in mat flmin: "flmin: a is not a flonum". ---- 9088,9136 ---- +--- 9112,9160 ---- fl.mo:Expected error in mat flinfinite?: "flinfinite?: 3 is not a flonum". fl.mo:Expected error in mat flinfinite?: "flinfinite?: 3/4 is not a flonum". fl.mo:Expected error in mat flinfinite?: "flinfinite?: hi is not a flonum". @@ -5641,7 +5669,7 @@ fl.mo:Expected error in mat flmin: "flmin: a is not a flonum". fl.mo:Expected error in mat flmin: "flmin: a is not a flonum". *************** -*** 9138,9144 **** +*** 9162,9168 **** fl.mo:Expected error in mat flmin: "flmin: a is not a flonum". fl.mo:Expected error in mat flmin: "flmin: 0.0+1.0i is not a flonum". fl.mo:Expected error in mat flmin: "flmin: 0+1i is not a flonum". @@ -5649,7 +5677,7 @@ fl.mo:Expected error in mat flmax: "flmax: a is not a flonum". fl.mo:Expected error in mat flmax: "flmax: a is not a flonum". fl.mo:Expected error in mat flmax: "flmax: 3 is not a flonum". ---- 9138,9144 ---- +--- 9162,9168 ---- fl.mo:Expected error in mat flmin: "flmin: a is not a flonum". fl.mo:Expected error in mat flmin: "flmin: 0.0+1.0i is not a flonum". fl.mo:Expected error in mat flmin: "flmin: 0+1i is not a flonum". @@ -5658,7 +5686,7 @@ fl.mo:Expected error in mat flmax: "flmax: a is not a flonum". fl.mo:Expected error in mat flmax: "flmax: 3 is not a flonum". *************** -*** 9146,9159 **** +*** 9170,9183 **** fl.mo:Expected error in mat flmax: "flmax: a is not a flonum". fl.mo:Expected error in mat flmax: "flmax: 0.0+1.0i is not a flonum". fl.mo:Expected error in mat flmax: "flmax: 0+1i is not a flonum". @@ -5673,7 +5701,7 @@ fl.mo:Expected error in mat fldenominator: "fldenominator: a is not a flonum". fl.mo:Expected error in mat fldenominator: "fldenominator: 3 is not a flonum". fl.mo:Expected error in mat fldenominator: "fldenominator: 0+1i is not a flonum". ---- 9146,9159 ---- +--- 9170,9183 ---- fl.mo:Expected error in mat flmax: "flmax: a is not a flonum". fl.mo:Expected error in mat flmax: "flmax: 0.0+1.0i is not a flonum". fl.mo:Expected error in mat flmax: "flmax: 0+1i is not a flonum". @@ -5689,7 +5717,7 @@ fl.mo:Expected error in mat fldenominator: "fldenominator: 3 is not a flonum". fl.mo:Expected error in mat fldenominator: "fldenominator: 0+1i is not a flonum". *************** -*** 9199,9205 **** +*** 9223,9229 **** cfl.mo:Expected error in mat cfl-: "cfl-: a is not a cflonum". cfl.mo:Expected error in mat cfl-: "cfl-: a is not a cflonum". cfl.mo:Expected error in mat cfl-: "cfl-: a is not a cflonum". @@ -5697,7 +5725,7 @@ cfl.mo:Expected error in mat cfl-: "cfl-: a is not a cflonum". cfl.mo:Expected error in mat cfl-: "cfl-: a is not a cflonum". cfl.mo:Expected error in mat cfl-: "cfl-: a is not a cflonum". ---- 9199,9205 ---- +--- 9223,9229 ---- cfl.mo:Expected error in mat cfl-: "cfl-: a is not a cflonum". cfl.mo:Expected error in mat cfl-: "cfl-: a is not a cflonum". cfl.mo:Expected error in mat cfl-: "cfl-: a is not a cflonum". @@ -5706,7 +5734,7 @@ cfl.mo:Expected error in mat cfl-: "cfl-: a is not a cflonum". cfl.mo:Expected error in mat cfl-: "cfl-: a is not a cflonum". *************** -*** 9209,9222 **** +*** 9233,9246 **** cfl.mo:Expected error in mat cfl/: "cfl/: a is not a cflonum". cfl.mo:Expected error in mat cfl/: "cfl/: a is not a cflonum". cfl.mo:Expected error in mat cfl/: "cfl/: a is not a cflonum". @@ -5721,7 +5749,7 @@ foreign.mo:Expected error in mat load-shared-object: "load-shared-object: invalid path 3". foreign.mo:Expected error in mat foreign-procedure: "foreign-procedure: no entry for "i do not exist"". foreign.mo:Expected error in mat foreign-procedure: "foreign-procedure: no entry for "i do not exist"". ---- 9209,9222 ---- +--- 9233,9246 ---- cfl.mo:Expected error in mat cfl/: "cfl/: a is not a cflonum". cfl.mo:Expected error in mat cfl/: "cfl/: a is not a cflonum". cfl.mo:Expected error in mat cfl/: "cfl/: a is not a cflonum". @@ -5737,7 +5765,7 @@ foreign.mo:Expected error in mat foreign-procedure: "foreign-procedure: no entry for "i do not exist"". foreign.mo:Expected error in mat foreign-procedure: "foreign-procedure: no entry for "i do not exist"". *************** -*** 9251,9258 **** +*** 9275,9282 **** foreign.mo:Expected error in mat foreign-procedure: "id: invalid foreign-procedure argument foo". foreign.mo:Expected error in mat foreign-procedure: "foreign-procedure: invalid foreign procedure handle abcde". foreign.mo:Expected error in mat foreign-procedure: "float_id: invalid foreign-procedure argument 0". @@ -5746,7 +5774,7 @@ foreign.mo:Expected error in mat foreign-sizeof: "foreign-sizeof: invalid foreign type specifier i-am-not-a-type". foreign.mo:Expected error in mat foreign-sizeof: "foreign-sizeof: invalid foreign type specifier 1". foreign.mo:Expected error in mat foreign-bytevectors: "u8*->u8*: invalid foreign-procedure argument "hello"". ---- 9251,9258 ---- +--- 9275,9282 ---- foreign.mo:Expected error in mat foreign-procedure: "id: invalid foreign-procedure argument foo". foreign.mo:Expected error in mat foreign-procedure: "foreign-procedure: invalid foreign procedure handle abcde". foreign.mo:Expected error in mat foreign-procedure: "float_id: invalid foreign-procedure argument 0". @@ -5756,7 +5784,7 @@ foreign.mo:Expected error in mat foreign-sizeof: "foreign-sizeof: invalid foreign type specifier 1". foreign.mo:Expected error in mat foreign-bytevectors: "u8*->u8*: invalid foreign-procedure argument "hello"". *************** -*** 9736,9748 **** +*** 9760,9772 **** unix.mo:Expected error in mat file-operations: "file-access-time: failed for "testlink": no such file or directory". unix.mo:Expected error in mat file-operations: "file-change-time: failed for "testlink": no such file or directory". unix.mo:Expected error in mat file-operations: "file-modification-time: failed for "testlink": no such file or directory". @@ -5770,7 +5798,7 @@ windows.mo:Expected error in mat registry: "get-registry: pooh is not a string". windows.mo:Expected error in mat registry: "put-registry!: 3 is not a string". windows.mo:Expected error in mat registry: "put-registry!: 3 is not a string". ---- 9736,9748 ---- +--- 9760,9772 ---- unix.mo:Expected error in mat file-operations: "file-access-time: failed for "testlink": no such file or directory". unix.mo:Expected error in mat file-operations: "file-change-time: failed for "testlink": no such file or directory". unix.mo:Expected error in mat file-operations: "file-modification-time: failed for "testlink": no such file or directory". @@ -5785,7 +5813,7 @@ windows.mo:Expected error in mat registry: "put-registry!: 3 is not a string". windows.mo:Expected error in mat registry: "put-registry!: 3 is not a string". *************** -*** 9770,9841 **** +*** 9794,9865 **** ieee.mo:Expected error in mat flonum->fixnum: "flonum->fixnum: result for -inf.0 would be outside of fixnum range". ieee.mo:Expected error in mat flonum->fixnum: "flonum->fixnum: result for +nan.0 would be outside of fixnum range". ieee.mo:Expected error in mat fllp: "fllp: 3 is not a flonum". @@ -5858,7 +5886,7 @@ date.mo:Expected error in mat time: "time>=?: 3 is not a time record". date.mo:Expected error in mat time: "time>=?: # is not a time record". date.mo:Expected error in mat time: "time>=?: types of