Skip to content

Add checked text spans and native i64 parsing - #3

Merged
bytetroll merged 3 commits into
codex/integer-literal-widthsfrom
codex/core-v1
Oct 21, 2026
Merged

bytetroll merged 3 commits into
codex/integer-literal-widthsfrom
codex/core-v1

Conversation

@bytetroll

Copy link
Copy Markdown
Contributor

substring("abcd", 1, 9223372036854775807) previously overflowed its bounds calculation and returned empty text. Clamp against the remaining byte count after validating the start, and add Matrix-authored try_substring/try_char_at APIs that distinguish valid empty spans from invalid requests with Option<text>.

The existing Convert.try_to_i64 API now works on native routes. VM and native integer conversion share a strict, allocation-free parser; LLVM constructs the full-width Result<i64,text> payload and retains managed error text. Existing checked-i32 behavior and diagnostics remain covered.

Document the contracts and record separately reproduced numeric, alias-resolution, iteration, generic-parameter, and intrinsic-owner issues in the findings ledger. This PR builds on #2 and targets its branch so the review contains only this library pass.

Validation:

  • Clean-commit development SDK: all 437 repository tests passed, with no skips.
  • Paired Ny/Matrix fixtures pass interpreter, bundles, JIT/AOT and standalone assembler/linker execution; retained conversion results survive 5 MiB of allocation churn.
  • Sixteen malformed-provider/embedded-NUL rejection checks preserve existing artifacts. Documentation examples also pass all six routes.
  • Installed SDK: all 816 executions passed across 51 fixtures, source/binary standard libraries and eight execution paths. Manifest source identity matches clean commit 4bc00f5.

Fix finite floating-point average overflow
@bytetroll
bytetroll marked this pull request as ready for review October 21, 2026 18:12
@bytetroll
bytetroll merged commit d95e99a into codex/integer-literal-widths Oct 21, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant