Chromium Code Reviews| Index: src/ast.h |
| diff --git a/src/ast.h b/src/ast.h |
| index e18fdc79c71ffad36d3af96e65389775b039b6c9..6637c5e8115217a610d76f80ff9a1fba91c944ad 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,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: |
|
arv (Not doing code reviews)
2014/08/15 19:41:07
Empty line before protected.
Dmitry Lomov (no reviews)
2014/08/15 22:11:41
Done.
|
| + 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: |