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

Unified Diff: runtime/vm/ast.h

Issue 9592031: Eliminate IncrOpStaticFieldNode, replace a set of nodes. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 9 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/parser.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/ast.h
===================================================================
--- runtime/vm/ast.h (revision 5046)
+++ runtime/vm/ast.h (working copy)
@@ -26,7 +26,6 @@
V(UnaryOpNode, "unaryop") \
V(IncrOpLocalNode, "incr local") \
V(IncrOpInstanceFieldNode, "incr instance field") \
- V(IncrOpStaticFieldNode, "incr static field") \
V(IncrOpIndexedNode, "incr indexed") \
V(ConditionalExprNode, "?:") \
V(IfNode, "if") \
@@ -759,63 +758,6 @@
};
-class IncrOpStaticFieldNode : public AstNode {
- public:
- // Access the static field via a call to static getter.
- IncrOpStaticFieldNode(intptr_t token_index,
- Token::Kind kind,
- bool prefix,
- const Class& field_class,
- const String& field_name)
- : AstNode(token_index),
- kind_(kind),
- prefix_(prefix),
- field_class_(field_class),
- field_name_(field_name),
- field_(Field::ZoneHandle()) {
- ASSERT(field_class_.IsZoneHandle());
- ASSERT(field_name_.IsZoneHandle());
- ASSERT(kind_ == Token::kINCR || kind_ == Token::kDECR);
- }
-
- // Access the static field directly.
- IncrOpStaticFieldNode(intptr_t token_index,
- Token::Kind kind,
- bool prefix,
- const Field& field)
- : AstNode(token_index),
- kind_(kind),
- prefix_(prefix),
- field_class_(Class::ZoneHandle()),
- field_name_(String::ZoneHandle()),
- field_(field) {
- ASSERT(field_.IsZoneHandle());
- ASSERT(kind_ == Token::kINCR || kind_ == Token::kDECR);
- }
-
- Token::Kind kind() const { return kind_; }
- bool prefix() const { return prefix_; }
- const Class& field_class() const { return field_class_; }
- const String& field_name() const { return field_name_; }
- const Field& field() const { return field_; }
-
- virtual void VisitChildren(AstNodeVisitor* visitor) const { }
-
- virtual const char* Name() const;
-
- DECLARE_COMMON_NODE_FUNCTIONS(IncrOpStaticFieldNode);
-
- private:
- const Token::Kind kind_;
- const bool prefix_;
- const Class& field_class_;
- const String& field_name_;
- const Field& field_;
-
- DISALLOW_IMPLICIT_CONSTRUCTORS(IncrOpStaticFieldNode);
-};
-
-
class IncrOpIndexedNode : public AstNode {
public:
IncrOpIndexedNode(intptr_t token_index,
« no previous file with comments | « no previous file | runtime/vm/ast.cc » ('j') | runtime/vm/parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698