Index: runtime/vm/ast.h |
=================================================================== |
--- runtime/vm/ast.h (revision 14156) |
+++ runtime/vm/ast.h (working copy) |
@@ -1114,14 +1114,23 @@ |
class LoadIndexedNode : public AstNode { |
public: |
- LoadIndexedNode(intptr_t token_pos, AstNode* array, AstNode* index) |
- : AstNode(token_pos), array_(array), index_expr_(index) { |
+ LoadIndexedNode(intptr_t token_pos, |
+ AstNode* array, |
+ AstNode* index, |
+ const Class& super_class) |
+ : AstNode(token_pos), |
+ array_(array), |
+ index_expr_(index), |
+ super_class_(super_class) { |
ASSERT(array_ != NULL); |
ASSERT(index_expr_ != NULL); |
+ ASSERT(super_class_.IsZoneHandle()); |
} |
AstNode* array() const { return array_; } |
AstNode* index_expr() const { return index_expr_; } |
+ const Class& super_class() const { return super_class_; } |
+ bool IsSuperLoad() const { return !super_class_.IsNull(); } |
virtual void VisitChildren(AstNodeVisitor* visitor) const { |
array()->Visit(visitor); |
@@ -1135,6 +1144,7 @@ |
private: |
AstNode* array_; |
AstNode* index_expr_; |
+ const Class& super_class_; |
DISALLOW_IMPLICIT_CONSTRUCTORS(LoadIndexedNode); |
}; |
@@ -1142,16 +1152,26 @@ |
class StoreIndexedNode : public AstNode { |
public: |
StoreIndexedNode(intptr_t token_pos, |
- AstNode* array, AstNode* index, AstNode* value) |
- : AstNode(token_pos), array_(array), index_expr_(index), value_(value) { |
+ AstNode* array, |
+ AstNode* index, |
+ AstNode* value, |
+ const Class& super_class) |
+ : AstNode(token_pos), |
+ array_(array), |
+ index_expr_(index), |
+ value_(value), |
+ super_class_(super_class) { |
ASSERT(array_ != NULL); |
ASSERT(index_expr_ != NULL); |
ASSERT(value_ != NULL); |
+ ASSERT(super_class_.IsZoneHandle()); |
} |
AstNode* array() const { return array_; } |
AstNode* index_expr() const { return index_expr_; } |
AstNode* value() const { return value_; } |
+ const Class& super_class() const { return super_class_; } |
+ bool IsSuperStore() const { return !super_class_.IsNull(); } |
virtual void VisitChildren(AstNodeVisitor* visitor) const { |
array()->Visit(visitor); |
@@ -1165,6 +1185,7 @@ |
AstNode* array_; |
AstNode* index_expr_; |
AstNode* value_; |
+ const Class& super_class_; |
DISALLOW_IMPLICIT_CONSTRUCTORS(StoreIndexedNode); |
}; |