| Index: compiler/java/com/google/dart/compiler/ast/DartUnit.java
|
| diff --git a/compiler/java/com/google/dart/compiler/ast/DartUnit.java b/compiler/java/com/google/dart/compiler/ast/DartUnit.java
|
| index ff55c06358bcd8c5fcbc9afb75d47be688b35d7f..292b028a156b8d8c73e6db2beb5cc65f2a79b56d 100644
|
| --- a/compiler/java/com/google/dart/compiler/ast/DartUnit.java
|
| +++ b/compiler/java/com/google/dart/compiler/ast/DartUnit.java
|
| @@ -4,6 +4,7 @@
|
|
|
| package com.google.dart.compiler.ast;
|
|
|
| +import com.google.common.collect.Lists;
|
| import com.google.dart.compiler.DartSource;
|
| import com.google.dart.compiler.util.DefaultTextOutput;
|
|
|
| @@ -20,21 +21,15 @@ public class DartUnit extends DartNode {
|
|
|
| private LibraryUnit library;
|
| private List<DartDirective> directives;
|
| - private final List<DartNode> topLevelNodes;
|
| + private final List<DartNode> topLevelNodes = Lists.newArrayList();
|
| private final DartSource source;
|
| /** A list of comments. May be null. */
|
| private List<DartComment> comments;
|
| private boolean isDiet;
|
| private String dietParse;
|
|
|
| - public DartUnit(DartSource sourceName) {
|
| - this(sourceName, new ArrayList<DartNode>());
|
| - }
|
| -
|
| - public DartUnit(DartSource source,
|
| - List<DartNode> nodes) {
|
| + public DartUnit(DartSource source) {
|
| this.source = source;
|
| - this.topLevelNodes = becomeParentOf(nodes);
|
| }
|
|
|
| public void addTopLevelNode(DartNode node) {
|
|
|