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

Issue 2271063002: Centralize and standardize logic for ExpressionClassifier accumulation (Closed)

Created:
4 years, 4 months ago by adamk
Modified:
4 years, 3 months ago
Reviewers:
nickie, Dan Ehrenberg
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

Centralize and standardize logic for ExpressionClassifier accumulation Previously the calls to ExpressionClassifier::Accumulate() each chose slightly different sets of productions to accumulate, and it turned out that these were in some cases broader than needed and in some cases less broad. The existence of some grab-bag production bitmasks like ExpressionClassifier::ExpressionProductions made this situation more error-prone (for example, that production was missing AsyncArrowFormalParametersProduction). This patch removes all "grab-bags" besides AllProductions. In some of the places where code was using those grab-bags for convenience, it switches them to use negation of AllProductions. In other, specifically those having to do with expressions that are disallowed anywhere in a sub-expression of a parameter list, I've added a new method on ExpressionClassifier to centralize the logic. The aforementioned centralization/addition of AsyncArrowFormalParametersProduction fixes several cases where we were failing to report an error for 'await' in some contexts; I've added those test cases. The patch also narrows all cases to exactly the set or productions necessary, with a comment on each explaining the choice. BUG=v8:4483 Committed: https://crrev.com/51c186dd983e542d2ac17835f73df8b1e5c6461e Cr-Commit-Position: refs/heads/master@{#38918}

Patch Set 1 #

Patch Set 2 : Fix mjsunit test #

Patch Set 3 : Fix tail calls #

Patch Set 4 : Add new accumulate method to avoid duplication #

Patch Set 5 : Rebased #

Total comments: 2

Patch Set 6 : V8_INLINE #

Patch Set 7 : Rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+69 lines, -52 lines) Patch
M src/parsing/expression-classifier.h View 1 2 3 4 5 6 2 chunks +19 lines, -11 lines 0 comments Download
M src/parsing/parser.cc View 1 2 3 4 5 6 2 chunks +4 lines, -4 lines 0 comments Download
M src/parsing/parser-base.h View 1 2 3 4 5 6 8 chunks +35 lines, -31 lines 0 comments Download
M src/parsing/preparser.cc View 1 2 3 4 5 6 2 chunks +4 lines, -4 lines 0 comments Download
M test/cctest/test-parsing.cc View 1 2 3 4 5 6 3 chunks +7 lines, -2 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 33 (25 generated)
adamk
4 years, 4 months ago (2016-08-24 20:14:43 UTC) #17
nickie
LGTM, 1 comment https://codereview.chromium.org/2271063002/diff/80001/src/parsing/expression-classifier.h File src/parsing/expression-classifier.h (right): https://codereview.chromium.org/2271063002/diff/80001/src/parsing/expression-classifier.h#newcode386 src/parsing/expression-classifier.h:386: void AccumulateFormalParameterContainmentErrors(ExpressionClassifier* inner) { I'm not ...
4 years, 3 months ago (2016-08-25 10:48:00 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2271063002/100001
4 years, 3 months ago (2016-08-25 15:46:04 UTC) #23
adamk
https://codereview.chromium.org/2271063002/diff/80001/src/parsing/expression-classifier.h File src/parsing/expression-classifier.h (right): https://codereview.chromium.org/2271063002/diff/80001/src/parsing/expression-classifier.h#newcode386 src/parsing/expression-classifier.h:386: void AccumulateFormalParameterContainmentErrors(ExpressionClassifier* inner) { On 2016/08/25 10:48:00, nickie wrote: ...
4 years, 3 months ago (2016-08-25 15:46:27 UTC) #24
commit-bot: I haz the power
Try jobs failed on following builders: v8_android_arm_compile_rel on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_android_arm_compile_rel/builds/23410) v8_linux64_asan_rel_ng on master.tryserver.v8 (JOB_FAILED, ...
4 years, 3 months ago (2016-08-25 15:47:23 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2271063002/120001
4 years, 3 months ago (2016-08-25 16:22:54 UTC) #29
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 3 months ago (2016-08-25 16:59:17 UTC) #31
commit-bot: I haz the power
4 years, 3 months ago (2016-08-25 16:59:53 UTC) #33
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/51c186dd983e542d2ac17835f73df8b1e5c6461e
Cr-Commit-Position: refs/heads/master@{#38918}

Powered by Google App Engine
This is Rietveld 408576698