Closed
Bug 461110
Opened 16 years ago
Closed 16 years ago
Extra parens in decompilation of "a += b = 3"
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: jruderman, Assigned: jorendorff)
References
Details
(Keywords: regression, testcase)
Attachments
(1 file)
1.88 KB,
patch
|
brendan
:
review+
|
Details | Diff | Splinter Review |
js> (function() { a += b = 3 }) function () { a += (b = 3); }
Reporter | ||
Comment 1•16 years ago
|
||
This can happen with operators other than = on the right, such as instanceof.
Comment 2•16 years ago
|
||
Why is this bad? It makes it clearer.
Comment 3•16 years ago
|
||
It's different, so expected output in testsuites and tools will need to be updated. It's not mandatory per the C-based operator precedence. And clearer mileage varies -- we wouldn't have changed this just to make it clearer by some lights. I'm most interested in why it pops out of the precedence-based decompiler. If it is a natural consequence that would take particularly ugly, or just too much, extra code to fix, then it can stay. Jason, is the + in += messing things up? /be
Assignee | ||
Comment 4•16 years ago
|
||
Assignee: general → jorendorff
Attachment #344323 -
Flags: review?(brendan)
Comment 5•16 years ago
|
||
Comment on attachment 344323 [details] [diff] [review] v1 I should have seen this -- this patch improves things even if it adds lines of code, since it reduces the complexity in the POP_STR_PREC calls. /be
Attachment #344323 -
Flags: review?(brendan) → review+
Assignee | ||
Comment 6•16 years ago
|
||
http://hg.mozilla.org/tracemonkey/rev/5203db613b10
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Comment 7•16 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/37b3fdbb0f07 /cvsroot/mozilla/js/tests/js1_5/decompilation/regress-461110.js,v <-- regress-461110.js initial revision: 1.1
Flags: in-testsuite+
Flags: in-litmus-
You need to log in
before you can comment on or make changes to this bug.
Description
•