Bug 169596

Summary: [JSC][FTL] FTL should support Arrayify
Product: WebKit Reporter: Yusuke Suzuki <ysuzuki>
Component: JavaScriptCoreAssignee: Yusuke Suzuki <ysuzuki>
Status: RESOLVED FIXED    
Severity: Normal CC: buildbot, fpizlo, keith_miller, mark.lam, msaboff, saam
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch saam: review+

Description Yusuke Suzuki 2017-03-14 01:01:44 PDT
https://arewefastyet.com/#machine=29&view=single&suite=six-speed&subtest=map-set-es5
Performance regression is shown due to FTL rejection for Arrayify node.
I guess some recent change makes Arrayify in the above benchmark marked-reachable, and then FTL rejects it.
Comment 1 Yusuke Suzuki 2017-03-14 01:06:08 PDT
But anyway, supporting Arrayify in FTL is nice because ArrayifyToStructure is already done in FTL.

Maybe, I think recent checkArray fixup for `in` operation allows us to emit Arrayify in the above benchmark. Then, FTL rejects it.
Comment 2 Yusuke Suzuki 2017-04-20 06:29:38 PDT
Created attachment 307591 [details]
Patch
Comment 3 Yusuke Suzuki 2017-04-20 06:34:39 PDT
Created attachment 307592 [details]
Patch
Comment 4 Saam Barati 2017-04-20 12:58:40 PDT
Comment on attachment 307592 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=307592&action=review

r=me

> Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:2761
> +        auto isUnexpectedArray = [&](LValue cell) {

style: I think we put a space between "]" and "("
Comment 5 Yusuke Suzuki 2017-04-20 19:05:53 PDT
Comment on attachment 307592 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=307592&action=review

Thanks!

>> Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:2761
>> +        auto isUnexpectedArray = [&](LValue cell) {
> 
> style: I think we put a space between "]" and "("

Fixed.
Comment 6 Yusuke Suzuki 2017-04-20 19:08:34 PDT
Committed r215600: <http://trac.webkit.org/changeset/215600>