Repository navigation
avoid quadratic rejection in F32.read - #1625
Merged
Lorenzobattistela merged 2 commits intoOct 16, 2026
Merged
Conversation
toprameen
marked this pull request as ready for review
October 16, 2026 20:25
Lorenzobattistela
approved these changes
Oct 16, 2026
nicolas-abril
added a commit
to nicolas-abril/bend
that referenced
this pull request
Oct 19, 2026
comp.ts keeps this branch's structure, with upstream's changes ported in: bendlang#1615's frame-slot write-back in bind_pop; bendlang#1617's named memo functions (open_of, spine_of, uses_of), per-file literal steps keyed by string, and lay_at memoized per type key (FL.ty_opens, keyed by ty_key); bendlang#1625's F32.read regex; bendlang#1628's string_contains. bendlang#1617's per-def PROBES reset is left out: here probes and the term caches live as long as the file and units emit again across sweeps, so a reset would reuse probe indices still held in FL.opens and FL.uses. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Merged
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.
F32.read’s JS matcher allows two digit repetitions to consume the same integer when the optional decimal point is absent. A long digit string followed by an invalid character causes quadratic rejection. Require the decimal point before the second repetition, preserving the accepted grammar and existing rounding behavior.
Add a focused regression that constructs 100,000 digits followed by
xat runtime. It exceeds the test runner’s existing five-second limit before the fix and returnsNoneafterward.Local checks: the regression and existing whitespace, rounding and formatting fixtures pass through source/compiled CLIs, emitted Bun/Node and native C on macOS arm64. TypeScript diagnostics match baseline.
The repository gate remains blocked by the existing compiler token overage: main is 64,092/64,000; this fix adds two tokens, reaching 64,094.