| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library deferred_load; | 5 library deferred_load; |
| 6 | 6 |
| 7 import 'dart:collection' | 7 import 'dart:collection' |
| 8 show LinkedHashMap, | 8 show LinkedHashMap, |
| 9 LinkedHashSet; | 9 LinkedHashSet; |
| 10 | 10 |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 Element dependency = elements[node]; | 233 Element dependency = elements[node]; |
| 234 if (Elements.isUnresolved(dependency)) return; | 234 if (Elements.isUnresolved(dependency)) return; |
| 235 dependencies.add(dependency.implementation); | 235 dependencies.add(dependency.implementation); |
| 236 } | 236 } |
| 237 | 237 |
| 238 static Set<Element> collect(Element element, Compiler compiler) { | 238 static Set<Element> collect(Element element, Compiler compiler) { |
| 239 TreeElements elements = | 239 TreeElements elements = |
| 240 compiler.enqueuer.resolution.getCachedElements(element); | 240 compiler.enqueuer.resolution.getCachedElements(element); |
| 241 if (elements == null) return new LinkedHashSet<Element>(); | 241 if (elements == null) return new LinkedHashSet<Element>(); |
| 242 Node node = element.parseNode(compiler); | 242 Node node = element.parseNode(compiler); |
| 243 if (node == null) return new LinkedHashSet<Element>(); |
| 243 var collector = new DependencyCollector(elements, compiler); | 244 var collector = new DependencyCollector(elements, compiler); |
| 244 node.accept(collector); | 245 node.accept(collector); |
| 245 collector.dependencies.addAll(elements.otherDependencies); | 246 collector.dependencies.addAll(elements.otherDependencies); |
| 246 return collector.dependencies; | 247 return collector.dependencies; |
| 247 } | 248 } |
| 248 } | 249 } |
| OLD | NEW |