jolt/jolt-core/jolt
Yogthos 4461179804 Fix direct-link crash on a non-fn var called as a function
Under --direct-link a top-level def binds jv$<fqn> and app->app calls bound directly
to it. emit-invoke raw-applied that binding for any var callee, but only a fn-valued
def is a Scheme procedure: (def cfg {...}) then (cfg :a) emitted (jv$cfg :a), applying
a pmap -> "attempt to apply non-procedure". Maps/sets/keywords are invokable in Clojure
via jolt-invoke, which the indirect path used, so this only bit closed-world builds.

Track which direct-linked vars hold fn literals (direct-link-fns, registered at the def
site when the init op is :fn) and only raw-apply those. A non-fn callee falls through to
the jolt-invoke branch, which still uses the direct jv$ binding as the invoke target —
so the var-deref is still skipped, just not the dispatch.

Seed source: re-minted. Regression in directlink-test.ss (jolt-cw1o).
2026-06-23 23:34:28 -04:00
..
passes Type literal-init loop counters as fixnums (lever 2/4) 2026-06-23 17:57:39 -04:00
analyzer.clj Numeric return-type hints: ^double/^long on a defn (round 3) 2026-06-23 17:21:53 -04:00
backend_scheme.clj Fix direct-link crash on a non-fn var called as a function 2026-06-23 23:34:28 -04:00
deps.clj jolt build: bundle native libs + resources into standalone binaries 2026-06-23 13:19:33 -04:00
ir.clj Enable IR inlining: splice small defns at call sites (lever 1/4) 2026-06-23 17:43:13 -04:00
main.clj Tree-shaking: drop library code unreachable from -main (lever 3/4) 2026-06-23 19:45:13 -04:00
nrepl.clj nREPL: make the built-in server middleware-extensible 2026-06-22 15:37:14 -04:00
passes.clj Enable IR inlining: splice small defns at call sites (lever 1/4) 2026-06-23 17:43:13 -04:00