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

Unified Diff: runtime/vm/ast.h

Issue 10849004: Fix super getter/setter (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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/ast.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/ast.h
===================================================================
--- runtime/vm/ast.h (revision 10362)
+++ runtime/vm/ast.h (working copy)
@@ -1239,12 +1239,14 @@
public:
StaticGetterNode(intptr_t token_pos,
AstNode* receiver, // Null if called from static context.
srdjan 2012/08/08 16:44:34 Change comment that it is maybe non-NULL even in s
hausner 2012/08/08 17:42:02 super getters are dynamic functions, so it's not a
+ bool is_super_getter,
const Class& cls,
const String& field_name)
: AstNode(token_pos),
receiver_(receiver),
cls_(cls),
- field_name_(field_name) {
+ field_name_(field_name),
+ is_super_getter_(is_super_getter) {
ASSERT(cls_.IsZoneHandle());
ASSERT(field_name_.IsZoneHandle());
ASSERT(field_name_.IsSymbol());
@@ -1256,6 +1258,7 @@
AstNode* receiver() const { return receiver_; }
const Class& cls() const { return cls_; }
const String& field_name() const { return field_name_; }
+ const bool is_super_getter() const { return is_super_getter_; }
srdjan 2012/08/08 16:44:34 s/const bool/bool/
hausner 2012/08/08 17:42:02 Done.
virtual void VisitChildren(AstNodeVisitor* visitor) const { }
@@ -1269,6 +1272,7 @@
AstNode* receiver_;
const Class& cls_;
const String& field_name_;
+ bool is_super_getter_;
srdjan 2012/08/08 16:44:34 const
hausner 2012/08/08 17:42:02 Done.
DISALLOW_IMPLICIT_CONSTRUCTORS(StaticGetterNode);
};
@@ -1277,10 +1281,12 @@
class StaticSetterNode : public AstNode {
public:
StaticSetterNode(intptr_t token_pos,
+ AstNode* receiver,
srdjan 2012/08/08 16:44:34 In a brief comment explain the need for receiver.
hausner 2012/08/08 17:42:02 Done.
const Class& cls,
const String& field_name,
AstNode* value)
: AstNode(token_pos),
+ receiver_(receiver),
cls_(cls),
field_name_(field_name),
value_(value) {
@@ -1289,6 +1295,7 @@
ASSERT(value_ != NULL);
}
+ AstNode* receiver() const { return receiver_; }
const Class& cls() const { return cls_; }
const String& field_name() const { return field_name_; }
AstNode* value() const { return value_; }
@@ -1300,6 +1307,7 @@
DECLARE_COMMON_NODE_FUNCTIONS(StaticSetterNode);
private:
+ AstNode* receiver_;
const Class& cls_;
const String& field_name_;
AstNode* value_;
« no previous file with comments | « no previous file | runtime/vm/ast.cc » ('j') | runtime/vm/ast.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698