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

Issue 1696603002: Remove AssignmentExpressionFlags enum, handle error checking in callers (Closed)

Created:
4 years, 10 months ago by adamk
Modified:
4 years, 10 months ago
Reviewers:
caitp (gmail), 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

Remove AssignmentExpressionFlags enum, handle error checking in callers This is hopefully the last in a series of cleanup patches around destructuring assignment. It simplifies the ParseAssignmentExpression API, making the callers call CheckDestructuringElement() where appropriate. CheckDestructuringElement has been further simplified to only emit the errors that the parser depends on it emitting. I've also beefed up the test coverage in test-parsing.cc to handling all the destructuring flags being on, which caught an oddity in how we disallow initializers in spreads in patterns (we need to treat RewritableAssignmentExpressions as Assignments for the purpose of error checking). Finally, I added a few helper methods to ParserBase to handle a few classes of expressions (assignments and literals-as-patterns). Committed: https://crrev.com/1003785ced44df0dc775b54cd95552784916b1e8 Cr-Commit-Position: refs/heads/master@{#33961}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Eliminate early return #

Unified diffs Side-by-side diffs Delta from patch set Stats (+51 lines, -64 lines) Patch
M src/parsing/parser-base.h View 1 13 chunks +26 lines, -47 lines 0 comments Download
M src/parsing/preparser.h View 1 chunk +2 lines, -0 lines 0 comments Download
M test/cctest/test-parsing.cc View 10 chunks +23 lines, -17 lines 0 comments Download

Messages

Total messages: 17 (6 generated)
adamk
This one isn't quite as obvious a cleanup as the previous ones, but I had ...
4 years, 10 months ago (2016-02-12 01:21:42 UTC) #3
caitp (gmail)
On 2016/02/12 01:21:42, adamk wrote: > This one isn't quite as obvious a cleanup as ...
4 years, 10 months ago (2016-02-12 01:30:35 UTC) #4
rossberg
lgtm LGTM, nice! https://codereview.chromium.org/1696603002/diff/1/src/parsing/parser-base.h File src/parsing/parser-base.h (right): https://codereview.chromium.org/1696603002/diff/1/src/parsing/parser-base.h#newcode835 src/parsing/parser-base.h:835: bool IsAssignmentExpression(ExpressionT expression) { Note: Niko ...
4 years, 10 months ago (2016-02-12 08:32:36 UTC) #5
adamk
On 2016/02/12 01:30:35, caitp wrote: > On 2016/02/12 01:21:42, adamk wrote: > > This one ...
4 years, 10 months ago (2016-02-12 18:21:12 UTC) #6
caitp (gmail)
On 2016/02/12 18:21:12, adamk wrote: > On 2016/02/12 01:30:35, caitp wrote: > > On 2016/02/12 ...
4 years, 10 months ago (2016-02-12 18:29:35 UTC) #7
adamk
On 2016/02/12 18:29:35, caitp wrote: > On 2016/02/12 18:21:12, adamk wrote: > > On 2016/02/12 ...
4 years, 10 months ago (2016-02-12 18:30:39 UTC) #8
caitp (gmail)
On 2016/02/12 18:30:39, adamk wrote: > On 2016/02/12 18:29:35, caitp wrote: > > On 2016/02/12 ...
4 years, 10 months ago (2016-02-12 18:34:03 UTC) #9
adamk
I'd like to carry on with removing this for now, since that code in CheckDestructuringElement ...
4 years, 10 months ago (2016-02-12 21:49:57 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1696603002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1696603002/20001
4 years, 10 months ago (2016-02-12 21:50:04 UTC) #13
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 10 months ago (2016-02-12 22:38:24 UTC) #15
commit-bot: I haz the power
4 years, 10 months ago (2016-02-12 22:38:53 UTC) #17
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/1003785ced44df0dc775b54cd95552784916b1e8
Cr-Commit-Position: refs/heads/master@{#33961}

Powered by Google App Engine
This is Rietveld 408576698