Bug 210312 - Don't emit the rhs twice in `AssignResolveNode`
Summary: Don't emit the rhs twice in `AssignResolveNode`
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Devin Rousso
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-04-09 16:43 PDT by Devin Rousso
Modified: 2020-04-13 12:41 PDT (History)
10 users (show)

See Also:


Attachments
Patch (1.65 KB, patch)
2020-04-09 16:45 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff
Patch (1.80 KB, patch)
2020-04-09 17:01 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Devin Rousso 2020-04-09 16:43:03 PDT
[Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp](http://trac.webkit.org/changeset/259781/webkit/trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp):
```
    RefPtr<RegisterID> result = generator.emitNode(dst, m_right);
    if (isReadOnly) {
        RegisterID* result = generator.emitNode(dst, m_right); // Execute side effects first.
```
Comment 1 Devin Rousso 2020-04-09 16:45:12 PDT
Created attachment 396026 [details]
Patch
Comment 2 Devin Rousso 2020-04-09 17:01:19 PDT
Created attachment 396027 [details]
Patch
Comment 3 Yusuke Suzuki 2020-04-09 17:07:42 PDT
Comment on attachment 396027 [details]
Patch

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

r=me

> Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp:2913
> +    RefPtr<RegisterID> result = generator.emitNode(dst, m_right); // Execute side effects first.

Nice.
Comment 4 EWS 2020-04-09 17:28:16 PDT
Committed r259841: <https://trac.webkit.org/changeset/259841>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 396027 [details].
Comment 5 Radar WebKit Bug Importer 2020-04-09 17:29:13 PDT
<rdar://problem/61552585>
Comment 6 Saam Barati 2020-04-13 01:13:30 PDT
Comment on attachment 396027 [details]
Patch

No test?
Comment 7 Ross Kirsling 2020-04-13 12:41:09 PDT
(In reply to Saam Barati from comment #6)
> Comment on attachment 396027 [details]
> Patch
> 
> No test?

This didn't cause incorrect behavior, it was just redundant.