Closed Bug 352084 Opened 18 years ago Closed 18 years ago

Decompiler omits parens needed for comma to be seen as "sequential evaluation"

Categories

(Core :: JavaScript Engine, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: jruderman, Unassigned)

References

Details

(Keywords: regression, testcase, verified1.8.1.1)

The decompiler omits parens around sequential-evaluation expressions in at least these two contexts.  In both contexts, this results in the comma being interpreted as something other than sequential-evaluation.

js> function() { h = {x:5, y:(a,b)}}  
function () {
    h = {x:5, y:a, b};
}

js> function() { x(a, (b,c)) }
function () {
    x(a, b, c);
}
This is a regression (perhaps from bug 352022?).
Keywords: regression
Depends on: 352026
Two more:

js> function() { return [(x, y) for each (z in [])] }
function () {
    return [x, y for each (z in [])];
}

js> function() { return [(a, b), c]; }
function () {
    return [a, b, c];
}
(In reply to comment #1)
> This is a regression (perhaps from bug 352022?).

No, this is from the big re-do of opcode precedence, bug 350531.

It'll be fixed by the same patch that fixes bug 352026.  The virtue of using opcode precedence is that we don't need to add lots of special cases in code.  The vice (temporary) is that you'll have to bear with followup bugs to bug 350531, but there's light at the end of this tunnel.

/be
Blocks: 352025
Fixed by patch for bug 352026.

/be
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
No longer blocks: 352025
Checking in regress-352084.js;
/cvsroot/mozilla/js/tests/js1_6/Regress/regress-352084.js,v  <--  regress-352084.js
initial revision: 1.1
done
Flags: in-testsuite+
verified fixed 1.9 20060914 windows/mac*/linux
bug not evident on 1.8...
Status: RESOLVED → VERIFIED
fixed by Bug 352026
verified fixed 20061203 windows/linux/mac*
Keywords: verified1.8.1.1
You need to log in before you can comment on or make changes to this bug.