Skip to content

[JSC] add support for Iterator.prototype.join#55781

Merged
webkit-commit-queue merged 1 commit into
WebKit:mainfrom
dcrousso:eng/304586
Apr 13, 2026
Merged

[JSC] add support for Iterator.prototype.join#55781
webkit-commit-queue merged 1 commit into
WebKit:mainfrom
dcrousso:eng/304586

Conversation

@dcrousso
Copy link
Copy Markdown
Member

@dcrousso dcrousso commented Dec 22, 2025

962ea27

[JSC] add support for Iterator.prototype.join
https://bugs.webkit.org/show_bug.cgi?id=304586

Reviewed by Yusuke Suzuki.

Just like to `Array.prototype.join`, being able to `join` an iterator (i.e. `Iterator.prototype.join`) will make it even easier to use arrays and iterators interchangeably.

Spec: <https://tc39.es/proposal-iterator-join/>
Proposal: <https://github.com/tc39/proposal-iterator-join>

* Source/JavaScriptCore/runtime/JSIteratorPrototype.cpp:
(JSC::JSIteratorPrototype::finishCreation):
(JSC::iteratorProtoFuncJoin): Added.

* Source/JavaScriptCore/runtime/OptionsList.h:
Add a feature flag for this.

* JSTests/stress/iterator-prototype-join.js: Added.

Canonical link: https://commits.webkit.org/311097@main

8d9ee04

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe 🛠 win
✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2 🧪 win-tests
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe
✅ 🧪 ios-wk2-wpt ✅ 🧪 api-mac-debug ✅ 🛠 gtk3-libwebrtc
✅ 🛠 🧪 jsc ✅ 🧪 api-ios ✅ 🧪 mac-wk1 ✅ 🛠 gtk
✅ 🛠 🧪 jsc-debug-arm64 ✅ 🛠 ios-safer-cpp ✅ 🧪 mac-wk2 ✅ 🧪 gtk-wk2
✅ 🛠 vision ✅ 🧪 mac-AS-debug-wk2 ✅ 🧪 api-gtk
✅ 🛠 🧪 merge ✅ 🛠 vision-sim ✅ 🧪 mac-wk2-stress ✅ 🛠 playstation
✅ 🧪 vision-wk2 ✅ 🧪 mac-intel-wk2 ✅ 🛠 jsc-armv7
✅ 🛠 tv ✅ 🛠 mac-safer-cpp ✅ 🧪 jsc-armv7-tests
✅ 🛠 tv-sim
✅ 🛠 watch
✅ 🛠 watch-sim

@dcrousso dcrousso self-assigned this Dec 22, 2025
@dcrousso dcrousso added the JavaScriptCore For bugs in JavaScriptCore, the JS engine used by WebKit, other than kxmlcore issues. label Dec 22, 2025
@dcrousso dcrousso marked this pull request as ready for review April 11, 2026 05:02
@dcrousso dcrousso requested a review from a team as a code owner April 11, 2026 05:02
Copy link
Copy Markdown
Member

@Constellation Constellation left a comment

Choose a reason for hiding this comment

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

Can you write this in C++ pike what we are doing in includes? We would like to write things in C++ unless it is having a callback.

@dcrousso dcrousso requested a review from Constellation April 12, 2026 19:34
@Constellation
Copy link
Copy Markdown
Member

Looks like EWS is red?

@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Apr 13, 2026
@dcrousso dcrousso added merge-queue Applied to send a pull request to merge-queue and removed merging-blocked Applied to prevent a change from being merged merge-queue Applied to send a pull request to merge-queue labels Apr 13, 2026
https://bugs.webkit.org/show_bug.cgi?id=304586

Reviewed by Yusuke Suzuki.

Just like to `Array.prototype.join`, being able to `join` an iterator (i.e. `Iterator.prototype.join`) will make it even easier to use arrays and iterators interchangeably.

Spec: <https://tc39.es/proposal-iterator-join/>
Proposal: <https://github.com/tc39/proposal-iterator-join>

* Source/JavaScriptCore/runtime/JSIteratorPrototype.cpp:
(JSC::JSIteratorPrototype::finishCreation):
(JSC::iteratorProtoFuncJoin): Added.

* Source/JavaScriptCore/runtime/OptionsList.h:
Add a feature flag for this.

* JSTests/stress/iterator-prototype-join.js: Added.

Canonical link: https://commits.webkit.org/311097@main
@webkit-commit-queue
Copy link
Copy Markdown
Collaborator

Committed 311097@main (962ea27): https://commits.webkit.org/311097@main

Reviewed commits have been landed. Closing PR #55781 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit 962ea27 into WebKit:main Apr 13, 2026
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Apr 13, 2026
@dcrousso dcrousso deleted the eng/304586 branch April 13, 2026 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

JavaScriptCore For bugs in JavaScriptCore, the JS engine used by WebKit, other than kxmlcore issues.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants