Repository navigation
fix(javascript): retain iterator prototype effects through array spreads - #12563
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
[High impact] The reviewed changes appear safe to merge. SummaryThe PR retains possible iterator prototype effects through array spreads and shares one bounded layout across array consumers.
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Array spread] --> B[Shared bounded layout]
B --> C[Known inline slots]
B --> D[Unknown spread]
C --> E[Values and property references]
C --> F[Getter receivers and read presence]
D --> G[Retain possible prototype effects]
G --> H[Keep affected iteration uncertain]
Reviews (6) · Last reviewed commit: "fix(javascript): preserve spread slot pr..." · Reviewed by Greptile |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5d42ac1780
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
* fix(javascript): share dense inline array spread layout * fix(javascript): report exhausted dense spread layout allowance * fix(javascript): preserve getter receivers through array spread * fix(javascript): guard native array iteration from opaque global code * test(javascript): group spread receiver controls * test(javascript): preserve getter fixture tuple types
Problem
Follow-up to #12558 and #7716. A reflected prototype stored through an array spread could hide writes from the ambient effect pass and leave an incorrect exact dependency. Value evaluation, property references, getter receivers, and read presence also calculated spread positions separately.
Change
Retain possible native prototype effects before iteration is proved, including inherited iterator-close effects. Preserve ordinary ambient identity resolution for CommonJS aliases. Use one bounded layout for dense inline spreads, including receiver selection at copy time. Keep uncertainty for borrowed iterators whose behavior cannot be proved, and report budget exhaustion through the existing recovery contract.
The dense-spread refactor was reviewed separately in #12564 and squash-merged into this branch.
Validation
check:fastpassed ond86f8bbad7.