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

Unified Diff: runtime/vm/ast.h

Issue 471283002: Runtime support for evaluation of static field initializer expressions (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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
Index: runtime/vm/ast.h
===================================================================
--- runtime/vm/ast.h (revision 39313)
+++ runtime/vm/ast.h (working copy)
@@ -42,6 +42,7 @@
V(ConstructorCall) \
V(InstanceGetter) \
V(InstanceSetter) \
+ V(InitStaticField) \
V(StaticGetter) \
V(StaticSetter) \
V(NativeBody) \
@@ -1391,6 +1392,26 @@
};
+class InitStaticFieldNode : public AstNode {
+ public:
+ InitStaticFieldNode(intptr_t token_pos, const Field& field)
+ : AstNode(token_pos), field_(field) {
+ ASSERT(field_.IsZoneHandle());
+ }
+
+ const Field& field() const { return field_; }
+
+ virtual void VisitChildren(AstNodeVisitor* visitor) const { }
+
+ DECLARE_COMMON_NODE_FUNCTIONS(InitStaticFieldNode);
+
+ private:
+ const Field& field_;
+
+ DISALLOW_COPY_AND_ASSIGN(InitStaticFieldNode);
+};
+
+
class StaticGetterNode : public AstNode {
public:
StaticGetterNode(intptr_t token_pos,

Powered by Google App Engine
This is Rietveld 408576698