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

Issue 1585473002: [parser] reject parenthesized patterns as DestructuringAssignmentTargets (Closed)

Created:
4 years, 11 months ago by caitp (gmail)
Modified:
4 years, 11 months ago
Reviewers:
nickie, adamk, rossberg
CC:
v8-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[parser] reject parenthesized patterns as DestructuringAssignmentTargets http://tc39.github.io/ecma262/#sec-destructuring-assignment-static-semantics-early-errors requires that DestructuringAssignmentTargets which do not match Pattern productions, must return true for IsValidSimpleAssignmentTarget. This change rejects parenthesized patterns with a SyntaxError. BUG=v8:4662, v8:811 LOG=N R=adamk@chromium.org, rossberg@chromium.org, nikolaos@chromium.org Committed: https://crrev.com/6b28f294c1217fbf12e4d60e5969b439efc6f839 Cr-Commit-Position: refs/heads/master@{#33254}

Patch Set 1 #

Total comments: 3

Patch Set 2 : remove the extra check #

Unified diffs Side-by-side diffs Delta from patch set Stats (+58 lines, -2 lines) Patch
M src/parsing/parser-base.h View 1 1 chunk +6 lines, -1 line 0 comments Download
M test/cctest/test-parsing.cc View 4 chunks +52 lines, -1 line 0 comments Download

Messages

Total messages: 11 (2 generated)
caitp (gmail)
PTAL
4 years, 11 months ago (2016-01-12 23:13:21 UTC) #1
caitp (gmail)
https://codereview.chromium.org/1585473002/diff/1/src/parsing/parser-base.h File src/parsing/parser-base.h (right): https://codereview.chromium.org/1585473002/diff/1/src/parsing/parser-base.h#newcode3292 src/parsing/parser-base.h:3292: classifier->RecordBindingPatternError(location, message); technically, this bit isn't needed because of ...
4 years, 11 months ago (2016-01-12 23:15:16 UTC) #2
adamk
https://codereview.chromium.org/1585473002/diff/1/src/parsing/parser-base.h File src/parsing/parser-base.h (right): https://codereview.chromium.org/1585473002/diff/1/src/parsing/parser-base.h#newcode3292 src/parsing/parser-base.h:3292: classifier->RecordBindingPatternError(location, message); On 2016/01/12 23:15:16, caitp wrote: > technically, ...
4 years, 11 months ago (2016-01-12 23:17:11 UTC) #3
caitp (gmail)
https://codereview.chromium.org/1585473002/diff/1/src/parsing/parser-base.h File src/parsing/parser-base.h (right): https://codereview.chromium.org/1585473002/diff/1/src/parsing/parser-base.h#newcode3292 src/parsing/parser-base.h:3292: classifier->RecordBindingPatternError(location, message); On 2016/01/12 23:17:11, adamk wrote: > On ...
4 years, 11 months ago (2016-01-12 23:31:18 UTC) #4
adamk
lgtm
4 years, 11 months ago (2016-01-12 23:32:23 UTC) #5
adamk
(and thanks for the super-quick fix!)
4 years, 11 months ago (2016-01-12 23:34:54 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1585473002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1585473002/20001
4 years, 11 months ago (2016-01-13 00:13:59 UTC) #8
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 11 months ago (2016-01-13 00:40:30 UTC) #9
commit-bot: I haz the power
4 years, 11 months ago (2016-01-13 00:41:26 UTC) #11
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/6b28f294c1217fbf12e4d60e5969b439efc6f839
Cr-Commit-Position: refs/heads/master@{#33254}

Powered by Google App Engine
This is Rietveld 408576698