Closed Bug 351626 Opened 18 years ago Closed 18 years ago

Decompiler can't make up its mind about whether if(lambda) needs extra parens

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 () {
    if (function () {}) {
        g();
    }
}
function () {
    if ((function () {})) {
        g();
    }
}

js> function () {
    if ((function () {})) {
        g();
    }
}
function () {
    if (function () {}) {
        g();
    }
}
More fallout from the generally righteous patch for bug 350531.

/be
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
Again the thrust of the fix is to take advantage of the fix for bug 350531 and avoid forcing parentheses, instead letting the opcode precedence levels and the postfix-to-infix parenthesization magic in PopOff do their thing.  This requires making the lambda bytecodes have a lower precedence than the member operators.

/be
Attachment #237080 - Flags: review?(mrbkap)
Attachment #237080 - Flags: review?(mrbkap) → review+
Fixed on trunk and 1.8 branch (force majeure again, last time if I can help it).

/be
Status: NEW → RESOLVED
Closed: 18 years ago
Keywords: fixed1.8.1
Resolution: --- → FIXED
Checking in regress-351626.js;
/cvsroot/mozilla/js/tests/js1_5/Regress/regress-351626.js,v  <--  regress-351626.js
initial revision: 1.1
Flags: in-testsuite+
Summary: Decompiler can't make up its mind about whether if(lambda) needs extra parens → deDecompiler can't make up its mind about whether if(lambda) needs extra parens
Summary: deDecompiler can't make up its mind about whether if(lambda) needs extra parens → Decompiler can't make up its mind about whether if(lambda) needs extra parens
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: