[webkit-changes] [WebKit/WebKit] 1dfe58: Follow-up to 270645 at main to address review feedback

Chris Dumez noreply at github.com
Mon Nov 13 15:05:46 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1dfe581ad7a8e9de4ce1d4b431f6062d0e9aab61
      https://github.com/WebKit/WebKit/commit/1dfe581ad7a8e9de4ce1d4b431f6062d0e9aab61
  Author: Chris Dumez <cdumez at apple.com>
  Date:   2023-11-13 (Mon, 13 Nov 2023)

  Changed paths:
    M Source/JavaScriptCore/runtime/IntlObject.cpp
    M Source/JavaScriptCore/yarr/YarrPattern.cpp

  Log Message:
  -----------
  Follow-up to 270645 at main to address review feedback
https://bugs.webkit.org/show_bug.cgi?id=264759

Reviewed by Darin Adler.

Follow-up to 270645 at main to address review feedback from Darin. Use Vector
constructor / WTF::map() when possible instead of an append*() function.

There are a couple of cases in 270645 at main where I keep using append*() even
though they were calling reserveInitialCapacity() before because the vectors
in question have an inline buffer and doing a Vector move assignment may end
up having to copy the values in the inline buffers over.

* Source/JavaScriptCore/runtime/IntlObject.cpp:
(JSC::intlAvailableCalendars):
* Source/JavaScriptCore/yarr/YarrPattern.cpp:
(JSC::Yarr::YarrPatternConstructor::copyDisjunction):

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




More information about the webkit-changes mailing list