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 part of dart2js; | 5 part of dart2js; |
6 | 6 |
7 typedef ItemCompilationContext ItemCompilationContextCreator(); | 7 typedef ItemCompilationContext ItemCompilationContextCreator(); |
8 | 8 |
9 class EnqueueTask extends CompilerTask { | 9 class EnqueueTask extends CompilerTask { |
10 final ResolutionEnqueuer resolution; | 10 final ResolutionEnqueuer resolution; |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 bool queueIsClosed = false; | 78 bool queueIsClosed = false; |
79 EnqueueTask task; | 79 EnqueueTask task; |
80 native.NativeEnqueuer nativeEnqueuer; // Set by EnqueueTask | 80 native.NativeEnqueuer nativeEnqueuer; // Set by EnqueueTask |
81 | 81 |
82 bool hasEnqueuedEverything = false; | 82 bool hasEnqueuedEverything = false; |
83 bool hasEnqueuedReflectiveStaticFields = false; | 83 bool hasEnqueuedReflectiveStaticFields = false; |
84 | 84 |
85 Enqueuer(this.name, this.compiler, this.itemCompilationContextCreator); | 85 Enqueuer(this.name, this.compiler, this.itemCompilationContextCreator); |
86 | 86 |
87 Queue<WorkItem> get queue; | 87 Queue<WorkItem> get queue; |
| 88 bool get queueIsEmpty => queue.isEmpty; |
88 | 89 |
89 /// Returns [:true:] if this enqueuer is the resolution enqueuer. | 90 /// Returns [:true:] if this enqueuer is the resolution enqueuer. |
90 bool get isResolutionQueue => false; | 91 bool get isResolutionQueue => false; |
91 | 92 |
92 /// Returns [:true:] if [member] has been processed by this enqueuer. | 93 /// Returns [:true:] if [member] has been processed by this enqueuer. |
93 bool isProcessed(Element member); | 94 bool isProcessed(Element member); |
94 | 95 |
95 /** | 96 /** |
96 * Documentation wanted -- johnniwinther | 97 * Documentation wanted -- johnniwinther |
97 * | 98 * |
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
754 } | 755 } |
755 CodegenWorkItem workItem = new CodegenWorkItem( | 756 CodegenWorkItem workItem = new CodegenWorkItem( |
756 element, itemCompilationContextCreator()); | 757 element, itemCompilationContextCreator()); |
757 queue.add(workItem); | 758 queue.add(workItem); |
758 } | 759 } |
759 | 760 |
760 void _logSpecificSummary(log(message)) { | 761 void _logSpecificSummary(log(message)) { |
761 log('Compiled ${generatedCode.length} methods.'); | 762 log('Compiled ${generatedCode.length} methods.'); |
762 } | 763 } |
763 } | 764 } |
OLD | NEW |