Bug 210312

Summary: Don't emit the rhs twice in `AssignResolveNode`
Product: WebKit Reporter: Devin Rousso <hi>
Component: JavaScriptCoreAssignee: Devin Rousso <hi>
Status: RESOLVED FIXED    
Severity: Normal CC: ews-watchlist, hi, keith_miller, mark.lam, msaboff, ross.kirsling, saam, tzagallo, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

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.