Closed Bug 352363 Opened 18 years ago Closed 18 years ago

Decompiler assumes global.NaN can't change

Categories

(Core :: JavaScript Engine, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 351219

People

(Reporter: jruderman, Unassigned)

Details

(Keywords: testcase)

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

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