Bug 193513 - [JSC] ToThis omission in DFGByteCodeParser is wrong
Summary: [JSC] ToThis omission in DFGByteCodeParser is wrong
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: 2019-01-16 15:38 PST by Yusuke Suzuki
Modified: 2019-01-17 00:11 PST (History)
7 users (show)

See Also:


Attachments
Patch (7.34 KB, patch)
2019-01-16 19:58 PST, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Performance Numbers (7.48 KB, text/plain)
2019-01-16 21:07 PST, Yusuke Suzuki
no flags Details
Patch (7.45 KB, patch)
2019-01-16 21:11 PST, Yusuke Suzuki
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuke Suzuki 2019-01-16 15:38:25 PST
It assumes that `ToThis(ToThis(value)) === ToThis(value)`. But it is wrong since the semantics of ToThis in strict mode and ToThis in sloppy mode is different.
If `ToThisFromSloppyMode(ToThisFromStrictMode(value))` is converted to `ToThisFromStrictMode(value)`, we have a bad time!
Comment 1 Yusuke Suzuki 2019-01-16 16:13:09 PST
This is not necessary. Original intent is already implemented in AI.
Comment 2 Yusuke Suzuki 2019-01-16 16:55:53 PST
Upload a patch after I ensured that the result is perf-neutral.
Comment 3 Yusuke Suzuki 2019-01-16 19:58:49 PST
Created attachment 359344 [details]
Patch

WIP
Comment 4 Yusuke Suzuki 2019-01-16 20:07:38 PST
<rdar://problem/45842236>
Comment 5 Yusuke Suzuki 2019-01-16 21:07:44 PST
Created attachment 359348 [details]
Performance Numbers

Performance looks neutral.
Comment 6 Yusuke Suzuki 2019-01-16 21:11:51 PST
Created attachment 359349 [details]
Patch
Comment 7 WebKit Commit Bot 2019-01-17 00:10:59 PST
Comment on attachment 359349 [details]
Patch

Clearing flags on attachment: 359349

Committed r240106: <https://trac.webkit.org/changeset/240106>
Comment 8 WebKit Commit Bot 2019-01-17 00:11:01 PST
All reviewed patches have been landed.  Closing bug.