[webkit-changes] [WebKit/WebKit] 3bc3bb: JSRopeString::resolveRopeToAtomString() doesn't ne...

Chris Dumez noreply at github.com
Fri Mar 24 15:39:27 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 3bc3bb7a66f12f722a3a7d3461d5b914a215ca69
      https://github.com/WebKit/WebKit/commit/3bc3bb7a66f12f722a3a7d3461d5b914a215ca69
  Author: Chris Dumez <cdumez at apple.com>
  Date:   2023-03-24 (Fri, 24 Mar 2023)

  Changed paths:
    M Source/JavaScriptCore/runtime/JSString.cpp
    M Source/JavaScriptCore/runtime/JSString.h
    M Source/WTF/wtf/text/AtomString.h

  Log Message:
  -----------
  JSRopeString::resolveRopeToAtomString() doesn't need to copy characters to a buffer when it is a substring
https://bugs.webkit.org/show_bug.cgi?id=254441

Reviewed by Yusuke Suzuki.

JSRopeString::resolveRopeToAtomString() doesn't need to copy characters to a
buffer when it is a substring, we can construct the AtomString straight from
the StringView::substring() output.

* Source/JavaScriptCore/runtime/JSString.cpp:
(JSC::JSRopeString::resolveRopeToAtomString const):
(JSC::JSRopeString::resolveRopeToExistingAtomString const):
(JSC::JSRopeString::resolveRopeInternal const): Deleted.
* Source/JavaScriptCore/runtime/JSString.h:
* Source/WTF/wtf/text/AtomString.h:

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




More information about the webkit-changes mailing list