jolt/test
Yogthos f74af5dbc5 feat(compile): Phase 1 — wire shared persistent env (compile mode now works across forms)
Compile mode was broken: compiled defns interned only into the jolt namespace,
which Janet's eval couldn't see, so calling a compiled function threw 'unknown
symbol'. And load-string ignored :compile? entirely.

- Each context gets a persistent Janet env (ctx-janet-env), a child of the
  compiler module env (so core-* resolve) holding the context's user defs.
  compile-and-eval evals into it, so def/defn persist and resolve across forms;
  contexts stay isolated. nil ctx (one-off eval) gets a fresh child.
- Emit a named fn for defn ((def f (fn f [..] (f ..)))) so recursion resolves
  lexically (the anonymous form couldn't forward-reference f at compile time).
- Extract eval-one (per-form routing) and use it in both eval-string and
  load-string, so load-string honors :compile?. Stateful forms still interpret.

compiled fib(30): ~50s (interpreted) -> 3.4s (~15x). spec: compile-mode-test
gains cross-form/recursion/def + context-isolation cases. jpm test green.
Fast operator emission (the rest of the win) is Phase 2.
2026-06-05 17:50:22 -04:00
..
integration feat(compile): Phase 1 — wire shared persistent env (compile mode now works across forms) 2026-06-05 17:50:22 -04:00
spec feat: core.async Phase 3 — channel transducers + dropping/sliding buffers 2026-06-05 15:40:24 -04:00
support feat: core.async Phase 3 — channel transducers + dropping/sliding buffers 2026-06-05 15:40:24 -04:00
unit test: restructure into unit / integration / spec layers + shared harness 2026-06-05 00:00:16 -04:00