jolt/host/chez
Yogthos 5a9acd3cf4 Numeric return-type hints: ^double/^long on a defn (round 3)
A ^double/^long return hint on a fn's name now (a) coerces the fn's value on the
way out — exact->inexact / jolt->fx, like a JVM primitive return — and (b) types a
call to it, so an accumulator over the result specializes:

  (defn ^double work [^double x ^double y] (+ (* x x) (* y y)))
  (loop [acc 0.0] (recur (+ acc (work a b))))   ; (+ acc (work ..)) -> fl+

The analyzer pushes the name's numeric tag onto each arity (:ret-nhint) for the
back-end coercion, and resolve-global surfaces the callee's declared return
(:num-ret, read from var meta) onto the :var node so jolt.passes.numeric types the
call. defn carries the name hint through.

This unblocks the accumulator-over-fn-result pattern that round 2 had to demote.
The win is bounded by call overhead in an open/dispatched build (~1.15x on a hot
loop whose body is a helper call); it compounds with direct-linking and, later,
inlining. A numeric return hint is a contract, like ^long — redefining the var to
return another type in an open build breaks it.

Not yet: per-arity arglist return hints, (defn f (^double [x] ..)). Gate:
test/chez/numeric-test.ss 39/39; full make test green, 0 new corpus divergences.
2026-06-23 17:21:53 -04:00
..
seed Numeric return-type hints: ^double/^long on a defn (round 3) 2026-06-23 17:21:53 -04:00
async.ss JVM-semantics fixes and small cleanups 2026-06-23 01:36:51 -04:00
atoms.ss Clean up codebase: rename stdlib layer, strip porting residue, fix tooling 2026-06-22 22:18:00 -04:00
bigdec.ss Replace str-render/instance-check set! chains with registries 2026-06-23 09:05:36 -04:00
bootstrap.ss Clean up codebase: rename stdlib layer, strip porting residue, fix tooling 2026-06-22 22:18:00 -04:00
build-smoke.sh Make direct-linking opt-in, not a release default 2026-06-23 16:02:18 -04:00
build.ss Make direct-linking opt-in, not a release default 2026-06-23 16:02:18 -04:00
cli.ss jolt build: compile an app to a standalone binary (Phase 4 stages 1-2) 2026-06-22 23:01:36 -04:00
collections.ss JVM-semantics fixes and small cleanups 2026-06-23 01:36:51 -04:00
compile-eval.ss Wire the optimization pass pipeline into compile + build 2026-06-23 01:14:14 -04:00
concurrency.ss Dead-code removal, perf fixes, deterministic seed emission 2026-06-23 01:05:45 -04:00
converters.ss Replace str-render/instance-check set! chains with registries 2026-06-23 09:05:36 -04:00
dot-forms.ss Clean up codebase: rename stdlib layer, strip porting residue, fix tooling 2026-06-22 22:18:00 -04:00
dyn-binding.ss Clean up codebase: rename stdlib layer, strip porting residue, fix tooling 2026-06-22 22:18:00 -04:00
dynamic-vars.ss Fix conformance gaps: exception types, byte/getBytes, host classes 2026-06-22 17:52:38 -04:00
emit-image.ss Hint-directed fast arithmetic: fl*/fx* from ^double/^long (round 1) 2026-06-23 16:43:55 -04:00
ffi.ss jolt build: bundle native libs + resources into standalone binaries 2026-06-23 13:19:33 -04:00
host-class.ss Clean up codebase: rename stdlib layer, strip porting residue, fix tooling 2026-06-22 22:18:00 -04:00
host-contract.ss Numeric return-type hints: ^double/^long on a defn (round 3) 2026-06-23 17:21:53 -04:00
host-static-objects.ss Replace str-render/instance-check set! chains with registries 2026-06-23 09:05:36 -04:00
host-static-statics.ss Split host-static.ss into base / statics / objects 2026-06-23 04:16:43 -04:00
host-static.ss Split host-static.ss into base / statics / objects 2026-06-23 04:16:43 -04:00
host-table.ss Replace str-render/instance-check set! chains with registries 2026-06-23 09:05:36 -04:00
inst-time.ss Replace str-render/instance-check set! chains with registries 2026-06-23 09:05:36 -04:00
io.ss jolt build: bundle native libs + resources into standalone binaries 2026-06-23 13:19:33 -04:00
lazy-bridge.ss Replace str-render/instance-check set! chains with registries 2026-06-23 09:05:36 -04:00
loader.ss Deduplicate small host helpers 2026-06-23 01:42:33 -04:00
math.ss Clean up codebase: rename stdlib layer, strip porting residue, fix tooling 2026-06-22 22:18:00 -04:00
multimethods.ss Clean up codebase: rename stdlib layer, strip porting residue, fix tooling 2026-06-22 22:18:00 -04:00
natives-array.ss Replace str-render/instance-check set! chains with registries 2026-06-23 09:05:36 -04:00
natives-coll.ss Clean up codebase: rename stdlib layer, strip porting residue, fix tooling 2026-06-22 22:18:00 -04:00
natives-meta.ss Clean up codebase: rename stdlib layer, strip porting residue, fix tooling 2026-06-22 22:18:00 -04:00
natives-misc.ss Replace str-render/instance-check set! chains with registries 2026-06-23 09:05:36 -04:00
natives-num.ss Clean up codebase: rename stdlib layer, strip porting residue, fix tooling 2026-06-22 22:18:00 -04:00
natives-parity.ss Clean up codebase: rename stdlib layer, strip porting residue, fix tooling 2026-06-22 22:18:00 -04:00
natives-queue.ss Replace str-render/instance-check set! chains with registries 2026-06-23 09:05:36 -04:00
natives-seq.ss Clean up codebase: rename stdlib layer, strip porting residue, fix tooling 2026-06-22 22:18:00 -04:00
natives-str.ss Deduplicate small host helpers 2026-06-23 01:42:33 -04:00
natives-xform.ss Clean up codebase: rename stdlib layer, strip porting residue, fix tooling 2026-06-22 22:18:00 -04:00
ns.ss Replace str-render/instance-check set! chains with registries 2026-06-23 09:05:36 -04:00
png.ss Clean up codebase: rename stdlib layer, strip porting residue, fix tooling 2026-06-22 22:18:00 -04:00
post-prelude.ss Clean up codebase: rename stdlib layer, strip porting residue, fix tooling 2026-06-22 22:18:00 -04:00
predicates.ss Clean up codebase: rename stdlib layer, strip porting residue, fix tooling 2026-06-22 22:18:00 -04:00
printing.ss Clean up codebase: rename stdlib layer, strip porting residue, fix tooling 2026-06-22 22:18:00 -04:00
reader.ss Clean up codebase: rename stdlib layer, strip porting residue, fix tooling 2026-06-22 22:18:00 -04:00
records-interop.ss Replace str-render/instance-check set! chains with registries 2026-06-23 09:05:36 -04:00
records.ss Replace str-render/instance-check set! chains with registries 2026-06-23 09:05:36 -04:00
regex.ss Clean up codebase: rename stdlib layer, strip porting residue, fix tooling 2026-06-22 22:18:00 -04:00
remint.sh Pure-Chez test gates (no Janet) 2026-06-21 11:22:32 -04:00
rt.ss Hint-directed fast arithmetic: fl*/fx* from ^double/^long (round 1) 2026-06-23 16:43:55 -04:00
run-corpus.ss Clean up codebase: rename stdlib layer, strip porting residue, fix tooling 2026-06-22 22:18:00 -04:00
run-infer.ss infer gate: cover the run-inference / take-diags! checker path 2026-06-23 09:38:13 -04:00
run-sci.ss Clean up codebase: rename stdlib layer, strip porting residue, fix tooling 2026-06-22 22:18:00 -04:00
run-unit.ss Real Thread/yield + Thread/interrupted (jolt-l2gc) 2026-06-23 00:06:04 -04:00
selfcheck.sh Pure-Chez test gates (no Janet) 2026-06-21 11:22:32 -04:00
seq.ss Dead-code removal, perf fixes, deterministic seed emission 2026-06-23 01:05:45 -04:00
smoke.sh Pure-Chez test gates (no Janet) 2026-06-21 11:22:32 -04:00
syntax-quote.ss Clean up codebase: rename stdlib layer, strip porting residue, fix tooling 2026-06-22 22:18:00 -04:00
transients.ss Clean up codebase: rename stdlib layer, strip porting residue, fix tooling 2026-06-22 22:18:00 -04:00
values.ss Clean up codebase: rename stdlib layer, strip porting residue, fix tooling 2026-06-22 22:18:00 -04:00
vars.ss Replace str-render/instance-check set! chains with registries 2026-06-23 09:05:36 -04:00