Decompiler assumes global.NaN can't change

RESOLVED DUPLICATE of bug 351219

Status

()

Core
JavaScript Engine
RESOLVED DUPLICATE of bug 351219
12 years ago
12 years ago

People

(Reporter: Jesse Ruderman, Unassigned)

Tracking

({testcase})

Trunk
PowerPC
Mac OS X
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

12 years ago
The decompiler uses NaN to represent the pseudo-number NaN.  But since NaN is a modifiable property of the global rather than a keyword, the decompiled code acts differently than the original.

I think the same problem exists for Infinity.

js> g = function() { return 0 / 0 }
function () {
    return NaN;
}
js> g()
NaN
js> NaN = "wtf"
wtf
js> g()
NaN
js> h = eval(""+g)
function () {
    return NaN;
}
js> h()
wtf

Comment 1

12 years ago

*** This bug has been marked as a duplicate of 351219 ***
Status: NEW → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.