jolt/jolt-core/clojure/core
Yogthos 20da34a432 core: wrap macro expanders in fn (not fn*) so destructured arglists compile
Follow-up to the staged macro-compile change. The macro-recompile pass
wrapped each expander in the raw fn* primitive, which punts on a
destructuring rest param — so if-not/if-let/if-some/assert (using the
canonical '& [else]') couldn't compile and had been rewritten to plain
rest params as a workaround.

Root cause: fn* is the primitive; the fn MACRO is what desugars
destructuring (rest, map, nested) into the body before lowering. Wrapping
expanders in fn instead of fn* compiles any destructured macro arglist
uniformly, so the workaround is unnecessary — reverted those 4 macros to
the canonical '& [else]' forms.

Net: rest-destructuring is fully compiled for all normal code (fn/defn/
let/macro params). Only the hand-written raw fn* primitive still punts
(jolt-f79, downgraded to P4 — falls back to interpreter, still correct).

47/47 overlay macros compiled. Gate green: conformance 267x3,
fallback-zero 31/5, bootstrap-fixpoint stage1==2==3, self-host,
staged-bootstrap, lazy-infinite 44/44, clojure-test-suite >=4034/67,
sci-bootstrap, features, all unit+spec.
2026-06-09 08:52:01 -04:00
..
00-kernel.clj Compiler research (#10) 2026-06-09 07:30:25 +08:00
00-syntax.clj Compiler research (#10) 2026-06-09 07:30:25 +08:00
10-seq.clj Compiler research (#10) 2026-06-09 07:30:25 +08:00
20-coll.clj Compiler research (#10) 2026-06-09 07:30:25 +08:00
30-macros.clj core: wrap macro expanders in fn (not fn*) so destructured arglists compile 2026-06-09 08:52:01 -04:00
40-lazy.clj Stage1 analyzer parity (#11) 2026-06-09 12:24:37 +08:00
MIGRATION.md Compiler research (#10) 2026-06-09 07:30:25 +08:00