Closed Bug 351625 Opened 18 years ago Closed 18 years ago

Decompilation omits parens around object literal

Categories

(Core :: JavaScript Engine, defect, P1)

defect

Tracking

()

VERIFIED FIXED
mozilla1.8.1

People

(Reporter: jruderman, Assigned: brendan)

References

Details

(Keywords: testcase, verified1.8.1)

Attachments

(1 file)

js> function() { ({a:b, c:3}); } 
function () {
    {a:b, c:3};
}

js> function () {
    {a:b, c:3};
typein:6: SyntaxError: invalid label...
Assignee: general → brendan
Depends on: 350531
OS: Mac OS X 10.4 → All
Priority: -- → P1
Hardware: Macintosh → All
Target Milestone: --- → mozilla1.8.1
Attached patch fixSplinter Review
Main fix is to detect the condition where it arises: JSOP_ENDINIT's Decompile code checks for next ops being group;pop{,v} and if so, parenthesizes.

jsopcode.tbl had the wrong precedence on the wrong op.  A formality in this case, but worth getting right.

/be
Attachment #237064 - Flags: review?(mrbkap)
Status: NEW → ASSIGNED
Attachment #237064 - Flags: review?(mrbkap) → review+
Fixed on trunk.

/be
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Attachment #237064 - Flags: approval1.8.1?
Checking in regress-351625.js;
/cvsroot/mozilla/js/tests/js1_5/Regress/regress-351625.js,v  <--  regress-351625.js
initial revision: 1.1
Flags: in-testsuite+
Comment on attachment 237064 [details] [diff] [review]
fix

a=beltzner on behalf of 181drivers
Attachment #237064 - Flags: approval1.8.1? → approval1.8.1+
Fixed on the 1.8 branch.

/be
Keywords: fixed1.8.1
Blocks: 351793
verified fixed 1.9a1_2006090707 windows/mac*/linux but 1.8 also passed this test with builds of approximately the same time...
Status: RESOLVED → VERIFIED
verified fixed 1.8 1.9 20060909 windows/mac*/linux
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: