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.enqueue; | 5 library dart2js.enqueue; |
6 | 6 |
7 import 'dart:collection' show Queue; | 7 import 'dart:collection' show Queue; |
8 | 8 |
9 import 'common/names.dart' show Identifiers; | 9 import 'common/names.dart' show Identifiers; |
10 import 'common/resolution.dart' show Resolution; | 10 import 'common/resolution.dart' show Resolution; |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 | 150 |
151 ResolutionEnqueuer(Compiler compiler, this.strategy) | 151 ResolutionEnqueuer(Compiler compiler, this.strategy) |
152 : this.name = 'resolution enqueuer', | 152 : this.name = 'resolution enqueuer', |
153 this.compiler = compiler, | 153 this.compiler = compiler, |
154 processedElements = new Set<AstElement>(), | 154 processedElements = new Set<AstElement>(), |
155 queue = new Queue<ResolutionWorkItem>(), | 155 queue = new Queue<ResolutionWorkItem>(), |
156 deferredQueue = new Queue<_DeferredAction>() { | 156 deferredQueue = new Queue<_DeferredAction>() { |
157 impactVisitor = new _EnqueuerImpactVisitor(this); | 157 impactVisitor = new _EnqueuerImpactVisitor(this); |
158 } | 158 } |
159 | 159 |
160 // TODO(johnniwinther): Move this to [ResolutionEnqueuer]. | |
161 Resolution get resolution => compiler.resolution; | 160 Resolution get resolution => compiler.resolution; |
162 | 161 |
163 ResolutionWorldBuilder get universe => _universe; | 162 ResolutionWorldBuilder get universe => _universe; |
164 | 163 |
165 bool get queueIsEmpty => queue.isEmpty; | 164 bool get queueIsEmpty => queue.isEmpty; |
166 | 165 |
167 QueueFilter get filter => compiler.enqueuerFilter; | 166 QueueFilter get filter => compiler.enqueuerFilter; |
168 | 167 |
169 DiagnosticReporter get reporter => compiler.reporter; | 168 DiagnosticReporter get reporter => compiler.reporter; |
170 | 169 |
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
915 } | 914 } |
916 | 915 |
917 typedef void _DeferredActionFunction(); | 916 typedef void _DeferredActionFunction(); |
918 | 917 |
919 class _DeferredAction { | 918 class _DeferredAction { |
920 final Element element; | 919 final Element element; |
921 final _DeferredActionFunction action; | 920 final _DeferredActionFunction action; |
922 | 921 |
923 _DeferredAction(this.element, this.action); | 922 _DeferredAction(this.element, this.action); |
924 } | 923 } |
OLD | NEW |