Repository navigation
fix(compiler): reset probes between compilations - #976
Merged
nicolas-abril merged 2 commits intoSep 22, 2026
Merged
Conversation
phenomenon0
pushed a commit
to phenomenon0/bend
that referenced
this pull request
Sep 23, 2026
Canon brings the Lit node for string and nat literals and the soundness fixes around it (bendlang#905 template binders, bendlang#941/bendlang#954 literals, bendlang#902, bendlang#852), per-constructor native descriptors in the JS emitter, whole-word matches on U32 and F32, one BEND_RTC macro for the device compilers, prefixed C locals, the select IO loop for FIFOs on macOS (bendlang#928), fresh layout and probe memos per book (bendlang#976), and its effect, base and doc changes. bend2/bend.ts auto-merged; it is canon's plus the fork's F64 literal. WORDS keeps canon's null prototype and the fork's F64, U64 and I64 rows. The native table takes canon's shape, one descriptor per constructor; F64, U64 and I64 carry their builder and field reader in it, Char reads through char_code and SCon builds with str_prepend as the adaptive strings need. emit_match reads the datatype with canon's adt_of and matches a 32-bit word as canon does, whole words; U64 and I64 still open into their bit node and match their one constructor, which the whole-word walk cannot do past 32 bits. The C template includes sys/select.h and, on Linux, sys/epoll.h; the Metal fp64 note stays above canon's BEND_RTC branch. The IO loop keeps the fork's epoll loop, EPOLLONESHOT registrations and deadline heap on Linux, and canon's select loop is the other platforms' loop in place of poll. The JS io_text keeps the fork's one replacement per ill-formed byte. Two seams the Lit node opened: bend2/export.ts writes a literal as the constructor chain it stands for, and str_constant reads through comp.ts's term_strip, so a literal string is still a static image. gates/repo.ts takes the union of both allow lists and the larger of each cap. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01S4szbK155RvUkyET5spFdw
HaileyStorm
added a commit
to HaileyStorm/rift-chess
that referenced
this pull request
Sep 23, 2026
Move the compiler pin from a495242 to upstream main ff7a40c (both Bend 2.0.25; Bun 1.4.2 unchanged). Upstream changed a README link, EFFECTS.md prose, and one comp.ts line that resets the probe list per compiled book (bendlang/bend#976), which this project's multi-book loader relies on. Frozen manifests stay byte-identical. A new append-only amendment chain (bend2/laws/amendments, tools/amendments.mjs and amend.mjs) records reviewed hash substitutions for the pin, gate tools and English documents only; law, proof, implementation, fixture and reference bytes stay protected. freeze.mjs and freeze-v2.mjs resolve recorded hashes through the chain. Receipts under the new pin (v1 readiness with negative probes, v2 aggregate proof and conformance, six mutation controls, graphics library, browser build) and an AI-subagent review are in docs/evidence/amendments/001-bend-ff7a40c. Co-authored-by: Cursor <[email protected]>
Phylliida
pushed a commit
to Phylliida/bend
that referenced
this pull request
Sep 27, 2026
…endlang#976) carb_book truncates PROBES to DUMMY's slot beside the other cache clears: before, the binder variables of every previous compilation stayed retained, so a process that compiles many books (the bun loader, io_run) grew by a few hundred objects per batch of builds. Every probe stays valid through emission; the per-definition memo_gc would drop them too early. Bundles are byte-identical before and after. Co-Authored-By: Claude Fable 5.1 <[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.
Why
i'm evaluating Bend for small survey-scoring helpers in our TypeScript monorepo. While testing rebuilds with the Bun plugin, I noticed compiler objects accumulating even after GC.
PROBESkeeps the binder variables from every previous compilation.What changed
this resets
PROBESincarb_bookafter the existing cache clears, keepingDUMMYat index zero. Probes stay valid through emission. The per-definitionmemo_gcwould reset them too early. One file, one added line.Validation
Checked on macOS arm64 with Bun 1.3.11:
22.c03b845. The changes merge cleanly, and 250 Bun builds still return22. From build 50 to 250, feature/js-plains #974 alone retains 1,000 more objects; with this fix the count stays flat.git diff --checkpassed. Cluster and GPU tests were not run.Reproduction
Reproduction, run from the checkout root
The current test gate uses separate compiler processes, so it cannot catch this accumulation. This executable repro uses repeated Bun builds instead of adding a new test harness.
The columns are rebuilds and retained
Objectinstances after GC. Absolute counts can vary. On main the count keeps growing, while the patch levels off:Both print
result 22. The fix bounds probe retention to the latest compilation; it does not release all compiler state immediately after a build.