Skip to content

Run more dense array loops on the guarded fast path - #4886

Open
ctate wants to merge 2 commits into
canaryfrom
ctate/dense-bounded-index-loops
Open

ctate wants to merge 2 commits into
canaryfrom
ctate/dense-bounded-index-loops

Conversation

@ctate

@ctate ctate commented Dec 5, 2026

Copy link
Copy Markdown
Collaborator
  • Extends the guarded fast copy of dense array loops to indexes with a proven int32 range, cursors bounded by the loop counter, and counters with unproven starts, so the fast copy runs without per-access bounds and hole checks.
  • The ordinary copy still handles holes, undefined stores, fractional or out-of-range bounds, and dynamic calls; behavior is unchanged.

@vercel

vercel Bot commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
scriptc Building Building Preview, v0 Dec 5, 2026 10:30pm UTC

@vercel-internal-security-reviewer

Copy link
Copy Markdown

Security review details

B.line(`${small} = icmp sle i64 ${limit}, ${INT32_MAX}`);
let valid = small;
for (const ref of loop.arrays.values()) {
let startInteger: string | null = null;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Newly accepted guarded counted loops convert an unbounded runtime limit to i64 before testing it, so limits such as Infinity or 1e100 produce LLVM poison instead of selecting the ordinary copy.

Fix on Vercel

This branch was successfully deployed

1 active deployment
Preview — fa4d74ee Deployed Dec 5, 2026 by vercel[bot]
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