Closed Bug 460158 Opened 16 years ago Closed 15 years ago

Round-trip change due to incomplete constant-folding near &&

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
minor

Tracking

()

RESOLVED DUPLICATE of bug 461269

People

(Reporter: jruderman, Unassigned)

References

Details

(Keywords: regression, testcase)

js> f = (function() { if ((1) && 0) { a } });
function () {
    if (true && false) {
        a;
    }
}

js> eval(uneval(f));
function () {
}

It seems like spidermonkey knows that the LHS needs to be turned into a boolean, but then doesn't constant-fold as much as it can.

jsfunfuzz currently complains about this frequently, but I expect to be able to quiet it without high risk of missing "real" bugs that appear as round-trip changes.
This sounds like the kind of thing bug 461269 will address.
Depends on: 461269
Current tracemonkey tip:

js> f = (function() { if ((1) && 0) { a } });
function () {
}
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.