Skip to content

Conversation

sosukesuzuki
Copy link
Member

@sosukesuzuki sosukesuzuki commented Nov 12, 2024

c938e4d

[JSC] Make some iterator structures initialization lazily
https://bugs.webkit.org/show_bug.cgi?id=282984

Reviewed by Yusuke Suzuki.

This patch makes following iterator structures initialization lazily:

- AsyncFromSyncIterator
- WrapForValidIterator
- RegExpStringIterator

* Source/JavaScriptCore/runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildrenImpl):
* Source/JavaScriptCore/runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::setIteratorPrototype const):
(JSC::JSGlobalObject::wrapForValidIteratorStructure const):
(JSC::JSGlobalObject::wrapForValidIteratorPrototype const): Deleted.

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

d525396

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
loading 🧪 webkitpy ✅ 🧪 ios-wk2-wpt ✅ 🧪 mac-wk1 ✅ 🛠 wpe-cairo
✅ 🛠 🧪 jsc ✅ 🧪 api-ios ✅ 🧪 mac-wk2 ✅ 🛠 gtk
✅ 🛠 🧪 jsc-arm64 ✅ 🛠 vision ✅ 🧪 mac-AS-debug-wk2 ✅ 🧪 gtk-wk2
✅ 🛠 vision-sim ✅ 🧪 mac-wk2-stress ✅ 🧪 api-gtk
✅ 🛠 🧪 merge ✅ 🧪 vision-wk2 🧪 mac-intel-wk2 ✅ 🛠 jsc-armv7
✅ 🛠 tv ✅ 🧪 jsc-armv7-tests
✅ 🛠 tv-sim
✅ 🛠 watch
✅ 🛠 watch-sim

@sosukesuzuki sosukesuzuki requested a review from a team as a code owner November 12, 2024 15:18
@sosukesuzuki sosukesuzuki self-assigned this Nov 12, 2024
@sosukesuzuki sosukesuzuki added the JavaScriptCore For bugs in JavaScriptCore, the JS engine used by WebKit, other than kxmlcore issues. label Nov 12, 2024
@sosukesuzuki sosukesuzuki force-pushed the eng/lazy-load-for-iterator-structures branch from 18ba65d to 195dfad Compare November 12, 2024 15:21
Copy link
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.

r=me if these structures are not obtained from JIT compiler threads (concurrent access for these lazy field is not allowed).

@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Nov 12, 2024
@sosukesuzuki sosukesuzuki removed the merging-blocked Applied to prevent a change from being merged label Nov 12, 2024
@sosukesuzuki sosukesuzuki force-pushed the eng/lazy-load-for-iterator-structures branch from 195dfad to d525396 Compare November 12, 2024 23:10
@sosukesuzuki sosukesuzuki added the merge-queue Applied to send a pull request to merge-queue label Nov 13, 2024
https://bugs.webkit.org/show_bug.cgi?id=282984

Reviewed by Yusuke Suzuki.

This patch makes following iterator structures initialization lazily:

- AsyncFromSyncIterator
- WrapForValidIterator
- RegExpStringIterator

* Source/JavaScriptCore/runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildrenImpl):
* Source/JavaScriptCore/runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::setIteratorPrototype const):
(JSC::JSGlobalObject::wrapForValidIteratorStructure const):
(JSC::JSGlobalObject::wrapForValidIteratorPrototype const): Deleted.

Canonical link: https://commits.webkit.org/286519@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/lazy-load-for-iterator-structures branch from d525396 to c938e4d Compare November 13, 2024 04:58
@webkit-commit-queue
Copy link
Collaborator

Committed 286519@main (c938e4d): https://commits.webkit.org/286519@main

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

@webkit-commit-queue webkit-commit-queue merged commit c938e4d into WebKit:main Nov 13, 2024
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Nov 13, 2024
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