Closed
Bug 352217
Opened 18 years ago
Closed 18 years ago
Need space between "else" and "let"
Categories
(Core :: JavaScript Engine, defect, P1)
Core
JavaScript Engine
Tracking
()
VERIFIED
FIXED
mozilla1.8.1
People
(Reporter: jruderman, Assigned: brendan)
References
Details
(Keywords: testcase, verified1.8.1)
Attachments
(1 file, 2 obsolete files)
(deleted),
patch
|
mrbkap
:
review+
mtschrep
:
approval1.8.1+
|
Details | Diff | Splinter Review |
js> uneval(function() { if(g) h; else let x; })
(function () {if (g) {h;} elselet x;})
Regression from bug 351070?
Assignee | ||
Comment 1•18 years ago
|
||
I should read my test output more carefully:
$ ./Darwin_DBG.OBJ/js < maybebrace.js| fgrep '{let'
(function f() {var n = 2, a = 2;do {let a = 3;} while (false);return a;})
(function f() {var n = 2, a = 2;with (this) {let a = 3;}return a;})
Neither do-while nor with decompilaton cases call Decompile recursively on just the body statement, frustrating the maybe=>don't-brace logic under JSVAL_POP{,V}.
/be
OS: Mac OS X 10.4 → All
Priority: -- → P1
Hardware: Macintosh → All
Target Milestone: --- → mozilla1.8.1
Assignee | ||
Comment 2•18 years ago
|
||
The "elselet" bug is easy to fix, the do-while and with cases a bit harder. More soon, I hope.
/be
Assignee: general → brendan
Assignee | ||
Updated•18 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 3•18 years ago
|
||
I would like to develop this to fix related problems in the maybe-brace code.
/be
Assignee | ||
Comment 4•18 years ago
|
||
Jesse, could you do me a big favor and link the other bugs that depend on brace removal due to let to this one, or to a new tracking one if you prefer? Thanks,
/be
Assignee | ||
Comment 5•18 years ago
|
||
See the dependent bugs.
Jesse, this should cure all ills except for with, do-while, and if-else-if statements that govern unbraced let statements. Let me know if something's amiss.
/be
Attachment #237932 -
Attachment is obsolete: true
Attachment #238031 -
Flags: review?(mrbkap)
Assignee | ||
Comment 6•18 years ago
|
||
Comment on attachment 238031 [details] [diff] [review]
fix elselet and several related probs
Have to retest more before attaching.
/be
Attachment #238031 -
Attachment is obsolete: true
Attachment #238031 -
Flags: review?(mrbkap)
Assignee | ||
Comment 7•18 years ago
|
||
The js_printf code can't be too smart. It's up to js_printf callers to clear maybe-brace state as needed. That means all the mandatory-brace control flow structures (try, catch, finally, switch), plus explicit braced blocks (annotated with SRC_BRACE).
This does not fix bug 352268, that (if-else-if) is a separate headache.
/be
Attachment #238042 -
Flags: review?(mrbkap)
Reporter | ||
Comment 8•18 years ago
|
||
I split out two bugs:
Bug 352421 for "do..while"
Bug 352422 for "with"
Updated•18 years ago
|
Attachment #238042 -
Flags: review?(mrbkap) → review+
Assignee | ||
Comment 9•18 years ago
|
||
Fixed on trunk:
Checking in jsopcode.c;
/cvsroot/mozilla/js/src/jsopcode.c,v <-- jsopcode.c
new revision: 3.179; previous revision: 3.178
done
/be
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•18 years ago
|
Attachment #238042 -
Flags: approval1.8.1?
Comment 10•18 years ago
|
||
Comment on attachment 238042 [details] [diff] [review]
better fix
a=schrep for 181drivers
Attachment #238042 -
Flags: approval1.8.1? → approval1.8.1+
Comment 12•18 years ago
|
||
Checking in regress-352217.js;
/cvsroot/mozilla/js/tests/js1_7/block/regress-352217.js,v <-- regress-352217.js
initial revision: 1.1
done
Flags: in-testsuite+
Comment 13•18 years ago
|
||
verified fixed 1.8 20060914 windows/linux 1.9 20060914 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
•