jolt/test
Yogthos ad84b2904f core: fn param + loop destructuring, compiled (matching Clojure)
fn now desugars destructuring params like Clojure's maybe-destructured: each
non-symbol param becomes a gensym and the body is wrapped in a let that rebinds the
pattern, so fn* only ever sees plain params and the COMPILER handles it (it rejected
patterns before, falling back to the interpreter). loop follows Clojure too: gensym
one loop var per binding, loop* over those, destructure via an inner let, with an
outer let so later inits see earlier destructured names — recur arity stays correct.

Two representation gotchas: build the param/binding vectors via [~@..] so they're
tuple forms (conj yields a pvec the analyzer rejects), and use (symbol (str
(gensym))) since a bare (gensym) in an overlay macro body is a Janet symbol the
destructurer rejects.

Closes the fn/loop destructuring gaps. conformance 228x3, fixpoint, clojure-test-
suite 3930, full suite green, bench flat.
2026-06-07 18:55:56 -04:00
..
bench core migration: phase 0 audit + perf baseline (jolt-1j0) 2026-06-06 22:54:07 -04:00
clojure-stdlib/clojure stdlib: port clojure.data, rewrite clojure.zip; fix with-meta nil; add battery 2026-06-06 19:02:26 -04:00
integration test: regression coverage for the core migration + the two bug fixes 2026-06-06 23:51:13 -04:00
spec core: fn param + loop destructuring, compiled (matching Clojure) 2026-06-07 18:55:56 -04:00
support feat: core.async Phase 3 — channel transducers + dropping/sliding buffers 2026-06-05 15:40:24 -04:00
unit vars: add per-var generation counter, bumped on root change 2026-06-06 16:47:44 -04:00