Repository navigation
comp.ts: drop a dead pread binding, an unused ALC row and a redundant park case - #2063
Merged
Merged
Conversation
… park case The JS io_sys bound pread for the old file_read.js, which moved to readvSync in bendlang#1881. ALC's extra row was for the old ALC[1 + arg] indexing; the main thread uses ALC[0] and workers ALC[1..pool_size-1] since bendlang#1269. io_park_add's w->next == w case writes what the next line writes anyway. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nicolas-abril
force-pushed
the
comp-cap
branch
from
November 5, 2026 19:57
29adf0c to
f460aca
Compare
Nothing in the runtime reads through io_sys().read; its only caller was the fifo_eof test, which now binds read in the dlopen it already makes. file_read_no_ffi.bend's comment says io_sys bound read and pread, past. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reverts the read half of 07025d6: user effects call io_sys().read, so it stays even with no caller in the repo. The test comment now says io_sys binds read and once bound pread. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nuxyel
added a commit
to nuxyel/bend-ml
that referenced
this pull request
Nov 6, 2026
Bend 2.0.40 dropped the pread binding from io_sys() (bendlang/bend#2063), so the JS lane threw "sys.pread is not a function". Base's own File.read_at reads through fs since #1881; the six reads now do the same, retrying EINTR. Same lines and errno on 2.0.39 and 2.0.40.
This was referenced Nov 6, 2026
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.
Three runtime simplifications in
bend2/comp.ts(65,994 → 65,977 ttok). Each removes something nothing uses or a case the general path already covers.io_sysno longer bindspread. Its only user was the oldeffs/file_read.js, which moved tofs.readvSyncin fix(io): File.read and its twins read through fs on Node, where bun:ffi is missing #1881. No effect, test, demo or the CLI calls it.readstays:guide/EFFECTS.mddocuments it as part ofio_sys()for user effects.file_read_no_ffi.bend's comment now says io_sys bindsreadand once boundpread.ALC[CUBE_T + 1]becomesALC[CUBE_T]. The extra row was for the oldALC[1 + arg]indexing. Since The host's column grows to a LINE of tasks a thread again, a drain splits its rows into units of 32 a thread, and rings rewind between turns (stacked on #1092) #1269 the main thread usesALC[0]and the pool workers useALC[1 .. pool_size - 1], andpool_size <= CUBE_T. The unused 768-byte row goes.io_park_addsetsw->prev = w->next->prev. Thew->next == w ? w : …case is redundant: whenwis the only parked node, the next line,w->next->prev = w, writes the same field.Verified (on main b5e6b2e)
.bendundertests/,demos/andbench/runtime/(1,923 files, C and JS). The only differences in the emitted text are these three lines.!programs under Metal. No runtime function or macro goes unused, apart from CUDA-, Linux- and ObjC-only code, which I checked by hand.comp.tstype-checks with the same errors as main.🤖 Generated with Claude Code