Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor iterator APIs to be on parity with the latest spec #3962

Merged
merged 3 commits into from
Aug 24, 2024

Conversation

jedel1043
Copy link
Member

Alternative name: The Great Refactoring Of Iterators

This pulls the latest changes from the spec around iterators, which both makes the code easier in some parts and also future-proofs for any new spec additions that use iterator APIs.

@jedel1043 jedel1043 added API Internal Category for changelog labels Aug 20, 2024
@jedel1043 jedel1043 added this to the next-release milestone Aug 20, 2024
@jedel1043 jedel1043 requested a review from a team August 20, 2024 01:26
@jedel1043 jedel1043 force-pushed the the-great-refactoring-of-iterators branch from 09eb276 to b8395ad Compare August 20, 2024 01:26
Copy link

github-actions bot commented Aug 20, 2024

Test262 conformance changes

Test result main count PR count difference
Total 48,476 48,494 +18
Passed 43,446 43,609 +163
Ignored 1,507 1,500 -7
Failed 3,523 3,385 -138
Panics 0 0 0
Conformance 89.62% 89.93% +0.30%
Fixed tests (145):
test/built-ins/Temporal/PlainTime/from/overflow-undefined.js (previously Failed)
test/built-ins/Temporal/PlainTime/from/argument-object-leap-second.js (previously Failed)
test/built-ins/Temporal/PlainTime/from/options-object.js (previously Failed)
test/built-ins/Temporal/PlainTime/from/overflow-reject.js (previously Failed)
test/built-ins/Temporal/PlainTime/from/overflow-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainTime/from/overflow-constrain.js (previously Failed)
test/built-ins/Temporal/PlainTime/from/options-undefined.js (previously Failed)
test/built-ins/Temporal/PlainTime/prototype/add/argument-string.js (previously Failed)
test/built-ins/Temporal/PlainTime/prototype/with/overflow-undefined.js (previously Failed)
test/built-ins/Temporal/PlainTime/prototype/with/subclassing-ignored.js (previously Failed)
test/built-ins/Temporal/PlainTime/prototype/with/branding.js (previously Failed)
test/built-ins/Temporal/PlainTime/prototype/with/options-object.js (previously Failed)
test/built-ins/Temporal/PlainTime/prototype/with/copy-properties-not-undefined.js (previously Failed)
test/built-ins/Temporal/PlainTime/prototype/with/overflow-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainTime/prototype/with/name.js (previously Failed)
test/built-ins/Temporal/PlainTime/prototype/with/overflow-invalid-string.js (previously Failed)
test/built-ins/Temporal/PlainTime/prototype/with/not-a-constructor.js (previously Failed)
test/built-ins/Temporal/PlainTime/prototype/with/options-undefined.js (previously Failed)
test/built-ins/Temporal/PlainTime/prototype/with/prop-desc.js (previously Failed)
test/built-ins/Temporal/PlainTime/prototype/with/builtin.js (previously Failed)
test/built-ins/Temporal/PlainTime/prototype/with/length.js (previously Failed)
test/built-ins/Temporal/PlainTime/prototype/with/basic.js (previously Failed)
test/built-ins/Temporal/PlainTime/prototype/subtract/argument-string.js (previously Failed)
test/built-ins/Temporal/PlainDate/from/argument-object-invalid.js (previously Failed)
test/built-ins/Temporal/PlainDate/from/argument-propertybag-calendar-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDate/from/with-year-monthCode-day.js (previously Failed)
test/built-ins/Temporal/PlainDate/from/overflow-undefined.js (previously Failed)
test/built-ins/Temporal/PlainDate/from/argument-propertybag-calendar-number.js (previously Failed)
test/built-ins/Temporal/PlainDate/from/argument-leap-second.js (previously Failed)
test/built-ins/Temporal/PlainDate/from/argument-propertybag-calendar-string.js (previously Failed)
test/built-ins/Temporal/PlainDate/from/options-object.js (previously Failed)
test/built-ins/Temporal/PlainDate/from/argument-propertybag-calendar-year-zero.js (previously Failed)
test/built-ins/Temporal/PlainDate/from/argument-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDate/from/argument-propertybag-calendar.js (previously Failed)
test/built-ins/Temporal/PlainDate/from/with-year-month-day.js (previously Failed)
test/built-ins/Temporal/PlainDate/from/one-of-era-erayear-undefined.js (previously Failed)
test/built-ins/Temporal/PlainDate/from/with-year-monthCode-day-need-constrain.js (previously Failed)
test/built-ins/Temporal/PlainDate/from/options-undefined.js (previously Failed)
test/built-ins/Temporal/PlainDate/from/argument-object-valid.js (previously Failed)
test/built-ins/Temporal/PlainDate/from/with-year-month-day-need-constrain.js (previously Failed)
test/built-ins/Temporal/PlainDate/from/limits.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/since/argument-propertybag-calendar-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/since/argument-propertybag-calendar-number.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/since/argument-leap-second.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/since/argument-propertybag-calendar-string.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/since/argument-propertybag-calendar-year-zero.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/since/argument-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/since/basic.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/until/argument-propertybag-calendar-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/until/argument-propertybag-calendar-number.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/until/argument-leap-second.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/until/argument-propertybag-calendar-string.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/until/argument-propertybag-calendar-year-zero.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/until/argument-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/until/basic.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/add/argument-string.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/toPlainDateTime/argument-object.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/with/overflow-undefined.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/with/subclassing-ignored.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/with/branding.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/with/options-object.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/with/options-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/with/copy-properties-not-undefined.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/with/overflow-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/with/overflow-invalid-string.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/with/options-undefined.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/with/basic.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/equals/argument-object-invalid.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/equals/argument-propertybag-calendar-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/equals/argument-propertybag-calendar-number.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/equals/argument-leap-second.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/equals/argument-propertybag-calendar-string.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/equals/argument-propertybag-calendar-year-zero.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/equals/argument-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDate/prototype/subtract/argument-string.js (previously Failed)
test/built-ins/Temporal/PlainDate/compare/argument-object.js (previously Failed)
test/built-ins/Temporal/PlainDate/compare/argument-propertybag-calendar-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDate/compare/argument-propertybag-calendar-number.js (previously Failed)
test/built-ins/Temporal/PlainDate/compare/argument-propertybag-calendar-string.js (previously Failed)
test/built-ins/Temporal/PlainDate/compare/argument-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDate/compare/leap-second.js (previously Failed)
test/built-ins/Temporal/Duration/prototype/round/relativeto-propertybag-calendar-wrong-type.js (previously Failed)
test/built-ins/Temporal/Duration/prototype/round/relativeto-propertybag-no-time-units.js (previously Failed)
test/built-ins/Temporal/Duration/prototype/round/relativeto-leap-second.js (previously Failed)
test/built-ins/Temporal/Duration/prototype/round/relativeto-wrong-type.js (previously Failed)
test/built-ins/Temporal/Duration/prototype/round/relativeto-propertybag-calendar-number.js (previously Failed)
test/built-ins/Temporal/Duration/prototype/round/relativeto-propertybag-timezone-string.js (previously Failed)
test/built-ins/Temporal/Duration/prototype/total/relativeto-propertybag-calendar-wrong-type.js (previously Failed)
test/built-ins/Temporal/Duration/prototype/total/relativeto-wrong-type.js (previously Failed)
test/built-ins/Temporal/Duration/prototype/total/relativeto-propertybag-calendar-number.js (previously Failed)
test/built-ins/Temporal/Duration/prototype/total/relativeto-propertybag-timezone-string-year-zero.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/from/argument-object.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/from/argument-propertybag-calendar-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/from/overflow-undefined.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/from/argument-propertybag-calendar-number.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/from/argument-propertybag-calendar-string.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/from/options-object.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/from/overflow-reject.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/from/overflow-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/from/argument-object-month.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/from/options-undefined.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/from/overflow-default-constrain.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/since/argument-propertybag-calendar-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/since/argument-propertybag-calendar-number.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/since/argument-propertybag-calendar-string.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/until/argument-object.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/until/argument-propertybag-calendar-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/until/argument-propertybag-calendar-number.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/until/argument-propertybag-calendar-string.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/add/argument-string.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/with/argument-object-insufficient-data.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/with/overflow-undefined.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/with/month-and-monthcode-must-agree.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/with/subclassing-ignored.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/with/branding.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/with/copy-properties-not-undefined.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/with/overflow-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/with/name.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/with/overflow-invalid-string.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/with/multiple-unrecognized-properties-ignored.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/with/not-a-constructor.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/with/options-undefined.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/with/prop-desc.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/with/builtin.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/with/length.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/with/basic.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/with/options-empty.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/equals/argument-propertybag-calendar-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/equals/argument-object-insufficient-data.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/equals/argument-propertybag-calendar-number.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/equals/argument-propertybag-calendar-string.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/prototype/subtract/argument-string.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/compare/argument-propertybag-calendar-wrong-type.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/compare/argument-object-insufficient-data.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/compare/argument-propertybag-calendar-number.js (previously Failed)
test/built-ins/Temporal/PlainDateTime/compare/argument-propertybag-calendar-string.js (previously Failed)
test/built-ins/Atomics/pause/returns-undefined.js (previously Ignored)
test/built-ins/Atomics/pause/descriptor.js (previously Ignored)
test/built-ins/Atomics/pause/negative-iterationnumber-throws.js (previously Ignored)
test/built-ins/Atomics/pause/non-integral-iterationnumber-throws.js (previously Ignored)
test/built-ins/Atomics/pause/name.js (previously Ignored)
test/built-ins/Atomics/pause/not-a-constructor.js (previously Ignored)
test/built-ins/Atomics/pause/length.js (previously Ignored)
test/harness/asyncHelpers-throwsAsync-func-throws-sync.js (previously Failed)
test/harness/asyncHelpers-throwsAsync-no-arg.js (previously Failed)

Copy link
Member

@raskad raskad left a comment

Choose a reason for hiding this comment

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

Nice work!

core/engine/src/builtins/promise/mod.rs Outdated Show resolved Hide resolved
core/engine/src/builtins/promise/mod.rs Outdated Show resolved Hide resolved
@raskad raskad requested a review from a team August 24, 2024 15:10
Copy link
Member

@nekevss nekevss left a comment

Choose a reason for hiding this comment

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

+1 for alternative name 😄

Looks great!

@jedel1043 jedel1043 enabled auto-merge August 24, 2024 15:51
@jedel1043 jedel1043 added this pull request to the merge queue Aug 24, 2024
Merged via the queue into main with commit 25705ef Aug 24, 2024
13 checks passed
@raskad raskad deleted the the-great-refactoring-of-iterators branch August 24, 2024 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Internal Category for changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants