| Index: src/parsing/preparser.h
|
| diff --git a/src/parsing/preparser.h b/src/parsing/preparser.h
|
| index 3115858c59288a60214fea30552d723db1c4b40e..d2f3cc38fe6983c0fc4d25893ce5f2db01f9ce45 100644
|
| --- a/src/parsing/preparser.h
|
| +++ b/src/parsing/preparser.h
|
| @@ -613,6 +613,7 @@ struct ParserTypes<PreParser> {
|
| typedef PreParserIdentifier FormalParameter;
|
| typedef PreParserFormalParameters FormalParameters;
|
| typedef PreParserStatementList StatementList;
|
| + typedef PreParserStatement Block;
|
|
|
| // For constructing objects returned by the traversing functions.
|
| typedef PreParserFactory Factory;
|
| @@ -734,12 +735,6 @@ class PreParser : public ParserBase<PreParser> {
|
| Statement ParseBlock(bool* ok);
|
| Statement ParseVariableStatement(VariableDeclarationContext var_context,
|
| bool* ok);
|
| - Statement ParseVariableDeclarations(VariableDeclarationContext var_context,
|
| - int* num_decl, bool* is_lexical,
|
| - bool* is_binding_pattern,
|
| - Scanner::Location* first_initializer_loc,
|
| - Scanner::Location* bindings_loc,
|
| - bool* ok);
|
| Statement ParseExpressionOrLabelledStatement(
|
| AllowLabelledFunctionStatement allow_function, bool* ok);
|
| Statement ParseIfStatement(bool* ok);
|
| @@ -836,6 +831,12 @@ class PreParser : public ParserBase<PreParser> {
|
| }
|
| V8_INLINE void RewriteNonPattern(bool* ok) { ValidateExpression(ok); }
|
|
|
| + V8_INLINE void DeclareAndInitializeVariables(
|
| + PreParserStatement block,
|
| + const DeclarationDescriptor* declaration_descriptor,
|
| + const DeclarationParsingResult::Declaration* declaration,
|
| + ZoneList<const AstRawString*>* names, bool* ok) {}
|
| +
|
| V8_INLINE void QueueDestructuringAssignmentForRewriting(
|
| PreParserExpression assignment) {}
|
| V8_INLINE void QueueNonPatternForRewriting(PreParserExpression expr,
|
| @@ -915,6 +916,12 @@ class PreParser : public ParserBase<PreParser> {
|
| UNREACHABLE();
|
| }
|
|
|
| + V8_INLINE static void PushVariableName(FuncNameInferrer* fni,
|
| + PreParserIdentifier id) {
|
| + // PreParser should not use FuncNameInferrer.
|
| + UNREACHABLE();
|
| + }
|
| +
|
| V8_INLINE void PushPropertyName(FuncNameInferrer* fni,
|
| PreParserExpression expression) {
|
| // PreParser should not use FuncNameInferrer.
|
| @@ -1009,6 +1016,9 @@ class PreParser : public ParserBase<PreParser> {
|
| V8_INLINE static PreParserExpressionList NullExpressionList() {
|
| return PreParserExpressionList();
|
| }
|
| + V8_INLINE static PreParserStatement NullBlock() {
|
| + return PreParserStatement::Default();
|
| + }
|
| V8_INLINE PreParserIdentifier EmptyIdentifierString() const {
|
| return PreParserIdentifier::Default();
|
| }
|
| @@ -1018,6 +1028,10 @@ class PreParser : public ParserBase<PreParser> {
|
| return PreParserExpression::Default();
|
| }
|
|
|
| + V8_INLINE PreParserExpression GetLiteralUndefined(int position) {
|
| + return PreParserExpression::Default();
|
| + }
|
| +
|
| // Producing data during the recursive descent.
|
| PreParserIdentifier GetSymbol() const;
|
|
|
| @@ -1079,6 +1093,12 @@ class PreParser : public ParserBase<PreParser> {
|
| return PreParserStatementList();
|
| }
|
|
|
| + V8_INLINE static PreParserStatement NewBlock(
|
| + ZoneList<const AstRawString*>* labels, int capacity,
|
| + bool ignore_completion_value, int pos) {
|
| + return PreParserStatement::Default();
|
| + }
|
| +
|
| V8_INLINE void AddParameterInitializationBlock(
|
| const PreParserFormalParameters& parameters, PreParserStatementList body,
|
| bool is_async, bool* ok) {}
|
|
|