| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 _workItemBuilder = new CodegenWorkItemBuilder(backend, options), | 65 _workItemBuilder = new CodegenWorkItemBuilder(backend, options), |
| 66 newlyEnqueuedElements = cacheStrategy.newSet(), | 66 newlyEnqueuedElements = cacheStrategy.newSet(), |
| 67 newlySeenSelectors = cacheStrategy.newSet(), | 67 newlySeenSelectors = cacheStrategy.newSet(), |
| 68 nativeEnqueuer = backend.nativeCodegenEnqueuer(), | 68 nativeEnqueuer = backend.nativeCodegenEnqueuer(), |
| 69 this._backend = backend, | 69 this._backend = backend, |
| 70 this._options = options, | 70 this._options = options, |
| 71 this.name = 'codegen enqueuer' { | 71 this.name = 'codegen enqueuer' { |
| 72 _impactVisitor = new EnqueuerImplImpactVisitor(this); | 72 _impactVisitor = new EnqueuerImplImpactVisitor(this); |
| 73 } | 73 } |
| 74 | 74 |
| 75 CodegenWorldBuilder get universe => _universe; | 75 CodegenWorldBuilder get worldBuilder => _universe; |
| 76 | 76 |
| 77 bool get queueIsEmpty => _queue.isEmpty; | 77 bool get queueIsEmpty => _queue.isEmpty; |
| 78 | 78 |
| 79 /// Returns [:true:] if this enqueuer is the resolution enqueuer. | 79 /// Returns [:true:] if this enqueuer is the resolution enqueuer. |
| 80 bool get isResolutionQueue => false; | 80 bool get isResolutionQueue => false; |
| 81 | 81 |
| 82 /// Create a [WorkItem] for [entity] and add it to the work list if it has not | 82 /// Create a [WorkItem] for [entity] and add it to the work list if it has not |
| 83 /// already been processed. | 83 /// already been processed. |
| 84 void _addToWorkList(MemberEntity entity) { | 84 void _addToWorkList(MemberEntity entity) { |
| 85 if (_processedEntities.contains(entity)) return; | 85 if (_processedEntities.contains(entity)) return; |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 // code for checked setters. | 295 // code for checked setters. |
| 296 if (element.isField && element.isInstanceMember) { | 296 if (element.isField && element.isInstanceMember) { |
| 297 if (!_options.enableTypeAssertions || | 297 if (!_options.enableTypeAssertions || |
| 298 element.enclosingElement.isClosure) { | 298 element.enclosingElement.isClosure) { |
| 299 return null; | 299 return null; |
| 300 } | 300 } |
| 301 } | 301 } |
| 302 return new CodegenWorkItem(_backend, element); | 302 return new CodegenWorkItem(_backend, element); |
| 303 } | 303 } |
| 304 } | 304 } |
| OLD | NEW |