Chez Phase 1 (increment 3a): persistent collections on the Chez RT
Broaden the Scheme back end past the numeric/functional subset to vectors,
maps, and sets. host/chez/collections.ss adds a copy-on-write persistent
vector and a bitmap HAMT (the structure 0c measured self-hostable) backing
both maps and sets, keyed by jolt-hash and compared by jolt=. emit.janet
emits :vector/:map/:set literals to the rt constructors and lowers the leaf
ops (conj/get/nth/count/assoc/dissoc/contains?/empty?/peek/pop) via the
native-ops path, with a per-op arity gate.
Also: keyword/map literals in fn position lower to jolt-get ((:k m), ({:k v} k));
arity-1 comparisons emit the vacuous jolt truth (Scheme < rejects a non-number
even at arity 1); count returns a flonum and vector indices coerce from flonum,
both consequences of the all-double number model; values.ss = / hash and the
rt printer learn collections (maps/sets render in HAMT order, so the probe
compares unordered values via =, not printed form).
Subset parity 182 -> 433/436 compiled cases (2219/2655 out of subset), 0 new
divergences. The 3 known divergences are dynamic IFn dispatch (a keyword/vector
held in a local, called as a fn) — deferred to the IFn/protocol increment and
allowlisted in the probe. emit-test 31/31, full run-tests green (125 files).
This commit is contained in:
parent
9bbcc07c8f
commit
5c5d2cd1fc
7 changed files with 473 additions and 18 deletions
|
|
@ -48,9 +48,17 @@ compile-time signal) and are counted "out of subset", not as divergences.
|
|||
|
||||
JOLT_CHEZ_CORPUS=1 janet test/chez/run-corpus-chez.janet
|
||||
|
||||
Baseline (2026-06-17): **182/182 compiled cases pass, 0 divergences**; 2473/2655
|
||||
out of subset (await core on Chez). It's a slow report (a Chez subprocess per
|
||||
case), so it's gated behind `JOLT_CHEZ_CORPUS` out of the default suite, like the
|
||||
benches. `test/chez/emit-test.janet` is the fast Phase-1 unit gate (real
|
||||
analyzer → Chez parity for fib/mandelbrot + regressions); both skip cleanly when
|
||||
Baseline after inc 3a (persistent collections, jolt-wgbz): **433/436 compiled
|
||||
cases pass**, 3 known divergences, 0 NEW; 2219/2655 out of subset (await the seq
|
||||
tier + core on Chez). The 3 known divergences are dynamic IFn dispatch — a
|
||||
keyword/vector held in a LOCAL and called as a fn (`(let [k :a] (k m))`); the
|
||||
STATIC literal forms (`(:a m)`, `({:a 1} :a)`) are supported. They're
|
||||
allowlisted in the probe; it exits non-zero on a NEW divergence.
|
||||
|
||||
(Prior, inc 2 baseline: 182/182 compiled, 0 divergences, 2473 out of subset.)
|
||||
|
||||
It's a slow report (a Chez subprocess per case), so it's gated behind
|
||||
`JOLT_CHEZ_CORPUS` out of the default suite, like the benches.
|
||||
`test/chez/emit-test.janet` is the fast Phase-1 unit gate (real analyzer → Chez
|
||||
parity for fib/mandelbrot + collections + regressions); both skip cleanly when
|
||||
`chez` isn't on PATH.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue