jolt/jolt-core/clojure/core
Yogthos 646744ca1d self-host: gate the analyzer build on the kernel tier; move case/cond-> to the overlay
The real bug behind the case/cond-> fixpoint regression wasn't gensym — it was
build ordering. A top-level defn in a pre-kernel tier (the fresh-sym helper these
macros need) gets compiled in compile mode, and that lazily builds the self-hosted
analyzer via ensure-analyzer. 00-syntax loads before 00-kernel, so the analyzer
was built against a core missing mapv/second/peek/...: its references to them were
interned as forward-ref nil cells in jolt.analyzer. Those nil cells then shadowed
the real clojure.core defs when the analyzer rebuilt itself (stage2), so the
analyzer's own mapv calls went to nil — 'Cannot call nil as a function'. Only
variadic-heavy paths (juxt+mapv) surfaced it.

build-compiler! already documented that the kernel must be loaded first; nothing
enforced it. Gate ensure-analyzer on a :kernel-ready? flag set after the kernel
tier loads. A pre-kernel compile now falls back to the interpreter (compile-and-eval
already handles that) instead of building the analyzer too early. fresh-sym ends up
interpreted during 00-syntax load, which is fine.

With ordering fixed, case and cond-> move to 00-syntax (they need a real gensym, so
syntax-quote auto-gensym alone won't do). conformance 228x3, fixpoint stage1==2==3,
clojure-test-suite 3930, full suite green, bench flat.
2026-06-07 16:29:50 -04:00
..
00-kernel.clj core: staged-bootstrap kernel tier; move second/peek/subvec/mapv/update to Clojure 2026-06-06 13:15:17 -04:00
00-syntax.clj self-host: gate the analyzer build on the kernel tier; move case/cond-> to the overlay 2026-06-07 16:29:50 -04:00
10-seq.clj core: staged-bootstrap kernel tier; move second/peek/subvec/mapv/update to Clojure 2026-06-06 13:15:17 -04:00
20-coll.clj core: move dedupe + seq-to-map-for-destructuring to overlay (+ tests) 2026-06-07 00:14:40 -04:00
30-macros.clj core: move binding macro to overlay 2026-06-07 01:13:22 -04:00
MIGRATION.md migration doc: phase 3 status + the hot-macro expansion-speed finding 2026-06-07 08:47:04 -04:00