Repository navigation
Export the runtime helper table (sysHelpers) from the runtime entry - #657
Closed
enumeratio wants to merge 1 commit into
Closed
enumeratio wants to merge 1 commit into
enumeratio wants to merge 1 commit into
Conversation
…s from the runtime entry; test that a runtime inherits them and that compiled code agrees with the table; document and add a CHANGELOG entry. Part of cortex-js#527
Member
|
Landed in f42a02d, with fixes made while landing (see the commit message). Thanks! |
arnog
added a commit
that referenced
this pull request
Nov 23, 2026
…(m, n, d), the optional combinatorics library, PiecewiseExpand - #657: @cortex-js/compute-engine/runtime exports sysHelpers, the stateless helpers that compiled code calls as _SYS.<name> (#527 item 1). - #658: Mod(m, n, d) is d + Mod(m - d, n), in [d, d + n) (#548). Every compile target declines the three-operand form; the derivative, limit, enclosure and measurement code leave it unevaluated. Fixed on landing: .N() reads exact operands exactly as the two-operand Mod does (exact cancellation of d, a symbol with an exact value near a jump, a dividend past the range of a double, no second evaluation of an impure operand); exact radicals stay exact; the type is real only for real operands. - #659: the optional combinatorics entry, loadCombinatorics(ce, { areas }), with about 350 permutation and 195 integer-partition statistics checked against FindStat (#531). Fixed on landing: the report of a re-load, a skipped head declared once the engine's definition is removed, the CI comment, string nodes without source offsets in compiled.ts, the synonym head LargestCycleLength removed (LongestCycleLength stays), one compiler decline test per area, and notes on list literals and time limits. - #660: PiecewiseExpand rewrites Abs, Sign, Min, Max and Heaviside into a Which (#516). Fixed on landing: an argument declared complex or number is not split; the arm limit is checked before the product is built; Max() and Min() with no operand; exact conditions between radicals; an impure expression is returned unchanged; the lazy-operator list and the search ranking test. - Issues CE-1734, CE-1735, CE-1736 filed from the decline census of #638. Co-authored-by: enumeratio <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The code of a JavaScript compilation result calls helpers as
_SYS.<name>. Until now the table behind them was internal, so a host that lowers its own operators the same way had to read an engine internal.@cortex-js/compute-engine/runtimenow exports it assysHelpers:It is the stateless table (
SYS_HELPERS); the engine-bound helpers (the random family,integrate,tick) stay members of a runtime, which inherits the table.runtime.tsalready importsjavascript-runtime.ts, so the entry stays self-contained (the existing bundle test still holds). The names and signatures follow the code of a compilation and may change in any release, so a host should compareruntimeVersion;docs/COMPILATION-MODEL.mdsays so.Tests (
js-runtime.test.ts): a runtime inheritssysHelpers;Binomial(8, x)compiles to_SYS.binomial(...)andDigamma(x)to_SYS.ir.digamma(...), andrun()andload()give the same value as the exported table.Item 1 only; items 2 and 3 of #527 are not part of this PR.
Part of #527