Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 2178d70f0416138b76c0419e8241a17d90beae0b
https://github.com/WebKit/WebKit/commit/2178d70f0416138b76c0419e8241a17d90beae0b
Author: Yusuke Suzuki <[email protected]>
Date: 2024-08-09 (Fri, 09 Aug 2024)
Changed paths:
M Source/WTF/wtf/text/StringImpl.cpp
M Source/WTF/wtf/text/StringImpl.h
Log Message:
-----------
[JSC] toUpperCase should check whether input string is already UpperCase
https://bugs.webkit.org/show_bug.cgi?id=277845
rdar://problem/133513177
Reviewed by Alexey Shvayka.
Previously we thought toUpperCase against already-upper-cased-string is rare.
So we had optimization for toLowerCase,
but didn't do that for toUpperCase. But in fact it is not rare, and there are
many cases which does this. (e.g. tagName for example).
We should have a path not creating a new StringImpl for already UpperCase-ed
string. This also allows JSC not to create a new JSString
around it since it can detect that new StringImpl is not created.
* Source/WTF/wtf/text/StringImpl.cpp:
(WTF::StringImpl::convertToUppercaseWithoutLocale):
(WTF::StringImpl::convertToUppercaseWithoutLocaleStartingAtFailingIndex8Bit):
(WTF::StringImpl::convertToUppercaseWithoutLocaleUpconvert):
* Source/WTF/wtf/text/StringImpl.h:
Canonical link: https://commits.webkit.org/282046@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