Chez Phase 2 (inc Y): runtime data reader + clojure.edn (jolt-r8ku)

Chez-side recursive-descent Clojure reader (host/chez/reader.ss) producing the
same jolt forms the Janet reader yields, behind the read-string / __parse-next /
__read-tagged seams the seed registers in eval_runtime.janet. That lights up the
whole *in* read family — read, read+string, with-in-str (read) — plus read-string
and read-string metadata, none of which needed an analyzer change (read-string is
a clojure.core seam, jolt-nil on the prelude until now).

Reader output is pinned to the Janet reader's shapes: numbers coerce to flonum
(the all-double model emit-const uses, else a read int isn't = a source int),
sets read as the {:jolt/type :jolt/set :value [...]} FORM, #tag/#inst/#uuid/#regex
as tagged forms (no data reader applied — read-string never evaluates), ^meta on
a symbol, and the ' ` ~ ~@ @ reader macros. clojure.edn is added to the prelude
tier; its edn->value builds the real set/tagged values and __read-tagged reuses
the inc X #inst/#uuid constructors. The reader-arity edn/read stays a lazy gap
(drain-reader is Janet-coupled) — read-string is the live path.

eval / load-string / runtime defmacro are still out: they need the compiler at
runtime, which is Phase 3 (self-host). Chez-only change, no Janet gate.

Parity 2238 -> 2259, 0 new divergences. _reader 47/47; all chez unit tests green;
emit-test 331/331.
This commit is contained in:
Yogthos 2026-06-19 12:06:44 -04:00
parent c70f3bae34
commit 6df60229b0
6 changed files with 484 additions and 4 deletions

View file

@ -269,8 +269,14 @@
# offsets, = / hash / pr-str / get-as-overlay-seam) plus the DateTimeFormatter
# pattern engine + Instant/ZoneId/LocalDateTime/FormatStyle/Locale/Date shims.
# This cleared the whole "unsupported form" emit-fail bucket) 2238.
# jolt-r8ku inc Y (Chez data reader — host/chez/reader.ss, a recursive-descent
# Clojure reader producing the same forms as the Janet reader, behind the
# read-string / __parse-next / __read-tagged seams) + clojure.edn loaded into the
# prelude. Lights up read / read+string / with-in-str (read) / read-string and
# clojure.edn/read-string. (eval / load-string / runtime defmacro stay Phase-3 —
# they need the compiler at runtime.) 2259.
# Strided runs scale down.
(def base-floor (scan-number (or (os/getenv "JOLT_CHEZ_PRELUDE_FLOOR") "2238")))
(def base-floor (scan-number (or (os/getenv "JOLT_CHEZ_PRELUDE_FLOOR") "2259")))
(def floor (if (os/getenv "JOLT_CORPUS_LIMIT") 0 base-floor))
(when (or (> (length diverged) 0) (< pass floor))
(printf "REGRESSION: pass %d < floor %d or %d new divergence(s)" pass floor (length diverged)))