Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 37df6bac1d0104df2055d26ac89220449c320b98
      
https://github.com/WebKit/WebKit/commit/37df6bac1d0104df2055d26ac89220449c320b98
  Author: Yusuke Suzuki <ysuz...@apple.com>
  Date:   2025-09-02 (Tue, 02 Sep 2025)

  Changed paths:
    M Source/JavaScriptCore/runtime/StringPrototype.cpp
    M Source/WTF/wtf/text/StringView.cpp
    M Source/WTF/wtf/text/StringView.h

  Log Message:
  -----------
  [JSC] Use more StringView in String prototype functions
https://bugs.webkit.org/show_bug.cgi?id=298280
rdar://159710956

Reviewed by Yijia Huang.

Let's avoid resolving strings in many of String prototype functions.
Unless there is an explicit reason, we should just use StringView to
avoid resolving substring ropes.

* Source/JavaScriptCore/runtime/StringPrototype.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):
(JSC::trimString):
(JSC::stringIncludesImpl):
* Source/WTF/wtf/text/StringView.cpp:
(WTF::StringView::hasInfixStartingAt const):
(WTF::StringView::hasInfixEndingAt const):
* Source/WTF/wtf/text/StringView.h:

Canonical link: https://commits.webkit.org/299478@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to