jolt/jolt-core/jolt
Dmitri Sotnikov bd9e542c78
Propagate declared record hints through the whole-program fixpoint (jolt-3ko) (#134)
A ^Record param hint was applied only at the final re-emit (reinfer-def), not
during the inter-procedural fixpoint. So a hinted param with no callers stayed
:any while inference ran, and a field read off it (e.g. (:origin ^Ray r)) never
told a non-inlined callee that its arg is a Vec3 — the callee's params stayed
unproven and its field reads kept the dynamic guard.

Seed declared hints as a param-type floor in the fixpoint: phint-seed (passes/
types) resolves an arity's :phints to positional record types via the
record-shapes registry, and infer-unit! initializes each fn's fresh param slots
from them instead of nil. A fixed declared type can't poison the least-fixpoint
the way an early-iteration :any would, and a hinted param now propagates its
(and its field reads') types to its callees during inference.

Scope: this closes the hinted-propagation gap. It does NOT help the ray tracer,
which uses zero ^-hinted params (only hinted fields) — its remaining type gap is
unhinted record-param inference on recursive/non-inlined hot fns, and per the
jolt-15jq A/B it's allocation-bound regardless (jolt-8flj). Tracked on the bead.

Co-authored-by: Yogthos <yogthos@gmail.com>
2026-06-16 03:38:03 +00:00
..
passes Propagate declared record hints through the whole-program fixpoint (jolt-3ko) (#134) 2026-06-16 03:38:03 +00:00
analyzer.clj Refactor phase 3b: keep :try IR nodes structs, not phms (jolt-26dm) 2026-06-15 05:09:02 -04:00
ir.clj Refactor phase 3a: one map-ir-children combinator for the IR rewrite walks (jolt-26dm) 2026-06-15 04:57:42 -04:00
passes.clj Propagate declared record hints through the whole-program fixpoint (jolt-3ko) (#134) 2026-06-16 03:38:03 +00:00