DescriptionCentralize 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 #
Dependent Patchsets: Messages
Total messages: 33 (25 generated)
|