Index: src/ast.h |
diff --git a/src/ast.h b/src/ast.h |
index e18fdc79c71ffad36d3af96e65389775b039b6c9..2b4d0f144ef8da284d4073dc6948c30d41b5f897 100644 |
--- a/src/ast.h |
+++ b/src/ast.h |
@@ -94,6 +94,7 @@ namespace internal { |
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,25 @@ 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 +3496,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: |