Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7a5475349dfc7d55a28b84ec9774963ed5210427
      
https://github.com/WebKit/WebKit/commit/7a5475349dfc7d55a28b84ec9774963ed5210427
  Author: Yusuke Suzuki <ysuz...@apple.com>
  Date:   2025-03-07 (Fri, 07 Mar 2025)

  Changed paths:
    M Source/JavaScriptCore/runtime/ArrayPrototype.cpp
    M Source/JavaScriptCore/runtime/JSArray.cpp

  Log Message:
  -----------
  [JSC] Use CoW immutable butterfly when we do not need to modify for concat / 
clone
https://bugs.webkit.org/show_bug.cgi?id=289393
rdar://146527451

Reviewed by Yijia Huang.

When we found,

    1. CoW.concat()
    2. CoW.concat([]) or [].concat(CoW)

Then we do not need to clone entire butterfly. We can take immutable
butterfly from the input and wrap it with a new array.

* Source/JavaScriptCore/runtime/ArrayPrototype.cpp:
(JSC::concatAppendArray):
* Source/JavaScriptCore/runtime/JSArray.cpp:
(JSC::tryCloneArrayFromFast):

Canonical link: https://commits.webkit.org/291829@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