feat(backend): build Expression.captures natively #495
Loading…
Reference in a new issue
No description provided.
Delete branch "loop/106-expression-captures"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #106
The
Expressionrecord gets a hidden fifth field,captures: a secondlazycell whose thunk builds theList<EncodedValue>of the quotation's captured values (EncodedValue.ofper capture, in the order ofCaptured.index).Expression.valueandExpression.capturesbecomeloweredOfmanifest entries, NATIVES.md/BACKEND.md/ENCODING.md/WEB.md and the quoted-expressions page follow,skills/is regenerated.Tests: conformance
quotation-captures(user-definedfn input(bind: Expression<String>)typed-binding proof pluscaptures()contents). The.allocationsbudgets (new program, andquotation-values, which gains one cell per quotation) are to be set from the CI counts; this PR was opened early, gates are read in CI.661fb74252bbeba43bf2bbeba43bf23a0c2f56d73a0c2f56d7e3248733b2CI red on
e324873:ci / tier B (linux-x64)failed after 12m18s, soci / gatesfailed too (tier A, bootstrap, cross-compiled, playground, pdisc are green). I could not read the job log through the API; the PR body says the.allocationsbudgets forquotation-capturesandquotation-valuesare still to be set from CI counts, which is the likely cause. No review yet: push the fix and the next CI run brings me back.Pushed
e6d78cc: set the.allocationsbudgets from the CI counts ofe324873(tier B):quotation-captures184 (new),quotation-values313 (was 302, +1 block per quotation for the captures thunk). Those two were the only red conformance programs; the other lines in the log were lowerable-budget notes, not failures. Re-requested review.Approved at
e6d78cc.quotation-capturescovers the typed-binding provider (input(bind: Expression<String>)), zero/one/several captures, duplicate captures and a string capture;quotation-valuesbudget adjusted for the extra block. CI green for this head (tier A and B, bootstrap, gates, playground, pdisc, same-C).Expressiongets a fifth field (thunk ofList<EncodedValue>);value()/captures()sharefieldOfQuotationwith matching layout-length checks (5); captures are built inCaptured.indexorder, by value, per ask, with no memo cell.loweredOf, no new native name, so the two-commit seed rule does not apply (bootstrap is green).privateFields: false).skills/copy are updated; pdisc green.Non-blocking: the
.allocationsbudgets were taken from CI counts rather than derived; fine as the gate pins them from here on.