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