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

Unified Diff: src/parsing/preparser.h

Issue 2289663002: [parser] Hide expression classifiers in parser implementation (Closed)
Patch Set: 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/preparser.h
diff --git a/src/parsing/preparser.h b/src/parsing/preparser.h
index 8d739480825a35c2ec03ad813af9870ad02f6b35..7b126d287492fb143052fce5d5f0bc02a8d96b2c 100644
--- a/src/parsing/preparser.h
+++ b/src/parsing/preparser.h
@@ -782,8 +782,7 @@ class PreParser : public ParserBase<PreParser> {
void ParseLazyFunctionLiteralBody(bool* ok,
Scanner::BookmarkScope* bookmark = nullptr);
- PreParserExpression ParseClassLiteral(ExpressionClassifier* classifier,
- PreParserIdentifier name,
+ PreParserExpression ParseClassLiteral(PreParserIdentifier name,
Scanner::Location class_name_location,
bool name_is_strict_reserved, int pos,
bool* ok);
@@ -805,7 +804,6 @@ class PreParser : public ParserBase<PreParser> {
void ParseAsyncArrowSingleExpressionBody(PreParserStatementList body,
bool accept_IN,
- ExpressionClassifier* classifier,
int pos, bool* ok);
V8_INLINE PreParserExpressionList
@@ -841,9 +839,7 @@ class PreParser : public ParserBase<PreParser> {
int pos) {
return PreParserExpression::Default();
}
- V8_INLINE void RewriteNonPattern(ExpressionClassifier* classifier, bool* ok) {
- ValidateExpression(classifier, ok);
- }
+ V8_INLINE void RewriteNonPattern(bool* ok) { ValidateExpression(ok); }
V8_INLINE void QueueDestructuringAssignmentForRewriting(
PreParserExpression assignment) {}
@@ -1097,9 +1093,8 @@ class PreParser : public ParserBase<PreParser> {
}
V8_INLINE void DeclareFormalParameter(DeclarationScope* scope,
- PreParserIdentifier parameter,
- ExpressionClassifier* classifier) {
- if (!classifier->is_simple_parameter_list()) {
+ PreParserIdentifier parameter) {
+ if (!classifier()->is_simple_parameter_list()) {
scope->SetHasNonSimpleParameters();
}
}

Powered by Google App Engine
This is Rietveld 408576698