| Index: src/ast/ast.h
|
| diff --git a/src/ast/ast.h b/src/ast/ast.h
|
| index a238eacd11a9599ef48836e24bed7e6285245cb6..85bf2f6d9497875c1428cf3815cd26239ae97c05 100644
|
| --- a/src/ast/ast.h
|
| +++ b/src/ast/ast.h
|
| @@ -475,10 +475,18 @@ class DoExpression final : public Expression {
|
| void set_block(Block* b) { block_ = b; }
|
| VariableProxy* result() { return result_; }
|
| void set_result(VariableProxy* v) { result_ = v; }
|
| + FunctionLiteral* represented_function() { return represented_function_; }
|
| + void set_represented_function(FunctionLiteral* f) {
|
| + represented_function_ = f;
|
| + }
|
| + bool IsAnonymousFunctionDefinition() const;
|
|
|
| protected:
|
| DoExpression(Zone* zone, Block* block, VariableProxy* result, int pos)
|
| - : Expression(zone, pos, kDoExpression), block_(block), result_(result) {
|
| + : Expression(zone, pos, kDoExpression),
|
| + block_(block),
|
| + result_(result),
|
| + represented_function_(nullptr) {
|
| DCHECK_NOT_NULL(block_);
|
| DCHECK_NOT_NULL(result_);
|
| }
|
| @@ -489,6 +497,7 @@ class DoExpression final : public Expression {
|
|
|
| Block* block_;
|
| VariableProxy* result_;
|
| + FunctionLiteral* represented_function_;
|
| };
|
|
|
|
|
| @@ -2716,7 +2725,6 @@ class ClassLiteral final : public Expression {
|
|
|
| DECLARE_NODE_TYPE(ClassLiteral)
|
|
|
| - Scope* scope() const { return scope_; }
|
| VariableProxy* class_variable_proxy() const { return class_variable_proxy_; }
|
| Expression* extends() const { return extends_; }
|
| void set_extends(Expression* e) { extends_ = e; }
|
| @@ -2752,18 +2760,13 @@ class ClassLiteral final : public Expression {
|
| FeedbackVectorSlot PrototypeSlot() const { return prototype_slot_; }
|
| FeedbackVectorSlot ProxySlot() const { return proxy_slot_; }
|
|
|
| - bool IsAnonymousFunctionDefinition() const {
|
| - return constructor()->raw_name()->length() == 0;
|
| - }
|
| -
|
| protected:
|
| - ClassLiteral(Zone* zone, Scope* scope, VariableProxy* class_variable_proxy,
|
| + ClassLiteral(Zone* zone, VariableProxy* class_variable_proxy,
|
| Expression* extends, FunctionLiteral* constructor,
|
| ZoneList<Property*>* properties, int start_position,
|
| int end_position)
|
| : Expression(zone, start_position, kClassLiteral),
|
| end_position_(end_position),
|
| - scope_(scope),
|
| class_variable_proxy_(class_variable_proxy),
|
| extends_(extends),
|
| constructor_(constructor),
|
| @@ -2777,7 +2780,6 @@ class ClassLiteral final : public Expression {
|
| int end_position_;
|
| FeedbackVectorSlot prototype_slot_;
|
| FeedbackVectorSlot proxy_slot_;
|
| - Scope* scope_;
|
| VariableProxy* class_variable_proxy_;
|
| Expression* extends_;
|
| FunctionLiteral* constructor_;
|
| @@ -3458,14 +3460,13 @@ class AstNodeFactory final BASE_EMBEDDED {
|
| false);
|
| }
|
|
|
| - ClassLiteral* NewClassLiteral(Scope* scope, VariableProxy* proxy,
|
| - Expression* extends,
|
| + ClassLiteral* NewClassLiteral(VariableProxy* proxy, Expression* extends,
|
| FunctionLiteral* constructor,
|
| ZoneList<ObjectLiteral::Property*>* properties,
|
| int start_position, int end_position) {
|
| return new (local_zone_)
|
| - ClassLiteral(local_zone_, scope, proxy, extends, constructor,
|
| - properties, start_position, end_position);
|
| + ClassLiteral(local_zone_, proxy, extends, constructor, properties,
|
| + start_position, end_position);
|
| }
|
|
|
| NativeFunctionLiteral* NewNativeFunctionLiteral(const AstRawString* name,
|
|
|