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

Unified Diff: src/parsing/parser.cc

Issue 1708193003: Reduce the memory footprint of expression classifiers (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Introduce implementation-limit error (too many non-pattern rewrites) 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 | « src/parsing/parser.h ('k') | src/parsing/parser-base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parser.cc
diff --git a/src/parsing/parser.cc b/src/parsing/parser.cc
index b74c027842ecf174e339c0aeaea41844749ce9a5..2da36d83bf799b2b52fbdece1d72d488980aa9b8 100644
--- a/src/parsing/parser.cc
+++ b/src/parsing/parser.cc
@@ -2518,7 +2518,6 @@ Statement* Parser::ParseExpressionOrLabelledStatement(
ReportUnexpectedToken(Next());
*ok = false;
return nullptr;
-
default:
break;
}
@@ -5602,13 +5601,19 @@ Expression* ParserTraits::RewriteAwaitExpression(Expression* value, int pos) {
pos);
}
-Zone* ParserTraits::zone() const {
- return parser_->function_state_->scope()->zone();
+ZoneList<Expression*>* ParserTraits::GetNonPatternList() const {
+ return parser_->function_state_->non_patterns_to_rewrite();
}
-ZoneList<Expression*>* ParserTraits::GetNonPatternList() const {
- return parser_->function_state_->non_patterns_to_rewrite();
+ZoneList<typename ParserTraits::Type::ExpressionClassifier::Error>*
+ParserTraits::GetReportedErrorList() const {
+ return parser_->function_state_->GetReportedErrorList();
+}
+
+
+Zone* ParserTraits::zone() const {
+ return parser_->function_state_->scope()->zone();
}
@@ -5825,9 +5830,9 @@ void ParserTraits::QueueDestructuringAssignmentForRewriting(Expression* expr) {
}
-void ParserTraits::QueueNonPatternForRewriting(Expression* expr) {
+void ParserTraits::QueueNonPatternForRewriting(Expression* expr, bool* ok) {
DCHECK(expr->IsRewritableExpression());
- parser_->function_state_->AddNonPatternForRewriting(expr);
+ parser_->function_state_->AddNonPatternForRewriting(expr, ok);
}
« no previous file with comments | « src/parsing/parser.h ('k') | src/parsing/parser-base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698