Closed
Bug 375882
Opened 18 years ago
Closed 18 years ago
Decompiler still outputs "NaN" (etc) incorrectly for |case|
Categories
(Core :: JavaScript Engine, defect, P2)
Core
JavaScript Engine
Tracking
()
VERIFIED
FIXED
mozilla1.9alpha4
People
(Reporter: jruderman, Assigned: brendan)
References
Details
(Keywords: testcase)
Attachments
(1 file, 2 obsolete files)
|
6.55 KB,
patch
|
brendan
:
review+
|
Details | Diff | Splinter Review |
Bug 351219 didn't fix switch |case| decompilation:
js> function() { switch(a) { case 0/0: a; case 1/0: b; case -1/0: c; case -0: d; } }
function () {
switch (a) {
case NaN:
a;
case Infinity:
b;
case -Infinity:
c;
case 0:
d;
default:;
}
}
| Assignee | ||
Comment 1•18 years ago
|
||
| Assignee | ||
Updated•18 years ago
|
OS: Mac OS X → All
Priority: -- → P2
Hardware: PC → All
Target Milestone: --- → mozilla1.9alpha4
| Assignee | ||
Comment 2•18 years ago
|
||
Forgot static, and added an assertion.
/be
Attachment #260198 -
Attachment is obsolete: true
Attachment #260199 -
Flags: review?(mrbkap)
Attachment #260198 -
Flags: review?(mrbkap)
Updated•18 years ago
|
Attachment #260199 -
Flags: review?(mrbkap) → review+
| Assignee | ||
Comment 3•18 years ago
|
||
Use ?: in JSOP_NUMBER's decompiler instead of if/else with common left-hand side (todo) of single assignment statement in then and else clauses. Bonus: no Sprint* function calls have to wrap unnaturally given the wrapped ?:.
/be
Attachment #260199 -
Attachment is obsolete: true
Attachment #260307 -
Flags: review+
| Assignee | ||
Comment 4•18 years ago
|
||
Fixed on trunk:
js/src/jsopcode.c 3.222
/be
Comment 5•18 years ago
|
||
/cvsroot/mozilla/js/tests/js1_5/decompilation/regress-375882.js,v <-- regress-375882.js
initial revision: 1.1
the case 1 / -0 : just looks weird to me.
function ( ) {
switch ( a ) {
case 0 / 0 : a ;
case 1 / 0 : b ;
case 1 / - 0 : c ;
case - 0 : d ;
default : ;
}
}
Flags: in-testsuite+
| Assignee | ||
Comment 6•18 years ago
|
||
We could use -1 / 0 since the expression will be auto-parenthesized as needed, based on operator precedence. File a new bug for this prettier form if you like?
/be
Comment 7•18 years ago
|
||
verified fixed linux, windows, mac* shell 20070406
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•