Skip to content

lib: add Iterator global to primordials, improve iteration object coverage in frozen intrinsics#63698

Open
Renegade334 wants to merge 2 commits into
nodejs:mainfrom
Renegade334:primordials-iterator-global
Open

lib: add Iterator global to primordials, improve iteration object coverage in frozen intrinsics#63698
Renegade334 wants to merge 2 commits into
nodejs:mainfrom
Renegade334:primordials-iterator-global

Conversation

@Renegade334
Copy link
Copy Markdown
Member

lib: add Iterator global to primordials

iterator_helpers is unflagged in V8 from v24.x.

lib: improve control abstraction coverage in frozen intrinsics

Adds the new internal iteration prototypes (%IteratorHelperPrototype%, %WrapForValidIteratorPrototype%) to frozen intrinsics, and improves/deduplicates coverage of iterator/generator objects.

Note that %AsyncFromSyncIteratorPrototype% is missing from the iterator spec – this is unresolvable AFAICT.

@Renegade334 Renegade334 requested a review from ljharb June 1, 2026 16:31
@Renegade334 Renegade334 added lib / src Issues and PRs related to general changes in the lib or src directory. commit-queue-rebase Add this label to allow the Commit Queue to land a PR in several commits. dont-land-on-v22.x PRs that should not land on the v22.x-staging branch and should not be released in v22.x. labels Jun 1, 2026
@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. typings labels Jun 1, 2026
@Renegade334 Renegade334 force-pushed the primordials-iterator-global branch from 187e6c7 to 51aa657 Compare June 1, 2026 16:33
Signed-off-by: Renegade334 <contact.9a5d6388@renegade334.me.uk>
Signed-off-by: Renegade334 <contact.9a5d6388@renegade334.me.uk>
@Renegade334 Renegade334 force-pushed the primordials-iterator-global branch from 51aa657 to 00e4207 Compare June 1, 2026 17:02
@bakkot
Copy link
Copy Markdown
Contributor

bakkot commented Jun 1, 2026

Note that %AsyncFromSyncIteratorPrototype% is missing from the iterator spec – this is unresolvable AFAICT.

Indeed:

Async-from-Sync Iterator objects are never directly accessible to ECMAScript code.

It's a spec fiction used for defining behavior of other algorithms (for-await over a sync iterator, specifically), not a real thing (although engines might choose to have an internal representation of it for ease of implementation).

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 1, 2026

Codecov Report

βœ… All modified and coverable lines are covered by tests.
βœ… Project coverage is 90.35%. Comparing base (39b481b) to head (00e4207).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #63698      +/-   ##
==========================================
- Coverage   91.96%   90.35%   -1.61%     
==========================================
  Files         379      732     +353     
  Lines      166638   236691   +70053     
  Branches    25497    44583   +19086     
==========================================
+ Hits       153242   213867   +60625     
- Misses      13099    14563    +1464     
- Partials      297     8261    +7964     
Files with missing lines Coverage Ξ”
lib/internal/freeze_intrinsics.js 97.05% <100.00%> (+0.08%) ⬆️
lib/internal/per_context/primordials.js 99.20% <100.00%> (+17.14%) ⬆️

... and 476 files with indirect coverage changes

πŸš€ New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • πŸ“¦ JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commit-queue-rebase Add this label to allow the Commit Queue to land a PR in several commits. dont-land-on-v22.x PRs that should not land on the v22.x-staging branch and should not be released in v22.x. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. typings

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants