[Webkit-unassigned] [Bug 179478] New: [JSC] Optimize default constructor implementation for derived class with array iterator protocol check

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Nov 9 07:44:48 PST 2017


https://bugs.webkit.org/show_bug.cgi?id=179478

            Bug ID: 179478
           Summary: [JSC] Optimize default constructor implementation for
                    derived class with array iterator protocol check
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: utatane.tea at gmail.com

Current default constructor implementation for derived class is,

constructor(...args)
{
    super(...args);
}

But the above code allocates arrays until FTL while that is apparently unnecessary for many cases.
It makes super() call construct_varargs with opaque array... Which is not good since DFGByteCodeParser do not handle it well if the constructor is non JS.
So, extends Array case is not optimized well in this case.

We would like to explore the performance improvement by changing this to

constructor(...args)
{
    if (@isArrayIteratorProtocolFastAndNonObservable()) {
        @superForwardArguments();
        return;
    }
    super(@spread());
}

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20171109/ca4135e3/attachment.html>


More information about the webkit-unassigned mailing list