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

Issue 1149043005: [destructuring] Grand for statement parsing unification. (Closed)

Created:
5 years, 7 months ago by Dmitry Lomov (no reviews)
Modified:
5 years, 7 months ago
CC:
v8-dev
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[destructuring] Grand for statement parsing unification. Also support patterns in ``for (var p in/of ...)`` This CL extends the rewriting we used to do for ``for (let p in/of...)`` to ``for (var p in/of ...)``. For all for..in/of loop declaring variable, we rewrite for (var/let/const pattern in/of e) b into for (x' in/of e) { var/let/const pattern = e; b } This adds a small complication for debugger: for a statement for (var v in/of e) ... we used to have var v; for (v in/of e) ... and there was a separate breakpoint on ``var v`` line. This breakpoint is actually useless since it is immediately followed by a breakpoint on evaluation of ``e``, so this CL removes that breakpoint location. Similiraly, for let, it used to be that for (let v in/of e) ... became for (x' in/of e) { let v; v = x'; ... } ``let v``generetaed a useless breakpoint (with the location at the loop's head. This CL removes that breakpoint as well. R=arv@chromium.org,rossberg@chromium.org BUG=v8:811 LOG=N Committed: https://crrev.com/7ffdb5194d51a5813f9474d2453859c376223b18 Cr-Commit-Position: refs/heads/master@{#28565}

Patch Set 1 #

Total comments: 6

Patch Set 2 : Rebase feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+148 lines, -110 lines) Patch
M src/parser.h View 1 chunk +2 lines, -1 line 0 comments Download
M src/parser.cc View 5 chunks +64 lines, -88 lines 0 comments Download
M src/pattern-rewriter.cc View 6 chunks +12 lines, -8 lines 0 comments Download
M test/cctest/test-parsing.cc View 1 chunk +26 lines, -0 lines 0 comments Download
M test/mjsunit/es6/debug-stepnext-for.js View 2 chunks +12 lines, -11 lines 0 comments Download
M test/mjsunit/harmony/destructuring.js View 1 2 chunks +32 lines, -2 lines 0 comments Download

Messages

Total messages: 12 (3 generated)
Dmitry Lomov (no reviews)
PTAL
5 years, 7 months ago (2015-05-21 16:00:14 UTC) #2
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1149043005/1
5 years, 7 months ago (2015-05-21 16:00:38 UTC) #3
arv (Not doing code reviews)
LGTM https://codereview.chromium.org/1149043005/diff/1/test/mjsunit/harmony/destructuring.js File test/mjsunit/harmony/destructuring.js (right): https://codereview.chromium.org/1149043005/diff/1/test/mjsunit/harmony/destructuring.js#newcode680 test/mjsunit/harmony/destructuring.js:680: var o = { 'a1':1, 'b2':2 }; var ...
5 years, 7 months ago (2015-05-21 16:37:01 UTC) #4
Dmitry Lomov (no reviews)
Landing https://codereview.chromium.org/1149043005/diff/1/test/mjsunit/harmony/destructuring.js File test/mjsunit/harmony/destructuring.js (right): https://codereview.chromium.org/1149043005/diff/1/test/mjsunit/harmony/destructuring.js#newcode680 test/mjsunit/harmony/destructuring.js:680: var o = { 'a1':1, 'b2':2 }; On ...
5 years, 7 months ago (2015-05-21 17:07:34 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1149043005/20001
5 years, 7 months ago (2015-05-21 17:08:14 UTC) #8
rossberg
https://codereview.chromium.org/1149043005/diff/1/src/parser.cc File src/parser.cc (right): https://codereview.chromium.org/1149043005/diff/1/src/parser.cc#newcode3461 src/parser.cc:3461: // special case for legacy for (var/const x =.... ...
5 years, 7 months ago (2015-05-21 17:18:04 UTC) #9
Dmitry Lomov (no reviews)
https://codereview.chromium.org/1149043005/diff/1/src/parser.cc File src/parser.cc (right): https://codereview.chromium.org/1149043005/diff/1/src/parser.cc#newcode3461 src/parser.cc:3461: // special case for legacy for (var/const x =.... ...
5 years, 7 months ago (2015-05-21 17:22:01 UTC) #10
commit-bot: I haz the power
Committed patchset #2 (id:20001)
5 years, 7 months ago (2015-05-21 17:47:14 UTC) #11
commit-bot: I haz the power
5 years, 7 months ago (2015-05-21 17:47:22 UTC) #12
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/7ffdb5194d51a5813f9474d2453859c376223b18
Cr-Commit-Position: refs/heads/master@{#28565}

Powered by Google App Engine
This is Rietveld 408576698