| Index: src/parsing/preparser.cc
|
| diff --git a/src/parsing/preparser.cc b/src/parsing/preparser.cc
|
| index 37beecf5a40aedfc577c3b2432a7085081e26f58..8bd8d6e7b6b584b6963e1cb622fb72ba76be02c4 100644
|
| --- a/src/parsing/preparser.cc
|
| +++ b/src/parsing/preparser.cc
|
| @@ -133,18 +133,6 @@ PreParser::Statement PreParser::ParseAsyncFunctionDeclaration(
|
| return ParseHoistableDeclaration(pos, flags, names, default_export, ok);
|
| }
|
|
|
| -PreParser::Statement PreParser::ParseClassDeclaration(
|
| - ZoneList<const AstRawString*>* names, bool default_export, bool* ok) {
|
| - int pos = position();
|
| - bool is_strict_reserved = false;
|
| - Identifier name =
|
| - ParseIdentifierOrStrictReservedWord(&is_strict_reserved, CHECK_OK);
|
| - ExpressionClassifier no_classifier(this);
|
| - ParseClassLiteral(name, scanner()->location(), is_strict_reserved, pos,
|
| - CHECK_OK);
|
| - return Statement::Default();
|
| -}
|
| -
|
| PreParser::Statement PreParser::ParseFunctionDeclaration(bool* ok) {
|
| Consume(Token::FUNCTION);
|
| int pos = position();
|
| @@ -277,58 +265,6 @@ PreParser::LazyParsingResult PreParser::ParseLazyFunctionLiteralBody(
|
| return kLazyParsingComplete;
|
| }
|
|
|
| -PreParserExpression PreParser::ParseClassLiteral(
|
| - PreParserIdentifier name, Scanner::Location class_name_location,
|
| - bool name_is_strict_reserved, int pos, bool* ok) {
|
| - // All parts of a ClassDeclaration and ClassExpression are strict code.
|
| - if (name_is_strict_reserved) {
|
| - ReportMessageAt(class_name_location,
|
| - MessageTemplate::kUnexpectedStrictReserved);
|
| - *ok = false;
|
| - return EmptyExpression();
|
| - }
|
| - if (IsEvalOrArguments(name)) {
|
| - ReportMessageAt(class_name_location, MessageTemplate::kStrictEvalArguments);
|
| - *ok = false;
|
| - return EmptyExpression();
|
| - }
|
| -
|
| - LanguageMode class_language_mode = language_mode();
|
| - BlockState block_state(&scope_state_);
|
| - scope()->SetLanguageMode(
|
| - static_cast<LanguageMode>(class_language_mode | STRICT));
|
| - // TODO(marja): Make PreParser use scope names too.
|
| - // this->scope()->SetScopeName(name);
|
| -
|
| - bool has_extends = Check(Token::EXTENDS);
|
| - if (has_extends) {
|
| - ExpressionClassifier extends_classifier(this);
|
| - ParseLeftHandSideExpression(CHECK_OK);
|
| - CheckNoTailCallExpressions(CHECK_OK);
|
| - ValidateExpression(CHECK_OK);
|
| - impl()->AccumulateFormalParameterContainmentErrors();
|
| - }
|
| -
|
| - ClassLiteralChecker checker(this);
|
| - bool has_seen_constructor = false;
|
| -
|
| - Expect(Token::LBRACE, CHECK_OK);
|
| - while (peek() != Token::RBRACE) {
|
| - if (Check(Token::SEMICOLON)) continue;
|
| - bool is_computed_name = false; // Classes do not care about computed
|
| - // property names here.
|
| - ExpressionClassifier property_classifier(this);
|
| - ParseClassPropertyDefinition(&checker, has_extends, &is_computed_name,
|
| - &has_seen_constructor, CHECK_OK);
|
| - ValidateExpression(CHECK_OK);
|
| - impl()->AccumulateFormalParameterContainmentErrors();
|
| - }
|
| -
|
| - Expect(Token::RBRACE, CHECK_OK);
|
| -
|
| - return Expression::Default();
|
| -}
|
| -
|
| void PreParser::ParseAsyncArrowSingleExpressionBody(PreParserStatementList body,
|
| bool accept_IN, int pos,
|
| bool* ok) {
|
|
|