Bug 176590 - [DFG][FTL] GetByVal(ObjectUse with Array::Generic, StringUse/SymbolUse) should be supported
Summary: [DFG][FTL] GetByVal(ObjectUse with Array::Generic, StringUse/SymbolUse) shoul...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-09-08 05:58 PDT by Yusuke Suzuki
Modified: 2017-09-27 12:37 PDT (History)
6 users (show)

See Also:


Attachments
Patch (15.79 KB, patch)
2017-09-08 07:30 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (16.07 KB, patch)
2017-09-08 07:41 PDT, Yusuke Suzuki
saam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>