Bug 176590

Summary: [DFG][FTL] GetByVal(ObjectUse with Array::Generic, StringUse/SymbolUse) should be supported
Product: WebKit Reporter: Yusuke Suzuki <ysuzuki>
Component: JavaScriptCoreAssignee: Yusuke Suzuki <ysuzuki>
Status: RESOLVED FIXED    
Severity: Normal CC: buildbot, keith_miller, mark.lam, msaboff, saam, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch saam: review+

Description Yusuke Suzuki 2017-09-08 05:58:48 PDT
We can find the code like,

var dispatchTable = {
   "xxx": function () { ... },
   "yyy": ...,
   ...
};


dispatchTable[xxx]()

In the above case, we can easily find

1. dispatchTable is Cell
2. xxx is String

I find it in Octane/TypeScript.

Currently, we always go to operationGetByVal, which is too generic method.
Comment 1 Yusuke Suzuki 2017-09-08 07:30:35 PDT
Created attachment 320261 [details]
Patch
Comment 2 Yusuke Suzuki 2017-09-08 07:41:07 PDT
Created attachment 320263 [details]
Patch
Comment 3 Saam Barati 2017-09-08 07:53:00 PDT
Comment on attachment 320263 [details]
Patch

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

> Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp:3175
> +    JSValueRegs resultRegs = result.regs();

Is it worth using the FlushedCallResult (I forget actual class name) here?
Comment 4 Yusuke Suzuki 2017-09-08 08:07:16 PDT
Comment on attachment 320263 [details]
Patch

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

>> Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp:3175
>> +    JSValueRegs resultRegs = result.regs();
> 
> Is it worth using the FlushedCallResult (I forget actual class name) here?

Sounds good. Fixed.
Comment 5 Yusuke Suzuki 2017-09-08 08:36:25 PDT
Committed r221783: <http://trac.webkit.org/changeset/221783>
Comment 6 Radar WebKit Bug Importer 2017-09-27 12:37:17 PDT
<rdar://problem/34693620>