docs: cross-link the numeric specializer + op tables (jolt-nzuo)
numeric.clj dbl-spec/lng-spec and backend_scheme.clj dbl-ops/lng-ops must agree — a spec'd op with no table entry makes emit-numeric splice a nil op string. Document the contract on both sides. Comment-only; seed re-mints byte-identical, gate green. The other two ideas in this bead were rejected after inspecting the code: - collapsing inline.clj local-escapes? onto reduce-ir-children would reintroduce the under-reporting hazard its docstring deliberately guards against (default-true is load-bearing for scalar-replacement soundness). - folding numeric recur-kinds/recur-arg-lists into one walk loses the type-env threading recur-kinds needs through :let; the parallel split is justified.
This commit is contained in:
parent
9b4769f2e5
commit
e9d56422bd
2 changed files with 6 additions and 0 deletions
|
|
@ -80,6 +80,10 @@
|
|||
;; :num-kind :double|:long when every operand is that kind; these are the Chez
|
||||
;; flonum/fixnum ops it lowers to — no generic dispatch, fixnums unboxed. fl?/fx?
|
||||
;; comparisons carry the question mark; fl+/fx+ don't.
|
||||
;;
|
||||
;; CONTRACT: every op name jolt.passes.numeric/dbl-spec (resp. lng-spec) tags must
|
||||
;; have an entry here, or emit-numeric splices a nil op string into the output. Keep
|
||||
;; these tables and those specializers in sync.
|
||||
(def ^:private dbl-ops
|
||||
{"+" "fl+" "-" "fl-" "*" "fl*" "/" "fl/" "min" "flmin" "max" "flmax"
|
||||
"<" "fl<?" ">" "fl>?" "<=" "fl<=?" ">=" "fl>=?" "=" "fl=?" "==" "fl=?"})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue