Closed Bug 352217 Opened 18 years ago Closed 18 years ago

Need space between "else" and "let"

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, 2 obsolete files)

js> uneval(function() { if(g) h; else let x; }) (function () {if (g) {h;} elselet x;}) Regression from bug 351070?
Depends on: 351070
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
The "elselet" bug is easy to fix, the do-while and with cases a bit harder. More soon, I hope. /be
Assignee: general → brendan
Status: NEW → ASSIGNED
Attached patch patch that fixes the elselet problem (obsolete) (deleted) — Splinter Review
I would like to develop this to fix related problems in the maybe-brace code. /be
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
Blocks: 352266
Blocks: 352267
Blocks: 352283
Attached patch fix elselet and several related probs (obsolete) (deleted) — Splinter Review
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)
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)
Attached patch better fix (deleted) — Splinter Review
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)
I split out two bugs: Bug 352421 for "do..while" Bug 352422 for "with"
Attachment #238042 - Flags: review?(mrbkap) → review+
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
Attachment #238042 - Flags: approval1.8.1?
Comment on attachment 238042 [details] [diff] [review] better fix a=schrep for 181drivers
Attachment #238042 - Flags: approval1.8.1? → approval1.8.1+
Fixed on the 1.8 branch. /be
Keywords: fixed1.8.1
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+
verified fixed 1.8 20060914 windows/linux 1.9 20060914 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: