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

Issue 1189743003: [destructuring] Implement parameter pattern matching. (Closed)

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

Description

[destructuring] Implement parameter pattern matching. Scoping for initializers is yet incorrect. Defaults are not supported. R=arv@chromium.org,rossberg@chromium.org BUG=v8:811 LOG=N Committed: https://crrev.com/42f30f4ded2b1ca0c4caa7639e6206e93c78ee70 Cr-Commit-Position: refs/heads/master@{#29184} Committed: https://crrev.com/e7cdb615aeb18f7b4089eb646489d78a853050c9 Cr-Commit-Position: refs/heads/master@{#29192}

Patch Set 1 #

Total comments: 11

Patch Set 2 : Better encapsulation of formal parameter parsing state #

Patch Set 3 : Some progress #

Patch Set 4 : Done #

Total comments: 13

Patch Set 5 : CR feedback #

Total comments: 7

Patch Set 6 : Feedback + rebased for landing #

Total comments: 1

Patch Set 7 : Updated expectations #

Patch Set 8 : Fix magic number issue #

Unified diffs Side-by-side diffs Delta from patch set Stats (+443 lines, -144 lines) Patch
M src/parser.h View 1 2 3 4 11 chunks +77 lines, -28 lines 0 comments Download
M src/parser.cc View 1 2 3 4 5 21 chunks +92 lines, -45 lines 0 comments Download
M src/pattern-rewriter.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M src/preparser.h View 1 2 3 4 5 25 chunks +97 lines, -55 lines 0 comments Download
M src/preparser.cc View 1 2 3 2 chunks +8 lines, -6 lines 0 comments Download
M src/scopes.cc View 1 2 3 1 chunk +11 lines, -4 lines 0 comments Download
M src/snapshot/serialize.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M test/cctest/test-parsing.cc View 1 2 3 4 5 3 chunks +110 lines, -1 line 0 comments Download
M test/mjsunit/harmony/destructuring.js View 1 2 3 2 chunks +42 lines, -0 lines 0 comments Download
M test/mjsunit/regress/regress-1130.js View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M test/mjsunit/regress/regress-436896.js View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M test/webkit/fast/js/arguments-expected.txt View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 43 (15 generated)
Dmitry Lomov (no reviews)
PTAL
5 years, 6 months ago (2015-06-16 15:06:40 UTC) #1
arv (Not doing code reviews)
Now we can add tests for duplicate param names with destructuring. // sloppy function f(x, ...
5 years, 6 months ago (2015-06-16 16:56:36 UTC) #2
rossberg
https://codereview.chromium.org/1189743003/diff/1/src/parser.cc File src/parser.cc (right): https://codereview.chromium.org/1189743003/diff/1/src/parser.cc#newcode4227 src/parser.cc:4227: descriptor.mode = VAR; Shouldn't this be LET? https://codereview.chromium.org/1189743003/diff/1/src/scopes.h File ...
5 years, 6 months ago (2015-06-16 17:02:13 UTC) #3
caitp (gmail)
https://codereview.chromium.org/1189743003/diff/1/src/parser.cc File src/parser.cc (right): https://codereview.chromium.org/1189743003/diff/1/src/parser.cc#newcode4227 src/parser.cc:4227: descriptor.mode = VAR; On 2015/06/16 17:02:12, rossberg wrote: > ...
5 years, 6 months ago (2015-06-16 19:08:09 UTC) #5
Dmitry Lomov (no reviews)
Refactored formal parameter parsing to better encapsulate state and separate concerns. Will now address other ...
5 years, 6 months ago (2015-06-17 12:28:48 UTC) #6
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1189743003/20001
5 years, 6 months ago (2015-06-17 12:29:16 UTC) #8
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 6 months ago (2015-06-17 12:55:25 UTC) #10
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1189743003/40001
5 years, 6 months ago (2015-06-18 15:01:21 UTC) #12
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_linux64_asan_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux64_asan_rel/builds/5201)
5 years, 6 months ago (2015-06-18 15:31:18 UTC) #14
Dmitry Lomov (no reviews)
Please take another look https://codereview.chromium.org/1189743003/diff/1/src/parser.cc File src/parser.cc (right): https://codereview.chromium.org/1189743003/diff/1/src/parser.cc#newcode4227 src/parser.cc:4227: descriptor.mode = VAR; Changing to ...
5 years, 6 months ago (2015-06-19 15:25:14 UTC) #15
rossberg
Looks good, but I'm on my way out and only had time for a superficial ...
5 years, 6 months ago (2015-06-19 16:26:35 UTC) #17
arv (Not doing code reviews)
LGTM If you want to handle the property name issue later that is fine with ...
5 years, 6 months ago (2015-06-19 19:25:26 UTC) #18
Dmitry Lomov (no reviews)
Comments addressed (sorry had to rebase). PTAL https://codereview.chromium.org/1189743003/diff/60001/src/parser.cc File src/parser.cc (right): https://codereview.chromium.org/1189743003/diff/60001/src/parser.cc#newcode4301 src/parser.cc:4301: On 2015/06/19 ...
5 years, 6 months ago (2015-06-22 10:14:10 UTC) #20
wingo
Sending half-done review, now to look at rebase. Overall looks pretty swell but one question ...
5 years, 6 months ago (2015-06-22 10:22:15 UTC) #21
wingo
https://codereview.chromium.org/1189743003/diff/80001/test/cctest/test-parsing.cc File test/cctest/test-parsing.cc (right): https://codereview.chromium.org/1189743003/diff/80001/test/cctest/test-parsing.cc#newcode6608 test/cctest/test-parsing.cc:6608: TEST(DestructuringDuplicateParams) { Need tests that patterns are not allowed ...
5 years, 6 months ago (2015-06-22 10:28:34 UTC) #22
wingo
LGTM with nit above about rest patterns. That said :) Is this expected to work ...
5 years, 6 months ago (2015-06-22 10:43:18 UTC) #23
Dmitry Lomov (no reviews)
Comments addressed. Initializers (+default parameters) have completely wrong scope so far. I'll address everything relating ...
5 years, 6 months ago (2015-06-22 11:11:43 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1189743003/100001
5 years, 6 months ago (2015-06-22 11:12:03 UTC) #27
wingo
One nit for a followup perhaps. https://codereview.chromium.org/1189743003/diff/100001/src/preparser.h File src/preparser.h (right): https://codereview.chromium.org/1189743003/diff/100001/src/preparser.h#newcode3552 src/preparser.h:3552: ReportUnexpectedToken(next); Nit: will ...
5 years, 6 months ago (2015-06-22 11:14:58 UTC) #28
commit-bot: I haz the power
Try jobs failed on following builders: v8_linux64_avx2_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux64_avx2_rel/builds/1566)
5 years, 6 months ago (2015-06-22 11:27:15 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1189743003/120001
5 years, 6 months ago (2015-06-22 11:43:35 UTC) #33
commit-bot: I haz the power
Committed patchset #7 (id:120001)
5 years, 6 months ago (2015-06-22 12:07:01 UTC) #34
commit-bot: I haz the power
Patchset 7 (id:??) landed as https://crrev.com/42f30f4ded2b1ca0c4caa7639e6206e93c78ee70 Cr-Commit-Position: refs/heads/master@{#29184}
5 years, 6 months ago (2015-06-22 12:07:22 UTC) #35
Michael Achenbach
A revert of this CL (patchset #7 id:120001) has been created in https://codereview.chromium.org/1195163007/ by machenbach@chromium.org. ...
5 years, 6 months ago (2015-06-22 13:13:53 UTC) #36
Dmitry Lomov (no reviews)
PS#8 attempts to fix a read-bogus-memory serialization issue. Yang, ptal at a change in serialize.cc
5 years, 6 months ago (2015-06-22 13:40:28 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1189743003/140001
5 years, 6 months ago (2015-06-22 13:52:45 UTC) #41
commit-bot: I haz the power
Committed patchset #8 (id:140001)
5 years, 6 months ago (2015-06-22 14:15:59 UTC) #42
commit-bot: I haz the power
5 years, 6 months ago (2015-06-22 14:16:11 UTC) #43
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/e7cdb615aeb18f7b4089eb646489d78a853050c9
Cr-Commit-Position: refs/heads/master@{#29192}

Powered by Google App Engine
This is Rietveld 408576698