Chromium Code Reviews| Index: src/parsing/parser.h |
| diff --git a/src/parsing/parser.h b/src/parsing/parser.h |
| index 38695495545aa9d69e4d6dee9adb7b42fd748472..1624014ecaf64080784c7330829a3d4c0a11e031 100644 |
| --- a/src/parsing/parser.h |
| +++ b/src/parsing/parser.h |
| @@ -149,6 +149,7 @@ struct ParserTypes<Parser> { |
| typedef v8::internal::Expression* Expression; |
| typedef v8::internal::FunctionLiteral* FunctionLiteral; |
| typedef ObjectLiteral::Property* ObjectLiteralProperty; |
| + typedef ClassLiteral::Property* ClassLiteralProperty; |
| typedef ZoneList<v8::internal::Expression*>* ExpressionList; |
| typedef ZoneList<ObjectLiteral::Property*>* PropertyList; |
| typedef ParserFormalParameters FormalParameters; |
| @@ -707,6 +708,11 @@ class Parser : public ParserBase<Parser> { |
| return property->value(); |
| } |
| + V8_INLINE static Expression* GetPropertyValue( |
|
adamk
2016/09/01 21:18:23
Can't you just take a LiteralProperty* instead?
bakkot
2016/09/01 23:24:31
Whoops. Done.
|
| + ClassLiteral::Property* property) { |
| + return property->value(); |
| + } |
| + |
| // Functions for encapsulating the differences between parsing and preparsing; |
| // operations interleaved with the recursive descent. |
| V8_INLINE static void PushLiteralName(FuncNameInferrer* fni, |
| @@ -837,6 +843,9 @@ class Parser : public ParserBase<Parser> { |
| V8_INLINE static ObjectLiteralProperty* EmptyObjectLiteralProperty() { |
| return nullptr; |
| } |
| + V8_INLINE static ClassLiteralProperty* EmptyClassLiteralProperty() { |
| + return nullptr; |
| + } |
| V8_INLINE static FunctionLiteral* EmptyFunctionLiteral() { return nullptr; } |
| V8_INLINE static Block* NullBlock() { return nullptr; } |
| @@ -912,6 +921,10 @@ class Parser : public ParserBase<Parser> { |
| int size) const { |
| return new (zone()) ZoneList<ObjectLiteral::Property*>(size, zone()); |
| } |
| + V8_INLINE ZoneList<ClassLiteral::Property*>* NewClassPropertyList( |
| + int size) const { |
| + return new (zone()) ZoneList<ClassLiteral::Property*>(size, zone()); |
| + } |
| V8_INLINE ZoneList<Statement*>* NewStatementList(int size) const { |
| return new (zone()) ZoneList<Statement*>(size, zone()); |
| } |
| @@ -992,6 +1005,8 @@ class Parser : public ParserBase<Parser> { |
| void SetFunctionNameFromPropertyName(ObjectLiteralProperty* property, |
| const AstRawString* name); |
| + void SetFunctionNameFromPropertyName(ClassLiteralProperty* property, |
| + const AstRawString* name); |
| void SetFunctionNameFromIdentifierRef(Expression* value, |
| Expression* identifier); |