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

Unified Diff: src/preparser.h

Issue 1276273002: [es6] Fix parsing of expressions in parameter lists (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Whoops Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/expression-classifier.h ('k') | test/mjsunit/harmony/destructuring.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/preparser.h
diff --git a/src/preparser.h b/src/preparser.h
index 22633b6a030b39824e01f387b336bc04903b85d6..91e37912d163926131607322f3f1064b8c13b017 100644
--- a/src/preparser.h
+++ b/src/preparser.h
@@ -2506,7 +2506,8 @@ typename ParserBase<Traits>::ExpressionT ParserBase<Traits>::ParsePropertyName(
ExpressionClassifier computed_name_classifier;
ExpressionT expression =
ParseAssignmentExpression(true, &computed_name_classifier, CHECK_OK);
- classifier->AccumulateReclassifyingAsPattern(computed_name_classifier);
+ classifier->Accumulate(computed_name_classifier,
+ ExpressionClassifier::ExpressionProduction);
Expect(Token::RBRACK, CHECK_OK);
return expression;
}
@@ -2651,7 +2652,8 @@ ParserBase<Traits>::ParsePropertyDefinition(
ExpressionClassifier rhs_classifier;
ExpressionT rhs = this->ParseAssignmentExpression(
true, &rhs_classifier, CHECK_OK_CUSTOM(EmptyObjectLiteralProperty));
- classifier->AccumulateReclassifyingAsPattern(rhs_classifier);
+ classifier->Accumulate(rhs_classifier,
+ ExpressionClassifier::ExpressionProduction);
value = factory()->NewAssignment(Token::ASSIGN, lhs, rhs,
RelocInfo::kNoPosition);
} else {
@@ -2889,7 +2891,8 @@ ParserBase<Traits>::ParseAssignmentExpression(bool accept_IN,
ExpressionClassifier rhs_classifier;
ExpressionT right =
this->ParseAssignmentExpression(accept_IN, &rhs_classifier, CHECK_OK);
- classifier->AccumulateReclassifyingAsPattern(rhs_classifier);
+ classifier->Accumulate(rhs_classifier,
+ ExpressionClassifier::ExpressionProduction);
// TODO(1231235): We try to estimate the set of properties set by
// constructors. We define a new property whenever there is an
« no previous file with comments | « src/expression-classifier.h ('k') | test/mjsunit/harmony/destructuring.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698