Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(285)

Unified Diff: runtime/vm/ast.h

Issue 11267027: More fixes for super[] (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/ast.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
};
« no previous file with comments | « no previous file | runtime/vm/ast.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698