Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 044f755f749b37079c79c481405dfea87eb0ff17
https://github.com/WebKit/WebKit/commit/044f755f749b37079c79c481405dfea87eb0ff17
Author: Yusuke Suzuki <[email protected]>
Date: 2025-06-12 (Thu, 12 Jun 2025)
Changed paths:
M Source/JavaScriptCore/runtime/ArrayPrototype.cpp
M Source/JavaScriptCore/runtime/ArrayPrototypeInlines.h
M Source/JavaScriptCore/runtime/JSArray.cpp
M Source/JavaScriptCore/runtime/JSArray.h
M Source/JavaScriptCore/runtime/JSGlobalObject.cpp
M Source/JavaScriptCore/runtime/JSGlobalObject.h
M Source/JavaScriptCore/runtime/JSObject.cpp
M Source/JavaScriptCore/runtime/JSStringJoiner.cpp
M Source/JavaScriptCore/runtime/JSStringJoiner.h
Log Message:
-----------
[JSC] ToPrimitive(Array) should have fast path
https://bugs.webkit.org/show_bug.cgi?id=294402
rdar://problem/153224652
Reviewed by Yijia Huang.
This patch adds Array fast path for ToPrimitive. We set up watchpoints
for @@toPrimitive, toString, and join for Array.prototype and we go to
the fast path when Array is unmodified original array structure.
* Source/JavaScriptCore/runtime/ArrayPrototype.cpp:
(JSC::fastArrayJoin):
(JSC::canUseDefaultArrayJoinForToString):
(JSC::JSC_DEFINE_HOST_FUNCTION):
(JSC::canUseFastJoin): Deleted.
(JSC::holesMustForwardToPrototype): Deleted.
(JSC::fastJoin): Deleted.
* Source/JavaScriptCore/runtime/ArrayPrototypeInlines.h:
(JSC::shift):
(JSC::unshift):
(JSC::holesMustForwardToPrototype):
(JSC::canUseFastArrayJoin):
(JSC::fastArrayJoin):
* Source/JavaScriptCore/runtime/JSArray.cpp:
(JSC::JSArray::fastToString):
(JSC::JSArray::isToPrimitiveFastAndNonObservable):
* Source/JavaScriptCore/runtime/JSArray.h:
* Source/JavaScriptCore/runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::installSaneChainWatchpoints):
(JSC::JSGlobalObject::installNumberPrototypeWatchpoint):
(JSC::JSGlobalObject::installMapPrototypeWatchpoint):
(JSC::JSGlobalObject::installSetPrototypeWatchpoint):
(JSC::JSGlobalObject::installObjectAdaptiveStructureWatchpoint):
(JSC::JSGlobalObject::installObjectPropertyChangeAdaptiveWatchpoint):
(JSC::JSGlobalObject::installChainedWatchpoint):
(JSC::JSGlobalObject::tryInstallPropertyDescriptorFastPathWatchpoint):
* Source/JavaScriptCore/runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::arraySymbolToPrimitiveWatchpointSet):
(JSC::JSGlobalObject::arrayToStringWatchpointSet):
* Source/JavaScriptCore/runtime/JSObject.cpp:
(JSC::JSObject::toPrimitive const):
(JSC::JSObject::toString const):
* Source/JavaScriptCore/runtime/JSStringJoiner.cpp:
(JSC::JSStringJoiner::joinImpl):
(JSC::JSOnlyStringsAndInt32sJoiner::joinImpl):
* Source/JavaScriptCore/runtime/JSStringJoiner.h:
(JSC::JSStringJoiner::join):
(JSC::JSStringJoiner::append):
(JSC::JSOnlyStringsAndInt32sJoiner::tryJoin):
Canonical link: https://commits.webkit.org/296180@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes