jolt/test
Yogthos 2872f17c59 compiler: compile multi-arity, named, and variadic fns + recur-in-fn
Rewrites fn* analysis/emit. Each arity compiles to a named Janet fn whose
name is its recur target, so recur is a self-call (Janet tail-calls it) —
this fixes recur used directly inside a fn, which previously miscompiled to
a runtime error that the hybrid fallback couldn't catch.

Multi-arity fns dispatch on arg count: fixed arities match exactly, the
variadic arity matches >= its fixed count. The rest param is an ordinary
param holding a seq, so (recur fixed... rest-seq) into a variadic arity
works as in Clojure. Single fixed-arity fns keep the direct, dispatch-free
shape so the hot path stays fast.

Destructuring params still route to the interpreter via uncompilable.
Tests cover named recursion, multi-arity (incl. variadic clause), recur in
fn, and recur into a variadic arity.
2026-06-06 01:56:01 -04:00
..
integration compiler: compile multi-arity, named, and variadic fns + recur-in-fn 2026-06-06 01:56:01 -04:00
spec destructuring compliance, deps.edn comments, clojure.java.io shim 2026-06-06 01:01:04 -04:00
support feat: core.async Phase 3 — channel transducers + dropping/sliding buffers 2026-06-05 15:40:24 -04:00
unit support type hints; make metadata coherent 2026-06-06 00:36:10 -04:00