Index: src/parsing/parser.h |
diff --git a/src/parsing/parser.h b/src/parsing/parser.h |
index 74fb5dd5b2d96c20a96e6dc2ddc8f0a745f6aa5f..2630a4a4c863bf8000b68c41a868c2a56c5e3e67 100644 |
--- a/src/parsing/parser.h |
+++ b/src/parsing/parser.h |
@@ -152,7 +152,8 @@ struct ParserTypes<Parser> { |
typedef ObjectLiteral::Property* ObjectLiteralProperty; |
typedef ClassLiteral::Property* ClassLiteralProperty; |
typedef ZoneList<v8::internal::Expression*>* ExpressionList; |
- typedef ZoneList<ObjectLiteral::Property*>* PropertyList; |
+ typedef ZoneList<ObjectLiteral::Property*>* ObjectPropertyList; |
+ typedef ZoneList<ClassLiteral::Property*>* ClassPropertyList; |
typedef ParserFormalParameters FormalParameters; |
typedef v8::internal::Statement* Statement; |
typedef ZoneList<v8::internal::Statement*>* StatementList; |
@@ -274,9 +275,6 @@ class Parser : public ParserBase<Parser> { |
Statement* ParseAsyncFunctionDeclaration(ZoneList<const AstRawString*>* names, |
bool default_export, bool* ok); |
Expression* ParseAsyncFunctionExpression(bool* ok); |
- Statement* ParseClassDeclaration(ZoneList<const AstRawString*>* names, |
- bool default_export, bool* ok); |
- Statement* ParseNativeDeclaration(bool* ok); |
Block* BuildInitializationBlock(DeclarationParsingResult* parsing_result, |
ZoneList<const AstRawString*>* names, |
bool* ok); |
@@ -302,6 +300,21 @@ class Parser : public ParserBase<Parser> { |
FunctionLiteral* function, int pos, |
bool is_generator, bool is_async, |
ZoneList<const AstRawString*>* names, bool* ok); |
+ V8_INLINE Statement* DeclareClass(const AstRawString* variable_name, |
+ Expression* value, |
+ ZoneList<const AstRawString*>* names, |
+ int class_token_pos, bool* ok); |
+ V8_INLINE void DeclareClassVariable(const AstRawString* name, |
+ Scope* block_scope, ClassInfo* class_info, |
+ int class_token_pos, bool* ok); |
+ V8_INLINE void DeclareClassProperty(const AstRawString* class_name, |
+ ClassLiteralProperty* property, |
+ ClassInfo* class_info, bool* ok); |
+ V8_INLINE Expression* RewriteClassLiteral(const AstRawString* name, |
+ ClassInfo* class_info, int pos, |
+ bool* ok); |
+ V8_INLINE Statement* DeclareNative(const AstRawString* name, int pos, |
+ bool* ok); |
Expression* ParseYieldStarExpression(bool* ok); |
@@ -428,11 +441,6 @@ class Parser : public ParserBase<Parser> { |
FunctionLiteral* SynthesizeClassFieldInitializer(int count); |
FunctionLiteral* InsertClassFieldInitializer(FunctionLiteral* constructor); |
- Expression* ParseClassLiteral(const AstRawString* name, |
- Scanner::Location class_name_location, |
- bool name_is_strict_reserved, int pos, |
- bool* ok); |
- |
// Get odd-ball literals. |
Literal* GetLiteralUndefined(int position); |
@@ -754,6 +762,11 @@ class Parser : public ParserBase<Parser> { |
fni_->AddFunction(func_to_infer); |
} |
+ V8_INLINE void Infer() { |
+ DCHECK_NOT_NULL(fni_); |
+ fni_->Infer(); |
+ } |
+ |
// If we assign a function literal to a property we pretenure the |
// literal so it can be added as a constant function property. |
V8_INLINE static void CheckAssigningFunctionLiteralToProperty( |
@@ -947,7 +960,7 @@ class Parser : public ParserBase<Parser> { |
V8_INLINE ZoneList<Expression*>* NewExpressionList(int size) const { |
return new (zone()) ZoneList<Expression*>(size, zone()); |
} |
- V8_INLINE ZoneList<ObjectLiteral::Property*>* NewPropertyList( |
+ V8_INLINE ZoneList<ObjectLiteral::Property*>* NewObjectPropertyList( |
int size) const { |
return new (zone()) ZoneList<ObjectLiteral::Property*>(size, zone()); |
} |