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

Unified Diff: compiler/java/com/google/dart/compiler/ast/DartFunctionTypeAlias.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/DartFunctionTypeAlias.java
diff --git a/compiler/java/com/google/dart/compiler/ast/DartFunctionTypeAlias.java b/compiler/java/com/google/dart/compiler/ast/DartFunctionTypeAlias.java
index ad23e0da52ae85021126d4319cae4a8f70f65156..36cce56a57a1414a64e7cb6f81864b0cc3e26c46 100644
--- a/compiler/java/com/google/dart/compiler/ast/DartFunctionTypeAlias.java
+++ b/compiler/java/com/google/dart/compiler/ast/DartFunctionTypeAlias.java
@@ -16,17 +16,17 @@ import java.util.List;
public class DartFunctionTypeAlias extends DartDeclaration<DartIdentifier> implements HasSymbol {
private DartTypeNode returnTypeNode;
- private final List<DartParameter> parameters;
+ private final NodeList<DartParameter> parameters = NodeList.create(this);
+ private final NodeList<DartTypeParameter> typeParameters = NodeList.create(this);
private FunctionAliasElement element;
- private final List<DartTypeParameter> typeParameters;
public DartFunctionTypeAlias(DartIdentifier name, DartTypeNode returnTypeNode,
List<DartParameter> parameters,
List<DartTypeParameter> typeParameters) {
super(name);
this.returnTypeNode = becomeParentOf(returnTypeNode);
- this.parameters = becomeParentOf(parameters);
- this.typeParameters = becomeParentOf(typeParameters);
+ this.parameters.addAll(parameters);
+ this.typeParameters.addAll(typeParameters);
}
public List<DartParameter> getParameters() {
@@ -60,8 +60,8 @@ public class DartFunctionTypeAlias extends DartDeclaration<DartIdentifier> imple
if (returnTypeNode != null) {
returnTypeNode.accept(visitor);
}
- visitor.visit(parameters);
- visitor.visit(typeParameters);
+ parameters.accept(visitor);
+ typeParameters.accept(visitor);
}
@Override

Powered by Google App Engine
This is Rietveld 408576698