Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 0047d9699435bf2e1f1ec17d10d8e5214dc1b581
https://github.com/WebKit/WebKit/commit/0047d9699435bf2e1f1ec17d10d8e5214dc1b581
Author: Yusuke Suzuki <[email protected]>
Date: 2026-06-02 (Tue, 02 Jun 2026)
Changed paths:
M Source/JavaScriptCore/CMakeLists.txt
M Source/JavaScriptCore/DerivedSources-input.xcfilelist
M Source/JavaScriptCore/DerivedSources.make
M Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
M Source/JavaScriptCore/builtins/BuiltinNames.h
A Source/JavaScriptCore/builtins/MapIteratorPrototype.js
A Source/JavaScriptCore/builtins/SetIteratorPrototype.js
A Source/JavaScriptCore/builtins/StringIteratorPrototype.js
M Source/JavaScriptCore/bytecode/BytecodeIntrinsicRegistry.cpp
M Source/JavaScriptCore/bytecode/BytecodeIntrinsicRegistry.h
M Source/JavaScriptCore/bytecode/LinkTimeConstant.h
M Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h
M Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp
M Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
M Source/JavaScriptCore/runtime/Intrinsic.h
M Source/JavaScriptCore/runtime/JSGlobalObject.cpp
M Source/JavaScriptCore/runtime/JSMapIterator.cpp
M Source/JavaScriptCore/runtime/JSMapIterator.h
M Source/JavaScriptCore/runtime/JSSetIterator.cpp
M Source/JavaScriptCore/runtime/JSSetIterator.h
M Source/JavaScriptCore/runtime/MapIteratorPrototype.cpp
M Source/JavaScriptCore/runtime/SetIteratorPrototype.cpp
M Source/JavaScriptCore/runtime/StringIteratorPrototype.cpp
Log Message:
-----------
[JSC] Restore JS builtins for next() functions
https://bugs.webkit.org/show_bug.cgi?id=316134
rdar://178560929
Reviewed by Sosuke Suzuki and Yijia Huang.
Let's restore JS builtins for next() functions because babel-wtb is
directly calling `next()` function instead of using `for-of` statement.
As a result, inlining them from the callsite is critical for performance.
For now, we restore JS builtins urgently to recover the regression, but
we can make it better by also adding intrinsics to next functions and
spread inlined code in DFG as well (while it becomes a bit more bloating
code because it needs to handle values, keys, entries all cases).
* Source/JavaScriptCore/CMakeLists.txt:
* Source/JavaScriptCore/DerivedSources-input.xcfilelist:
* Source/JavaScriptCore/DerivedSources.make:
* Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj:
* Source/JavaScriptCore/builtins/BuiltinNames.h:
* Source/JavaScriptCore/builtins/MapIteratorPrototype.js: Added.
(next):
* Source/JavaScriptCore/builtins/SetIteratorPrototype.js: Added.
(next):
* Source/JavaScriptCore/builtins/StringIteratorPrototype.js: Added.
(next):
* Source/JavaScriptCore/bytecode/BytecodeIntrinsicRegistry.cpp:
(JSC::BytecodeIntrinsicRegistry::BytecodeIntrinsicRegistry):
* Source/JavaScriptCore/bytecode/BytecodeIntrinsicRegistry.h:
* Source/JavaScriptCore/bytecode/LinkTimeConstant.h:
* Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h:
(JSC::BytecodeGenerator::emitIsStringIterator):
(JSC::BytecodeGenerator::emitIsMapIterator):
(JSC::BytecodeGenerator::emitIsSetIterator):
* Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp:
(JSC::stringIteratorInternalFieldIndex):
(JSC::mapIteratorInternalFieldIndex):
(JSC::setIteratorInternalFieldIndex):
(JSC::BytecodeIntrinsicNode::emit_intrinsic_getStringIteratorInternalField):
(JSC::BytecodeIntrinsicNode::emit_intrinsic_getMapIteratorInternalField):
(JSC::BytecodeIntrinsicNode::emit_intrinsic_getSetIteratorInternalField):
(JSC::BytecodeIntrinsicNode::emit_intrinsic_putStringIteratorInternalField):
(JSC::BytecodeIntrinsicNode::emit_intrinsic_putMapIteratorInternalField):
(JSC::BytecodeIntrinsicNode::emit_intrinsic_putSetIteratorInternalField):
* Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleIntrinsicCall):
* Source/JavaScriptCore/runtime/Intrinsic.h:
* Source/JavaScriptCore/runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
* Source/JavaScriptCore/runtime/JSMapIterator.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):
* Source/JavaScriptCore/runtime/JSMapIterator.h:
* Source/JavaScriptCore/runtime/JSSetIterator.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):
* Source/JavaScriptCore/runtime/JSSetIterator.h:
* Source/JavaScriptCore/runtime/MapIteratorPrototype.cpp:
(JSC::MapIteratorPrototype::finishCreation):
(JSC::JSC_DEFINE_HOST_FUNCTION): Deleted.
* Source/JavaScriptCore/runtime/SetIteratorPrototype.cpp:
(JSC::SetIteratorPrototype::finishCreation):
(JSC::JSC_DEFINE_HOST_FUNCTION): Deleted.
* Source/JavaScriptCore/runtime/StringIteratorPrototype.cpp:
(JSC::StringIteratorPrototype::finishCreation):
(JSC::JSC_DEFINE_HOST_FUNCTION): Deleted.
Canonical link: https://commits.webkit.org/314417@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications