Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: d2c0435c584344707ac602307f2136de2b1ed3a4
https://github.com/WebKit/WebKit/commit/d2c0435c584344707ac602307f2136de2b1ed3a4
Author: Yusuke Suzuki <[email protected]>
Date: 2026-09-01 (Tue, 01 Sep 2026)
Changed paths:
A JSTests/stress/to-lower-case-16-bit-ascii-fast-path.js
A JSTests/stress/to-upper-case-16-bit-ascii-fast-path.js
M Source/JavaScriptCore/dfg/DFGOperations.cpp
M Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
M Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp
M Source/WTF/wtf/text/StringImpl.cpp
M Source/WTF/wtf/text/StringImpl.h
M Source/WTF/wtf/text/WTFString.cpp
M Source/WTF/wtf/text/WTFString.h
Log Message:
-----------
[JSC] Scan toLowerCase / toUpperCase strings in DFG / FTL inline
https://bugs.webkit.org/show_bug.cgi?id=323033
rdar://186301688
Reviewed by Yijia Huang.
Previously 8bit strings are scanned in DFG / FTL in toLowerCase /
toUpperCase to skip calling C function when we do not need to convert
the input. This patch extends it to 16-bit strings as it is frequently
happening that 16-bit strings sliced from substring is actually not
including 16-bit characters.
Tests: JSTests/stress/to-lower-case-16-bit-ascii-fast-path.js
JSTests/stress/to-upper-case-16-bit-ascii-fast-path.js
* JSTests/stress/to-lower-case-16-bit-ascii-fast-path.js: Added.
(shouldBe):
(toLowerCase):
(lowercasesToItself):
(wide):
(toLowerCaseRope):
* JSTests/stress/to-upper-case-16-bit-ascii-fast-path.js: Added.
(shouldBe):
(toUpperCase):
(uppercasesToItself):
(wide):
(toUpperCaseRope):
* Source/JavaScriptCore/dfg/DFGOperations.cpp:
(JSC::DFG::JSC_DEFINE_JIT_OPERATION):
* Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileToUpperCase):
(JSC::DFG::SpeculativeJIT::compileToLowerCase):
* Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):
* Source/WTF/wtf/text/StringImpl.cpp:
(WTF::StringImpl::convertToLowercaseWithoutLocale):
(WTF::StringImpl::convertToLowercaseWithoutLocaleStartingAtFailingIndex16Bit):
(WTF::StringImpl::convertToUppercaseWithoutLocaleUpconvert):
(WTF::StringImpl::convertToUppercaseWithoutLocaleStartingAtFailingIndex16Bit):
(WTF::StringImpl::convertToUppercaseWithoutLocale16Bit):
* Source/WTF/wtf/text/StringImpl.h:
* Source/WTF/wtf/text/WTFString.cpp:
(WTF::String::convertToLowercaseWithoutLocaleStartingAtFailingIndex16Bit const):
(WTF::String::convertToUppercaseWithoutLocaleStartingAtFailingIndex16Bit const):
* Source/WTF/wtf/text/WTFString.h:
Canonical link: https://commits.webkit.org/320293@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications