Closed
Bug 352441
Opened 18 years ago
Closed 18 years ago
Decompilation of "case (yield):" does not compile
Categories
(Core :: JavaScript Engine, defect, P2)
Core
JavaScript Engine
Tracking
()
VERIFIED
FIXED
mozilla1.9alpha4
People
(Reporter: jruderman, Assigned: brendan)
References
Details
(Keywords: testcase)
Attachments
(1 file)
957 bytes,
patch
|
mrbkap
:
review+
|
Details | Diff | Splinter Review |
js> function() { switch (x) { case (yield): } }
function () {
switch (x) {
case yield:
default:;
}
}
js> function () { switch (x) { case yield: } }
syntax error
Reporter | ||
Comment 1•18 years ago
|
||
Is this a bug in the decompiler or a bug in the compiler?
Why is "case yield:" a syntax error while "case yield 5:" is accepted?
Assignee | ||
Comment 2•18 years ago
|
||
I think case yield: should not be an error. The E262-3 grammar says a case label is an Expression (Expr in jsparse.c terms). There's no problem with , as in an argument list. Comments?
/be
Reporter | ||
Comment 3•18 years ago
|
||
js> new Function("switch(w) { case yield\n: x }")
somehow compiles, but its decompilation of course doesn't compile.
Reporter | ||
Comment 4•18 years ago
|
||
WFM: "case yield:" is now accepted.
Status: NEW → RESOLVED
Closed: 18 years ago
Flags: in-testsuite?
Resolution: --- → WORKSFORME
Reporter | ||
Comment 5•18 years ago
|
||
D'oh, I was testing without "-v 170".
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Assignee | ||
Comment 6•18 years ago
|
||
Assignee | ||
Updated•18 years ago
|
OS: Mac OS X → All
Priority: -- → P2
Hardware: Macintosh → All
Target Milestone: --- → mozilla1.9alpha4
Updated•18 years ago
|
Attachment #260561 -
Flags: review?(mrbkap) → review+
Assignee | ||
Comment 7•18 years ago
|
||
Fixed on trunk:
js/src/jsparse.c 3.275
/be
Blocks: js1.7src
Status: ASSIGNED → RESOLVED
Closed: 18 years ago → 18 years ago
Resolution: --- → FIXED
Comment 8•18 years ago
|
||
/cvsroot/mozilla/js/tests/js1_7/decompilation/regress-352441.js,v <-- regress-352441.js
initial revision: 1.1
Flags: in-testsuite? → in-testsuite+
You need to log in
before you can comment on or make changes to this bug.
Description
•