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 world_builder; | 5 library world_builder; |
6 | 6 |
7 import 'dart:collection'; | 7 import 'dart:collection'; |
8 | 8 |
9 import '../common.dart'; | 9 import '../common.dart'; |
10 import '../common/names.dart' show Identifiers; | 10 import '../common/names.dart' show Identifiers; |
11 import '../common/resolution.dart' show Resolution; | 11 import '../common/resolution.dart' show Resolution; |
12 import '../common_elements.dart'; | 12 import '../common_elements.dart'; |
| 13 import '../constants/values.dart'; |
13 import '../elements/elements.dart'; | 14 import '../elements/elements.dart'; |
14 import '../elements/entities.dart'; | 15 import '../elements/entities.dart'; |
15 import '../elements/resolution_types.dart'; | 16 import '../elements/resolution_types.dart'; |
16 import '../elements/types.dart'; | 17 import '../elements/types.dart'; |
17 import '../js_backend/backend.dart' show JavaScriptBackend; | 18 import '../js_backend/backend.dart' show JavaScriptBackend; |
| 19 import '../js_backend/constant_handler_javascript.dart' |
| 20 show JavaScriptConstantCompiler; |
18 import '../js_backend/native_data.dart' show NativeClassData; | 21 import '../js_backend/native_data.dart' show NativeClassData; |
19 import '../universe/class_set.dart'; | 22 import '../universe/class_set.dart'; |
20 import '../universe/function_set.dart' show FunctionSetBuilder; | 23 import '../universe/function_set.dart' show FunctionSetBuilder; |
21 import '../util/enumset.dart'; | 24 import '../util/enumset.dart'; |
22 import '../util/util.dart'; | 25 import '../util/util.dart'; |
23 import '../world.dart' show World, ClosedWorld, ClosedWorldImpl, OpenWorld; | 26 import '../world.dart' show World, ClosedWorld, ClosedWorldImpl, OpenWorld; |
24 import 'selector.dart' show Selector; | 27 import 'selector.dart' show Selector; |
25 import 'use.dart' show DynamicUse, DynamicUseKind, StaticUse, StaticUseKind; | 28 import 'use.dart' |
| 29 show |
| 30 ConstantUse, |
| 31 ConstantUseKind, |
| 32 DynamicUse, |
| 33 DynamicUseKind, |
| 34 StaticUse, |
| 35 StaticUseKind; |
26 | 36 |
27 part 'codegen_world_builder.dart'; | 37 part 'codegen_world_builder.dart'; |
28 part 'member_usage.dart'; | 38 part 'member_usage.dart'; |
29 part 'resolution_world_builder.dart'; | 39 part 'resolution_world_builder.dart'; |
30 | 40 |
31 /// The known constraint on receiver for a dynamic call site. | 41 /// The known constraint on receiver for a dynamic call site. |
32 /// | 42 /// |
33 /// This can for instance be used to constrain this dynamic call to `foo` to | 43 /// This can for instance be used to constrain this dynamic call to `foo` to |
34 /// 'receivers of the exact instance `Bar`': | 44 /// 'receivers of the exact instance `Bar`': |
35 /// | 45 /// |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 /// All directly instantiated classes, that is, classes with a generative | 166 /// All directly instantiated classes, that is, classes with a generative |
157 /// constructor that has been called directly and not only through a | 167 /// constructor that has been called directly and not only through a |
158 /// super-call. | 168 /// super-call. |
159 // TODO(johnniwinther): Improve semantic precision. | 169 // TODO(johnniwinther): Improve semantic precision. |
160 Iterable<ClassEntity> get directlyInstantiatedClasses; | 170 Iterable<ClassEntity> get directlyInstantiatedClasses; |
161 | 171 |
162 /// All types that are checked either through is, as or checked mode checks. | 172 /// All types that are checked either through is, as or checked mode checks. |
163 Iterable<DartType> get isChecks; | 173 Iterable<DartType> get isChecks; |
164 | 174 |
165 /// All directly instantiated types, that is, the types of the directly | 175 /// All directly instantiated types, that is, the types of the directly |
| 176 /// instantiated classes. |
| 177 // TODO(johnniwinther): Improve semantic precision. |
| 178 Iterable<InterfaceType> get instantiatedTypes; |
166 | 179 |
167 /// Registers that [type] is checked in this world builder. The unaliased type | 180 /// Registers that [type] is checked in this world builder. The unaliased type |
168 /// is returned. | 181 /// is returned. |
169 void registerIsCheck(DartType type); | 182 void registerIsCheck(DartType type); |
170 | |
171 /// instantiated classes. | |
172 // TODO(johnniwinther): Improve semantic precision. | |
173 Iterable<InterfaceType> get instantiatedTypes; | |
174 } | 183 } |
OLD | NEW |