| Index: src/ast.h
|
| diff --git a/src/ast.h b/src/ast.h
|
| index e18fdc79c71ffad36d3af96e65389775b039b6c9..80075d90ab482e372b5489c53ac81567f841a73b 100644
|
| --- a/src/ast.h
|
| +++ b/src/ast.h
|
| @@ -73,27 +73,28 @@ namespace internal {
|
| V(TryFinallyStatement) \
|
| V(DebuggerStatement)
|
|
|
| -#define EXPRESSION_NODE_LIST(V) \
|
| - V(FunctionLiteral) \
|
| - V(NativeFunctionLiteral) \
|
| - V(Conditional) \
|
| - V(VariableProxy) \
|
| - V(Literal) \
|
| - V(RegExpLiteral) \
|
| - V(ObjectLiteral) \
|
| - V(ArrayLiteral) \
|
| - V(Assignment) \
|
| - V(Yield) \
|
| - V(Throw) \
|
| - V(Property) \
|
| - V(Call) \
|
| - V(CallNew) \
|
| - V(CallRuntime) \
|
| - V(UnaryOperation) \
|
| - V(CountOperation) \
|
| - V(BinaryOperation) \
|
| - V(CompareOperation) \
|
| - V(ThisFunction) \
|
| +#define EXPRESSION_NODE_LIST(V) \
|
| + V(FunctionLiteral) \
|
| + V(NativeFunctionLiteral) \
|
| + V(Conditional) \
|
| + V(VariableProxy) \
|
| + V(Literal) \
|
| + V(RegExpLiteral) \
|
| + V(ObjectLiteral) \
|
| + V(ArrayLiteral) \
|
| + V(Assignment) \
|
| + V(Yield) \
|
| + V(Throw) \
|
| + V(Property) \
|
| + V(Call) \
|
| + V(CallNew) \
|
| + V(CallRuntime) \
|
| + V(UnaryOperation) \
|
| + V(CountOperation) \
|
| + V(BinaryOperation) \
|
| + V(CompareOperation) \
|
| + V(ThisFunction) \
|
| + V(SuperReference) \
|
| V(CaseClause)
|
|
|
| #define AST_NODE_LIST(V) \
|
| @@ -1710,6 +1711,10 @@ class Property V8_FINAL : public Expression, public FeedbackSlotInterface {
|
| void mark_for_call() { is_for_call_ = true; }
|
| bool IsForCall() { return is_for_call_; }
|
|
|
| + bool IsSuperAccess() {
|
| + return obj()->IsSuperReference();
|
| + }
|
| +
|
| TypeFeedbackId PropertyFeedbackId() { return reuse(id()); }
|
|
|
| virtual int ComputeFeedbackSlotCount() { return FLAG_vector_ics ? 1 : 0; }
|
| @@ -2554,6 +2559,24 @@ class ThisFunction V8_FINAL : public Expression {
|
| explicit ThisFunction(Zone* zone, int pos): Expression(zone, pos) {}
|
| };
|
|
|
| +
|
| +class SuperReference V8_FINAL : public Expression {
|
| + public:
|
| + DECLARE_NODE_TYPE(SuperReference)
|
| +
|
| + VariableProxy* this_var() const { return this_var_; }
|
| +
|
| + TypeFeedbackId HomeObjectFeedbackId() { return reuse(id()); }
|
| + protected:
|
| + explicit SuperReference(Zone* zone, VariableProxy* this_var, int pos)
|
| + : Expression(zone, pos), this_var_(this_var) {
|
| + DCHECK(this_var->is_this());
|
| + }
|
| +
|
| + VariableProxy* this_var_;
|
| +};
|
| +
|
| +
|
| #undef DECLARE_NODE_TYPE
|
|
|
|
|
| @@ -3472,6 +3495,11 @@ class AstNodeFactory V8_FINAL BASE_EMBEDDED {
|
| VISIT_AND_RETURN(ThisFunction, fun)
|
| }
|
|
|
| + SuperReference* NewSuperReference(VariableProxy* this_var, int pos) {
|
| + SuperReference* super = new (zone_) SuperReference(zone_, this_var, pos);
|
| + VISIT_AND_RETURN(SuperReference, super);
|
| + }
|
| +
|
| #undef VISIT_AND_RETURN
|
|
|
| private:
|
|
|