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

Unified Diff: compiler/java/com/google/dart/compiler/ast/DartMethodDefinition.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/DartMethodDefinition.java
diff --git a/compiler/java/com/google/dart/compiler/ast/DartMethodDefinition.java b/compiler/java/com/google/dart/compiler/ast/DartMethodDefinition.java
index 65df0891cd971a076358cbfe9f14116a4f3d6d1c..fafe1a2f08ebc05d9f4b54edbec2a3668b2aa810 100644
--- a/compiler/java/com/google/dart/compiler/ast/DartMethodDefinition.java
+++ b/compiler/java/com/google/dart/compiler/ast/DartMethodDefinition.java
@@ -66,14 +66,14 @@ public class DartMethodDefinition extends DartClassMember<DartExpression> {
private static class DartMethodWithInitializersDefinition extends DartMethodDefinition {
- private final List<DartInitializer> initializers;
+ private final NodeList<DartInitializer> initializers = NodeList.create(this);
DartMethodWithInitializersDefinition(DartExpression name,
DartFunction function,
Modifiers modifiers,
List<DartInitializer> initializers) {
super(name, function, modifiers);
- this.initializers = becomeParentOf(initializers);
+ this.initializers.addAll(initializers);
}
@Override
@@ -84,7 +84,7 @@ public class DartMethodDefinition extends DartClassMember<DartExpression> {
@Override
public void visitChildren(ASTVisitor<?> visitor) {
super.visitChildren(visitor);
- visitor.visit(initializers);
+ initializers.accept(visitor);
}
}
}

Powered by Google App Engine
This is Rietveld 408576698