[webkit-changes] [WebKit/WebKit] 0be0c1: [JSC] Make non CoW array DFG node when it is almos...

Yusuke Suzuki noreply at github.com
Mon Aug 12 09:44:09 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 0be0c1aae00476d4a368ff306fd9fa0d56509d50
      https://github.com/WebKit/WebKit/commit/0be0c1aae00476d4a368ff306fd9fa0d56509d50
  Author: Yusuke Suzuki <ysuzuki at apple.com>
  Date:   2024-08-12 (Mon, 12 Aug 2024)

  Changed paths:
    M Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp

  Log Message:
  -----------
  [JSC] Make non CoW array DFG node when it is almost always modified and it is empty array
https://bugs.webkit.org/show_bug.cgi?id=277658
rdar://133253298

Reviewed by Yijia Huang.

If CoW empty array's profile tells us that it seems that resulted array will be modified anyway,
we should stop generating CoW array from this site. This is common pattern since the pattern like
this is very common.

    ```
    var array = [];
    for (var i = 0; i < target.length; ++i) {
        ...
        array.push(...);
    }
    ```

* Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list