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

Unified Diff: compiler/java/com/google/dart/compiler/ast/DartMapLiteral.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/DartMapLiteral.java
diff --git a/compiler/java/com/google/dart/compiler/ast/DartMapLiteral.java b/compiler/java/com/google/dart/compiler/ast/DartMapLiteral.java
index 588301a8217159be02abcf6d88dbd02fad515e1c..40272084f80628017a61219e3cd3ae4dbc07318c 100644
--- a/compiler/java/com/google/dart/compiler/ast/DartMapLiteral.java
+++ b/compiler/java/com/google/dart/compiler/ast/DartMapLiteral.java
@@ -11,12 +11,12 @@ import java.util.List;
*/
public class DartMapLiteral extends DartTypedLiteral {
- private final List<DartMapLiteralEntry> entries;
+ private final NodeList<DartMapLiteralEntry> entries = NodeList.create(this);
public DartMapLiteral(boolean isConst, List<DartTypeNode> typeArguments,
List<DartMapLiteralEntry> entries) {
super(isConst, typeArguments);
- this.entries = becomeParentOf(entries);
+ this.entries.addAll(entries);
}
public List<DartMapLiteralEntry> getEntries() {
@@ -26,7 +26,7 @@ public class DartMapLiteral extends DartTypedLiteral {
@Override
public void visitChildren(ASTVisitor<?> visitor) {
super.visitChildren(visitor);
- visitor.visit(entries);
+ entries.accept(visitor);
}
@Override

Powered by Google App Engine
This is Rietveld 408576698