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.common.work; | 5 library dart2js.common.work; |
6 | 6 |
| 7 import '../common.dart'; |
7 import '../compiler.dart' show | 8 import '../compiler.dart' show |
8 Compiler; | 9 Compiler; |
9 import '../diagnostics/invariant.dart' show | |
10 invariant; | |
11 import '../elements/elements.dart' show | 10 import '../elements/elements.dart' show |
12 AstElement; | 11 AstElement; |
13 import '../enqueue.dart' show | 12 import '../enqueue.dart' show |
14 Enqueuer, | 13 Enqueuer, |
15 WorldImpact; | 14 WorldImpact; |
16 | 15 |
17 | 16 |
18 /** | 17 /** |
19 * Contains backend-specific data that is used throughout the compilation of | 18 * Contains backend-specific data that is used throughout the compilation of |
20 * one work item. | 19 * one work item. |
21 */ | 20 */ |
22 class ItemCompilationContext { | 21 class ItemCompilationContext { |
23 } | 22 } |
24 | 23 |
25 abstract class WorkItem { | 24 abstract class WorkItem { |
26 final ItemCompilationContext compilationContext; | 25 final ItemCompilationContext compilationContext; |
27 /** | 26 /** |
28 * Documentation wanted -- johnniwinther | 27 * Documentation wanted -- johnniwinther |
29 * | 28 * |
30 * Invariant: [element] must be a declaration element. | 29 * Invariant: [element] must be a declaration element. |
31 */ | 30 */ |
32 final AstElement element; | 31 final AstElement element; |
33 | 32 |
34 WorkItem(this.element, this.compilationContext) { | 33 WorkItem(this.element, this.compilationContext) { |
35 assert(invariant(element, element.isDeclaration)); | 34 assert(invariant(element, element.isDeclaration)); |
36 } | 35 } |
37 | 36 |
38 WorldImpact run(Compiler compiler, Enqueuer world); | 37 WorldImpact run(Compiler compiler, Enqueuer world); |
39 } | 38 } |
OLD | NEW |