Closed
Bug 350666
Opened 19 years ago
Closed 19 years ago
"delete y.(x)" in for's increment-expression expands to something containing a semicolon
Categories
(Core :: JavaScript Engine, defect, P2)
Core
JavaScript Engine
Tracking
()
VERIFIED
FIXED
mozilla1.8.1
People
(Reporter: jruderman, Assigned: brendan)
Details
(Keywords: testcase, verified1.8.1)
Attachments
(1 file)
|
1.81 KB,
patch
|
mrbkap
:
review+
beltzner
:
approval1.8.1+
|
Details | Diff | Splinter Review |
> function () { for(;; delete y.(x)) { } }
function () { for (;; y.(x); true) { } }
Feeding that back into the JavaScript engine gives a syntax error:
"missing ) after for-loop control"
| Reporter | ||
Comment 1•19 years ago
|
||
You don't need to use the new ".()" operator to trigger this bug; addition works too.
> function () { for(;; delete (y+x)) { } }
function () { for (;; y + x; true) { } }
This may or may not be the same bug:
> function () { let (y) delete (x+y); }
function () { x + y; let (y) true; }
| Assignee | ||
Comment 2•19 years ago
|
||
We need a bytecode sequence that will decompile as an expression, not a statement.
/be
| Assignee | ||
Updated•19 years ago
|
OS: Mac OS X 10.4 → All
Priority: -- → P2
Hardware: Macintosh → All
Target Milestone: --- → mozilla1.8.1
Updated•19 years ago
|
Attachment #237069 -
Flags: review?(mrbkap) → review+
| Assignee | ||
Comment 3•19 years ago
|
||
Fixed on trunk.
/be
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
| Assignee | ||
Comment 4•19 years ago
|
||
Comment on attachment 237069 [details] [diff] [review]
fix
Another delete fix, this time to emit code that looks to the decompiler like an expression instead of a statement sequence. Spot fix, easy to test, no non-local effects except to make the decompiler happy.
/be
Attachment #237069 -
Flags: approval1.8.1?
Comment 5•19 years ago
|
||
Comment on attachment 237069 [details] [diff] [review]
fix
a=beltzner on behalf of 181drivers
Attachment #237069 -
Flags: approval1.8.1? → approval1.8.1+
Comment 7•19 years ago
|
||
Checking in regress-350666.js;
/cvsroot/mozilla/js/tests/js1_5/Regress/regress-350666.js,v <-- regress-350666.js
initial revision: 1.1
Flags: in-testsuite+
Comment 8•19 years ago
|
||
verified fixed 1.8 1.9 20060909 windows/mac*/linux
Status: RESOLVED → VERIFIED
Keywords: fixed1.8.1 → verified1.8.1
You need to log in
before you can comment on or make changes to this bug.
Description
•