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.registry; | 5 library dart2js.common.registry; |
6 | 6 |
7 import '../dart_types.dart' show | 7 import '../dart_types.dart' show InterfaceType; |
8 InterfaceType; | 8 import '../enqueue.dart' show Enqueuer; |
9 import '../enqueue.dart' show | 9 import '../elements/elements.dart' show Element, FunctionElement; |
10 Enqueuer; | 10 import '../universe/use.dart' show DynamicUse, StaticUse; |
11 import '../elements/elements.dart' show | |
12 Element, | |
13 FunctionElement; | |
14 import '../universe/use.dart' show | |
15 DynamicUse, | |
16 StaticUse; | |
17 | 11 |
18 /// Interface for registration of element dependencies. | 12 /// Interface for registration of element dependencies. |
19 abstract class Registry { | 13 abstract class Registry { |
20 // TODO(johnniwinther): Remove this. | 14 // TODO(johnniwinther): Remove this. |
21 void registerDependency(Element element) {} | 15 void registerDependency(Element element) {} |
22 | 16 |
23 bool get isForResolution; | 17 bool get isForResolution; |
24 | 18 |
25 void registerDynamicUse(DynamicUse staticUse); | 19 void registerDynamicUse(DynamicUse staticUse); |
26 | 20 |
(...skipping 21 matching lines...) Expand all Loading... |
48 world.registerInstantiatedType(type); | 42 world.registerInstantiatedType(type); |
49 } | 43 } |
50 | 44 |
51 @override | 45 @override |
52 void registerStaticUse(StaticUse staticUse) { | 46 void registerStaticUse(StaticUse staticUse) { |
53 world.registerStaticUse(staticUse); | 47 world.registerStaticUse(staticUse); |
54 } | 48 } |
55 | 49 |
56 String toString() => name; | 50 String toString() => name; |
57 } | 51 } |
OLD | NEW |