Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Issue 720863002: Fix desugaring of let bindings in for loops to handle continue properly (Closed)

Created:
6 years, 1 month ago by adamk
Modified:
6 years, 1 month ago
CC:
v8-dev, ulan, yangguo, Dmitry Lomov (no reviews)
Project:
v8
Visibility:
Public.

Description

Fix desugaring of let bindings in for loops to handle continue properly This requires putting the original loop's body inside an inner for loop (with the same labels as the original loop) and re-binding the temp variables in its "next" expression. A second flag is added to the desugared code to ensure the loop body executes at most once per loop. BUG=v8:3683 LOG=y Committed: https://chromium.googlesource.com/v8/v8/+/e98e70674690fdfe8f7c23ff666d150eb7283cee

Patch Set 1 #

Patch Set 2 : Builds #

Patch Set 3 : More fixes, but the desugaring is incorrect #

Patch Set 4 : Woops, remove bogus test #

Patch Set 5 : Lint #

Patch Set 6 : New desugaring comment, not yet implemented #

Total comments: 1

Patch Set 7 : Ready for review #

Total comments: 4

Patch Set 8 : Added tests and comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+215 lines, -59 lines) Patch
M src/parser.cc View 1 2 3 4 5 6 7 4 chunks +131 lines, -59 lines 0 comments Download
A test/mjsunit/harmony/regress/regress-3683.js View 1 2 3 4 5 6 7 1 chunk +84 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (3 generated)
arv (Not doing code reviews)
I wish there was a way to unit test what the generated code looks like. ...
6 years, 1 month ago (2014-11-13 16:15:43 UTC) #2
adamk
6 years, 1 month ago (2014-11-13 20:33:51 UTC) #4
adamk
This is now ready for review.
6 years, 1 month ago (2014-11-13 20:34:02 UTC) #5
arv (Not doing code reviews)
LGTM
6 years, 1 month ago (2014-11-13 21:00:50 UTC) #6
rossberg
LGTM modulo comments https://codereview.chromium.org/720863002/diff/120001/src/parser.cc File src/parser.cc (right): https://codereview.chromium.org/720863002/diff/120001/src/parser.cc#newcode3175 src/parser.cc:3175: loop->Initialize(NULL, flag_cond, compound_next_statement, body_or_stop); Perhaps add ...
6 years, 1 month ago (2014-11-14 10:58:01 UTC) #7
adamk
https://codereview.chromium.org/720863002/diff/120001/src/parser.cc File src/parser.cc (right): https://codereview.chromium.org/720863002/diff/120001/src/parser.cc#newcode3175 src/parser.cc:3175: loop->Initialize(NULL, flag_cond, compound_next_statement, body_or_stop); On 2014/11/14 10:58:01, rossberg wrote: ...
6 years, 1 month ago (2014-11-14 19:03:36 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/720863002/140001
6 years, 1 month ago (2014-11-14 19:04:52 UTC) #10
commit-bot: I haz the power
6 years, 1 month ago (2014-11-14 19:33:01 UTC) #11
Message was sent while issue was closed.
Committed patchset #8 (id:140001)

Powered by Google App Engine
This is Rietveld 408576698