jolt/docs
Yogthos a3e2365217 Recover TCO-elided frames in uncaught-error stack traces
On the eval path nothing registers a source map, so jolt-backtrace-string
dropped every walkable frame and printed no trace at all. Keep any named,
non-plumbing continuation frame (rendered as a bare name when unmapped) so a
runtime error shows the surviving non-tail spine — "print what is available".

Add an opt-in tail-frame history behind JOLT_TRACE for the frames TCO erases.
Each compiled fn records itself on entry into a bounded ring-of-rings, MIT
Scheme's "history" shape: the outer ring holds one rib per non-tail subproblem,
each rib a small inner ring of the tail-calls made at that level. A tight tail
loop churns one rib instead of flushing the spine, so the non-tail caller
context survives and total space stays bounded. The reporter prefers this
history over the continuation when it's present, and resets it per top-level
form so an error's trace isn't padded with earlier REPL frames.

The emitter marks a tail call with (jolt-trace-mark! #t) so the runtime routes
the callee into the current rib vs a fresh one; a *tail?* dynamic var tracks
tail position (cleared by default, passed through if/do/let/loop/fn-body). It's
all gated on trace-frames?, which compile-eval turns on for JOLT_TRACE and
emit-image/`jolt build` force off — so non-trace emitted output is byte-identical
(prelude unchanged, seed re-minted), and a built binary carries no per-call cost.
2026-07-04 15:00:52 -04:00
..
rfc Run core.memoize's test suite on jolt 2026-06-25 13:23:05 -04:00
spec Strict reader tokens; edn mode with the reference's error contracts 2026-07-02 12:00:13 -04:00
building-and-deps.md cli: rename nrepl command to --nrepl-server flag 2026-06-28 17:26:03 -04:00
grammar.ebnf Clean up codebase: rename stdlib layer, strip porting residue, fix tooling 2026-06-22 22:18:00 -04:00
host-interop.md Hierarchy fns follow the reference contracts; deftype classes join the class graph 2026-07-02 08:48:30 -04:00
libraries.md docs: delist next.jdbc (JVM/JDBC-driver dependent) 2026-07-01 17:49:35 -04:00
MODULES.md AOT build: set per-ns ns context and register aliases 2026-06-24 01:27:49 -04:00
seed-overlay-registry.md Clean up codebase: rename stdlib layer, strip porting residue, fix tooling 2026-06-22 22:18:00 -04:00
tools-deps.md Recover TCO-elided frames in uncaught-error stack traces 2026-07-04 15:00:52 -04:00