Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 85a14b7462fd88a437cda799412e510097a66f65
https://github.com/WebKit/WebKit/commit/85a14b7462fd88a437cda799412e510097a66f65
Author: Sosuke Suzuki <[email protected]>
Date: 2026-04-29 (Wed, 29 Apr 2026)
Changed paths:
A JSTests/microbenchmarks/for-of-array-map-mixed.js
A JSTests/microbenchmarks/for-of-array-set-mixed.js
M Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
Log Message:
-----------
[JSC] DFG iterator_next should dispatch fast modes by iterator type
https://bugs.webkit.org/show_bug.cgi?id=313578
Reviewed by Yusuke Suzuki.
After 312127@main, seenModes can have multiple fast modes. handleIteratorNext
branched only on IsEmpty(m_next), but m_next is empty for every fast mode, so
Map / Set iterators always fell into the FastArray block and OSR-exited on its
CheckStructure. Add IsCellWithType on the iterator to the branch condition,
matching handleIteratorOpen.
ToT Patched
for-of-array-map-mixed 15.6239+-0.4009 ^ 5.5403+-0.0831
^ definitely 2.8200x faster
for-of-array-set-mixed 11.5055+-0.5032 ^ 4.4497+-0.1425
^ definitely 2.5857x faster
Tests: JSTests/microbenchmarks/for-of-array-map-mixed.js
JSTests/microbenchmarks/for-of-array-set-mixed.js
* JSTests/microbenchmarks/for-of-array-map-mixed.js: Added.
(test):
* JSTests/microbenchmarks/for-of-array-set-mixed.js: Added.
(test):
(const.set new):
* Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleIteratorNext):
Canonical link: https://commits.webkit.org/312309@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications