Bug 220219 - [JSC] Remove unnecessary mov bytecodes when performing simple object pattern destructuring to variables
Summary: [JSC] Remove unnecessary mov bytecodes when performing simple object pattern ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL:
Keywords: InRadar
Depends on:
Blocks: 220204
  Show dependency treegraph
 
Reported: 2021-01-01 04:08 PST by Yusuke Suzuki
Modified: 2021-01-02 12:47 PST (History)
8 users (show)

See Also:


Attachments
Patch (12.14 KB, patch)
2021-01-01 04:13 PST, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (12.38 KB, patch)
2021-01-01 04:22 PST, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (12.79 KB, patch)
2021-01-01 13:21 PST, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (13.14 KB, patch)
2021-01-01 13:54 PST, Yusuke Suzuki
ashvayka: 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 2021-01-01 04:08:03 PST
[JSC] Remove unnecessary mov bytecodes when performing simple object pattern destructuring to variables
Comment 1 Yusuke Suzuki 2021-01-01 04:13:27 PST
Created attachment 416879 [details]
Patch
Comment 2 Yusuke Suzuki 2021-01-01 04:22:16 PST
Created attachment 416880 [details]
Patch
Comment 3 Yusuke Suzuki 2021-01-01 13:21:04 PST
Created attachment 416884 [details]
Patch
Comment 4 Yusuke Suzuki 2021-01-01 13:54:14 PST
Created attachment 416885 [details]
Patch
Comment 5 Alexey Shvayka 2021-01-01 13:56:17 PST
Comment on attachment 416885 [details]
Patch

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

r=me, great change!

> JSTests/stress/object-pattern-simple-fast-path.js:102
> +}());

Would it be reasonable to add more tests for guards in writableDirectBindingIfPossible()? Like `var`, global object property that is non-writable or accessor, WithStatement?
Comment 6 Yusuke Suzuki 2021-01-02 12:40:25 PST
Comment on attachment 416885 [details]
Patch

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

>> JSTests/stress/object-pattern-simple-fast-path.js:102
>> +}());
> 
> Would it be reasonable to add more tests for guards in writableDirectBindingIfPossible()? Like `var`, global object property that is non-writable or accessor, WithStatement?

Nice! Added.
Comment 7 Yusuke Suzuki 2021-01-02 12:46:50 PST
Committed r271121: <https://trac.webkit.org/changeset/271121>
Comment 8 Radar WebKit Bug Importer 2021-01-02 12:47:15 PST
<rdar://problem/72771576>