Closed Bug 351705 Opened 18 years ago Closed 18 years ago

Incorrect decompilation with "new" operator and a unary operator

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() { new (-y); x }  
function () {
    new - y;
    x;
}

js> function () {
    new - y;
typein:9: SyntaxError: syntax error:
typein:9:     new - y;
typein:9: ........^
This is getting old.  But I think we are out of the woods now.

/be
Assignee: general → brendan
Depends on: 350531
Keywords: fixed1.8.1
OS: Mac OS X 10.4 → All
Priority: -- → P1
Hardware: Macintosh → All
Target Milestone: --- → mozilla1.8.1
Attached patch fixSplinter Review
The precedence for JSOP_NEW was just wrong, too low.  It's not a unary operator, it is a member op.

/be
Attachment #237156 - Flags: review?(mrbkap)
Attachment #237156 - Flags: review?(mrbkap) → review+
Status: NEW → ASSIGNED
Fixed on trunk and 1.8 branch -- pulling rank a bit on the latter.

/be
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Checking in regress-351705.js;
/cvsroot/mozilla/js/tests/js1_5/Regress/regress-351705.js,v  <--  regress-351705.js
initial revision: 1.1
Flags: in-testsuite+
verified fixed 1.8 1.9 20060909 windows/mac*/linux
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: