Closed
Bug 511974
Opened 15 years ago
Closed 15 years ago
TM: Treat "continue LABEL;" like "break;"
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
VERIFIED
FIXED
Tracking | Status | |
---|---|---|
status1.9.2 | --- | beta1-fixed |
People
(Reporter: jorendorff, Assigned: jorendorff)
Details
(Keywords: verified1.9.2, Whiteboard: fixed-in-tracemonkey)
Attachments
(1 file)
1.75 KB,
patch
|
gal
:
review+
|
Details | Diff | Splinter Review |
To avoid tracing into outer loops and all sorts of craziness, we specially detect `break;` in TR::record_JSOP_GOTO and emit an unconditional exit.
We need to do the same for `continue LABEL;` where LABEL is a loop that encloses the one we're trying to record.
The patch works and the new test passes, but it messes up the goofy case where someone has pointlessly labeled a loop:
inner:
for (i = 0; i < 9; i++) {
if (i == x)
continue inner;
...
}
If we care, I think the way to fix that is to skip emitting the CONT2LABEL source note for that GOTO.
Assignee | ||
Comment 1•15 years ago
|
||
Feel free to minus if you think I should fix the silly case before checking this patch in.
Assignee: general → jorendorff
Attachment #395937 -
Flags: review?(gal)
Updated•15 years ago
|
Attachment #395937 -
Flags: review?(gal) → review+
Assignee | ||
Comment 2•15 years ago
|
||
Whiteboard: fixed-in-tracemonkey
Comment 3•15 years ago
|
||
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Comment 4•15 years ago
|
||
status1.9.2:
--- → beta1-fixed
Flags: wanted1.9.2+
Comment 5•15 years ago
|
||
js/src/trace-test/tests/basic/testBreak.js
js/src/trace-test/tests/basic/testContinueWithLabel2.js
v 1.9.3, 1.9.2
You need to log in
before you can comment on or make changes to this bug.
Description
•