Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b7161cda17aa5b36affb52e2b750bd115cd63d7f
https://github.com/WebKit/WebKit/commit/b7161cda17aa5b36affb52e2b750bd115cd63d7f
Author: Yusuke Suzuki <[email protected]>
Date: 2026-10-06 (Tue, 06 Oct 2026)
Changed paths:
M Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
M Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp
M Source/JavaScriptCore/runtime/ArrayConstructor.cpp
M Source/JavaScriptCore/runtime/IndexingType.cpp
M Source/JavaScriptCore/runtime/IndexingType.h
M Source/JavaScriptCore/runtime/IndexingTypeInlines.h
M Source/JavaScriptCore/runtime/JSArray.cpp
M Source/JavaScriptCore/runtime/ScopedArguments.cpp
Log Message:
-----------
[JSC] Evaluate constant array literal elements once in ArrayNode::emitBytecode
https://bugs.webkit.org/show_bug.cgi?id=326506
rdar://189295197
Reviewed by Vassili Bykov.
ArrayNode::emitBytecode is iterating list of elements twice. If the
array literal is huge, it becomes significantly costly as it is
linked-list. Let's have constants buffer and collect all necessary
information in the first iteration and do not iterate twice.
* Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj:
* Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp:
(JSC::ArrayNode::emitBytecode):
* Source/JavaScriptCore/runtime/ArrayConstructor.cpp:
* Source/JavaScriptCore/runtime/IndexingType.cpp:
(JSC::leastUpperBoundOfIndexingTypes): Deleted.
(JSC::leastUpperBoundOfIndexingTypeAndValue): Deleted.
* Source/JavaScriptCore/runtime/IndexingType.h:
(JSC::leastUpperBoundOfIndexingTypes):
* Source/JavaScriptCore/runtime/IndexingTypeInlines.h:
(JSC::leastUpperBoundOfIndexingTypeAndValue):
* Source/JavaScriptCore/runtime/JSArray.cpp:
* Source/JavaScriptCore/runtime/ScopedArguments.cpp:
Canonical link: https://commits.webkit.org/322943@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications