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

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') | runtime/vm/flow_graph_builder.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/ast.h
===================================================================
--- runtime/vm/ast.h (revision 14146)
+++ runtime/vm/ast.h (working copy)
@@ -1114,14 +1114,22 @@
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);
regis 2012/10/26 22:04:37 ASSERT(super_class_.IsZoneHandle());
hausner 2012/10/26 22:25:14 Done.
}
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 +1143,7 @@
private:
AstNode* array_;
AstNode* index_expr_;
+ const Class& super_class_;
DISALLOW_IMPLICIT_CONSTRUCTORS(LoadIndexedNode);
};
@@ -1142,8 +1151,15 @@
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);
regis 2012/10/26 22:04:37 ASSERT(super_class_.IsZoneHandle());
hausner 2012/10/26 22:25:14 Done.
@@ -1152,6 +1168,8 @@
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 +1183,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') | runtime/vm/flow_graph_builder.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698