OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 dart2js.js.enqueue; | 5 library dart2js.js.enqueue; |
6 | 6 |
7 import 'dart:collection' show Queue; | 7 import 'dart:collection' show Queue; |
8 | 8 |
9 import '../cache_strategy.dart' show CacheStrategy; | 9 import '../cache_strategy.dart' show CacheStrategy; |
10 import '../common/backend_api.dart' show Backend; | 10 import '../common/backend_api.dart' show Backend; |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 newlySeenSelectors = cacheStrategy.newSet(), | 79 newlySeenSelectors = cacheStrategy.newSet(), |
80 nativeEnqueuer = backend.nativeCodegenEnqueuer(), | 80 nativeEnqueuer = backend.nativeCodegenEnqueuer(), |
81 this._backend = backend, | 81 this._backend = backend, |
82 this.name = 'codegen enqueuer' { | 82 this.name = 'codegen enqueuer' { |
83 _impactVisitor = new EnqueuerImplImpactVisitor(this); | 83 _impactVisitor = new EnqueuerImplImpactVisitor(this); |
84 } | 84 } |
85 | 85 |
86 CodegenWorldBuilder get universe => _universe; | 86 CodegenWorldBuilder get universe => _universe; |
87 | 87 |
88 // TODO(johnniwinther): Remove these hacks: | 88 // TODO(johnniwinther): Remove these hacks: |
89 ClosedWorld get _world => _backend.compiler.closedWorld; | 89 ClosedWorld get _world => |
| 90 _backend.compiler.resolverWorld.closedWorldForTesting; |
90 DumpInfoTask get _dumpInfoTask => _backend.compiler.dumpInfoTask; | 91 DumpInfoTask get _dumpInfoTask => _backend.compiler.dumpInfoTask; |
91 | 92 |
92 bool get queueIsEmpty => _queue.isEmpty; | 93 bool get queueIsEmpty => _queue.isEmpty; |
93 | 94 |
94 /// Returns [:true:] if this enqueuer is the resolution enqueuer. | 95 /// Returns [:true:] if this enqueuer is the resolution enqueuer. |
95 bool get isResolutionQueue => false; | 96 bool get isResolutionQueue => false; |
96 | 97 |
97 /** | 98 /** |
98 * Documentation wanted -- johnniwinther | 99 * Documentation wanted -- johnniwinther |
99 * | 100 * |
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
495 | 496 |
496 @override | 497 @override |
497 Iterable<ClassEntity> get processedClasses => _processedClasses; | 498 Iterable<ClassEntity> get processedClasses => _processedClasses; |
498 } | 499 } |
499 | 500 |
500 void removeFromSet(Map<String, Set<Element>> map, Element element) { | 501 void removeFromSet(Map<String, Set<Element>> map, Element element) { |
501 Set<Element> set = map[element.name]; | 502 Set<Element> set = map[element.name]; |
502 if (set == null) return; | 503 if (set == null) return; |
503 set.remove(element); | 504 set.remove(element); |
504 } | 505 } |
OLD | NEW |