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

Unified Diff: src/parsing/parser.cc

Issue 2271063002: Centralize and standardize logic for ExpressionClassifier accumulation (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased Created 4 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
Index: src/parsing/parser.cc
diff --git a/src/parsing/parser.cc b/src/parsing/parser.cc
index 5fabd8e25f122b960a3f72a47d400149fded36d4..7b26c8009f751177995abcc196e5eb9988e719fa 100644
--- a/src/parsing/parser.cc
+++ b/src/parsing/parser.cc
@@ -4734,8 +4734,8 @@ Expression* Parser::ParseClassLiteral(ExpressionClassifier* classifier,
CheckNoTailCallExpressions(&extends_classifier, CHECK_OK);
RewriteNonPattern(&extends_classifier, CHECK_OK);
if (classifier != nullptr) {
- classifier->Accumulate(&extends_classifier,
- ExpressionClassifier::ExpressionProductions);
+ classifier->AccumulateFormalParameterContainmentErrors(
+ &extends_classifier);
}
} else {
block_state.set_start_position(scanner()->location().end_pos);
@@ -4763,8 +4763,8 @@ Expression* Parser::ParseClassLiteral(ExpressionClassifier* classifier,
&has_seen_constructor, &property_classifier, &property_name, CHECK_OK);
RewriteNonPattern(&property_classifier, CHECK_OK);
if (classifier != nullptr) {
- classifier->Accumulate(&property_classifier,
- ExpressionClassifier::ExpressionProductions);
+ classifier->AccumulateFormalParameterContainmentErrors(
+ &property_classifier);
}
if (has_seen_constructor && constructor == nullptr) {

Powered by Google App Engine
This is Rietveld 408576698