Bug 202656

Summary: [JSC] GetterSetter should be JSCell, not JSObject
Product: WebKit Reporter: Yusuke Suzuki <ysuzuki>
Component: JavaScriptCoreAssignee: Yusuke Suzuki <ysuzuki>
Status: RESOLVED FIXED    
Severity: Normal CC: ews-watchlist, keith_miller, mark.lam, msaboff, saam, tzagallo, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
WIP
none
Patch saam: review+

Yusuke Suzuki
Reported 2019-10-07 15:38:27 PDT
We already have a good strength-reduction rule to keep JSCell GetterSetter fast. We do not need to make it JSObject.
Attachments
WIP (18.15 KB, patch)
2019-10-07 15:42 PDT, Yusuke Suzuki
no flags
Patch (21.04 KB, patch)
2019-10-08 13:54 PDT, Yusuke Suzuki
saam: review+
Yusuke Suzuki
Comment 1 2019-10-07 15:39:02 PDT
Yusuke Suzuki
Comment 2 2019-10-07 15:42:16 PDT
Yusuke Suzuki
Comment 3 2019-10-08 13:54:20 PDT
Saam Barati
Comment 4 2019-10-08 14:12:53 PDT
Comment on attachment 380461 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=380461&action=review > Source/JavaScriptCore/ChangeLog:13 > + 2. RHS of that comparison is always folded into constant in DFG. do we do the right thing even when RHS isn't folded? > Source/JavaScriptCore/ChangeLog:17 > + So we already support non-JSString/JSBigInt cell comparison in JSC JS code. We should use it instead of making GetterSetter JSObject. this support was added after we made GetterSetter a JSObject?
Saam Barati
Comment 5 2019-10-08 14:13:10 PDT
(In reply to Saam Barati from comment #4) > Comment on attachment 380461 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=380461&action=review > > > Source/JavaScriptCore/ChangeLog:13 > > + 2. RHS of that comparison is always folded into constant in DFG. > > do we do the right thing even when RHS isn't folded? > > > Source/JavaScriptCore/ChangeLog:17 > > + So we already support non-JSString/JSBigInt cell comparison in JSC JS code. We should use it instead of making GetterSetter JSObject. > > this support was added after we made GetterSetter a JSObject? Sorry, I did not mean to clear Tadeu's r+
Saam Barati
Comment 6 2019-10-08 14:25:46 PDT
Comment on attachment 380461 [details] Patch r=me, r=Tadeu
Yusuke Suzuki
Comment 7 2019-10-08 17:18:09 PDT
Comment on attachment 380461 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=380461&action=review >>> Source/JavaScriptCore/ChangeLog:13 >>> + 2. RHS of that comparison is always folded into constant in DFG. >> >> do we do the right thing even when RHS isn't folded? > > Sorry, I did not mean to clear Tadeu's r+ Yes, existing code is doing the right thing. >> Source/JavaScriptCore/ChangeLog:17 >> + So we already support non-JSString/JSBigInt cell comparison in JSC JS code. We should use it instead of making GetterSetter JSObject. > > this support was added after we made GetterSetter a JSObject? Yes, it is added for Map#forEach.
Yusuke Suzuki
Comment 8 2019-10-08 17:25:30 PDT
Yusuke Suzuki
Comment 9 2019-10-09 14:24:01 PDT
Yusuke Suzuki
Comment 10 2019-10-14 12:54:34 PDT
Note You need to log in before you can comment on or make changes to this bug.