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 | 7 import 'dart:collection' show |
8 Queue; | 8 Queue; |
9 import 'dart2jslib.dart' show | 9 |
10 invariant, | 10 import 'common/work.dart' show |
11 CodegenWorkItem, | 11 ItemCompilationContext, |
12 Compiler, | 12 WorkItem; |
| 13 import 'common/tasks.dart' show |
13 CompilerTask, | 14 CompilerTask, |
14 DeferredAction, | 15 DeferredAction, |
15 DeferredTask, | 16 DeferredTask; |
16 ItemCompilationContext, | 17 import 'common/registry.dart' show |
17 Registry, | 18 Registry; |
18 ResolutionWorkItem, | 19 import 'common/codegen.dart' show |
19 WorkItem; | 20 CodegenWorkItem; |
| 21 import 'common/resolution.dart' show |
| 22 ResolutionWorkItem; |
| 23 import 'compiler.dart' show |
| 24 Compiler; |
20 import 'dart_types.dart' show | 25 import 'dart_types.dart' show |
21 DartType, | 26 DartType, |
22 InterfaceType; | 27 InterfaceType; |
| 28 import 'diagnostics/invariant.dart' show |
| 29 invariant; |
| 30 import 'diagnostics/spannable.dart' show |
| 31 SpannableAssertionFailure; |
23 import 'elements/elements.dart' show | 32 import 'elements/elements.dart' show |
24 AnalyzableElement, | 33 AnalyzableElement, |
25 AstElement, | 34 AstElement, |
26 ClassElement, | 35 ClassElement, |
27 ConstructorElement, | 36 ConstructorElement, |
28 Element, | 37 Element, |
29 Elements, | 38 Elements, |
30 FunctionElement, | 39 FunctionElement, |
31 LibraryElement, | 40 LibraryElement, |
32 LocalFunctionElement, | 41 LocalFunctionElement, |
33 Member, | 42 Member, |
34 MemberElement, | 43 MemberElement, |
35 MethodElement, | 44 MethodElement, |
36 TypedElement, | 45 TypedElement, |
37 TypedefElement; | 46 TypedefElement; |
38 import 'js/js.dart' as js; | 47 import 'js/js.dart' as js; |
39 import 'native/native.dart' as native; | 48 import 'native/native.dart' as native; |
40 import 'resolution/resolution.dart' show | 49 import 'resolution/resolution.dart' show |
41 ResolverVisitor; | 50 ResolverVisitor; |
42 import 'tree/tree.dart' show | 51 import 'tree/tree.dart' show |
43 Send; | 52 Send; |
44 import 'universe/universe.dart'; | 53 import 'universe/universe.dart'; |
45 import 'util/util.dart' show | 54 import 'util/util.dart' show |
46 Link, | 55 Link, |
47 Setlet, | 56 Setlet; |
48 SpannableAssertionFailure; | |
49 | 57 |
50 typedef ItemCompilationContext ItemCompilationContextCreator(); | 58 typedef ItemCompilationContext ItemCompilationContextCreator(); |
51 | 59 |
52 class EnqueueTask extends CompilerTask { | 60 class EnqueueTask extends CompilerTask { |
53 final ResolutionEnqueuer resolution; | 61 final ResolutionEnqueuer resolution; |
54 final CodegenEnqueuer codegen; | 62 final CodegenEnqueuer codegen; |
55 | 63 |
56 String get name => 'Enqueue'; | 64 String get name => 'Enqueue'; |
57 | 65 |
58 EnqueueTask(Compiler compiler) | 66 EnqueueTask(Compiler compiler) |
(...skipping 936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
995 void processWorkItem(void f(WorkItem work), WorkItem work) { | 1003 void processWorkItem(void f(WorkItem work), WorkItem work) { |
996 f(work); | 1004 f(work); |
997 } | 1005 } |
998 } | 1006 } |
999 | 1007 |
1000 void removeFromSet(Map<String, Set<Element>> map, Element element) { | 1008 void removeFromSet(Map<String, Set<Element>> map, Element element) { |
1001 Set<Element> set = map[element.name]; | 1009 Set<Element> set = map[element.name]; |
1002 if (set == null) return; | 1010 if (set == null) return; |
1003 set.remove(element); | 1011 set.remove(element); |
1004 } | 1012 } |
OLD | NEW |