diff --git a/host/chez/run-corpus.ss b/host/chez/run-corpus.ss index 0c97938..417c922 100644 --- a/host/chez/run-corpus.ss +++ b/host/chez/run-corpus.ss @@ -11,7 +11,7 @@ ;; reset between cases so there is no leakage — same isolation a fresh process gives. ;; ;; chez --script host/chez/run-corpus.ss -;; JOLT_CHEZ_ZJ_FLOOR=N override the regression floor (default 2688) +;; JOLT_CHEZ_ZJ_FLOOR=N override the regression floor (default 2690) ;; JOLT_CORPUS_LIMIT=N every-Nth stride (fast iteration; floor drops to 0) ;; JOLT_DUMP_CRASH_LABELS=1 list crash + allowlisted labels (import (chezscheme)) @@ -203,7 +203,7 @@ ;; Regression floor: fail on any NEW divergence or if pass drops below the floor. (define base-floor (let ((s (getenv "JOLT_CHEZ_ZJ_FLOOR"))) - (if s (string->number s) 2688))) + (if s (string->number s) 2690))) (define floor (if limit 0 base-floor)) (when (or (> (length diverged) 0) (< pass floor)) (printf "REGRESSION: pass ~a < floor ~a or ~a new divergence(s)\n" diff --git a/host/chez/transients.ss b/host/chez/transients.ss index 0d6faea..923bddf 100644 --- a/host/chez/transients.ss +++ b/host/chez/transients.ss @@ -38,7 +38,13 @@ ;; (assoc! t k v & kvs): variadic like Clojure (jolt-assoc already folds pairs). (define (jolt-assoc! t . kvs) (jolt-trans-check t "assoc!") - (jolt-transient-coll-set! t (apply jolt-assoc (jolt-transient-coll t) kvs)) + ;; JVM assoc! is variadic: once a complete first key/val pair is present (>=3 + ;; kvs), a TRAILING lone key fills nil; a lone key alone (1 kv) is a wrong-arity + ;; throw (so don't pad it — the persistent assoc raises on odd args). + (let ((kvs (if (and (>= (length kvs) 3) (odd? (length kvs))) + (append kvs (list jolt-nil)) + kvs))) + (jolt-transient-coll-set! t (apply jolt-assoc (jolt-transient-coll t) kvs))) t) (define (jolt-dissoc! t . ks) (jolt-trans-check t "dissoc!")