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

Unified Diff: src/parsing/parser-base.h

Issue 2086513002: Fix classifier related bug (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix patch (&^%$#@! similarity) Created 4 years, 6 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 | « no previous file | test/mjsunit/harmony/regress/regress-crbug-621111.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parser-base.h
diff --git a/src/parsing/parser-base.h b/src/parsing/parser-base.h
index 65c15727724b0d480e44e967ef175fff9c3837fc..2cf04fa568a73fadcdc0cef3c4c8a1f8a105140e 100644
--- a/src/parsing/parser-base.h
+++ b/src/parsing/parser-base.h
@@ -1676,11 +1676,14 @@ typename ParserBase<Traits>::ExpressionT ParserBase<Traits>::ParseExpression(
// AssignmentExpression
// Expression ',' AssignmentExpression
- ExpressionClassifier binding_classifier(this);
- ExpressionT result =
- this->ParseAssignmentExpression(accept_IN, &binding_classifier, CHECK_OK);
- classifier->Accumulate(&binding_classifier,
- ExpressionClassifier::AllProductions);
+ ExpressionT result = this->EmptyExpression();
+ {
+ ExpressionClassifier binding_classifier(this);
+ result = this->ParseAssignmentExpression(accept_IN, &binding_classifier,
+ CHECK_OK);
+ classifier->Accumulate(&binding_classifier,
+ ExpressionClassifier::AllProductions);
+ }
bool is_simple_parameter_list = this->IsIdentifier(result);
bool seen_rest = false;
while (peek() == Token::COMMA) {
@@ -3343,7 +3346,6 @@ ParserBase<Traits>::ParseArrowFunctionLiteral(
} else {
// Single-expression body
int pos = position();
- ExpressionClassifier classifier(this);
DCHECK(ReturnExprContext::kInsideValidBlock ==
function_state_->return_expr_context());
ReturnExprScope allow_tail_calls(
@@ -3351,6 +3353,7 @@ ParserBase<Traits>::ParseArrowFunctionLiteral(
body = this->NewStatementList(1, zone());
this->AddParameterInitializationBlock(formal_parameters, body, is_async,
CHECK_OK);
+ ExpressionClassifier classifier(this);
nickie 2016/06/21 08:13:24 (Copying commend from previous PS.) This change w
if (is_async) {
this->ParseAsyncArrowSingleExpressionBody(body, accept_IN, &classifier,
pos, CHECK_OK);
« no previous file with comments | « no previous file | test/mjsunit/harmony/regress/regress-crbug-621111.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698