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

Unified Diff: compiler/java/com/google/dart/compiler/ast/DartVariableStatement.java

Issue 9600049: Use NodeList where possible. (Closed) Base URL: https://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
Index: compiler/java/com/google/dart/compiler/ast/DartVariableStatement.java
diff --git a/compiler/java/com/google/dart/compiler/ast/DartVariableStatement.java b/compiler/java/com/google/dart/compiler/ast/DartVariableStatement.java
index e3d18e2978054665f8c774527c9d3ee8b025cf4b..7f5a5612548ecd6d310029d84b9192d08e432094 100644
--- a/compiler/java/com/google/dart/compiler/ast/DartVariableStatement.java
+++ b/compiler/java/com/google/dart/compiler/ast/DartVariableStatement.java
@@ -11,7 +11,7 @@ import java.util.List;
*/
public class DartVariableStatement extends DartStatement {
- private final List<DartVariable> vars;
+ private final NodeList<DartVariable> vars = NodeList.create(this);
private DartTypeNode typeNode;
private final Modifiers modifiers;
@@ -20,7 +20,7 @@ public class DartVariableStatement extends DartStatement {
}
public DartVariableStatement(List<DartVariable> vars, DartTypeNode type, Modifiers modifiers) {
- this.vars = becomeParentOf(vars);
+ this.vars.addAll(vars);
this.typeNode = becomeParentOf(type);
this.modifiers = modifiers;
}
@@ -42,7 +42,7 @@ public class DartVariableStatement extends DartStatement {
if (typeNode != null) {
typeNode.accept(visitor);
}
- visitor.visit(vars);
+ vars.accept(visitor);
}
@Override

Powered by Google App Engine
This is Rietveld 408576698