OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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.js_emitter.type_test_registry; | 5 library dart2js.js_emitter.type_test_registry; |
6 | 6 |
7 import '../common.dart'; | 7 import '../common.dart'; |
8 import '../common_elements.dart'; | 8 import '../common_elements.dart'; |
9 import '../elements/elements.dart' show ClassElement, MethodElement; | 9 import '../elements/elements.dart' show ClassElement, MethodElement; |
10 import '../elements/entities.dart'; | 10 import '../elements/entities.dart'; |
(...skipping 16 matching lines...) Expand all Loading... |
27 | 27 |
28 /** | 28 /** |
29 * Raw ClassElement symbols occurring in is-checks and type assertions. If th
e | 29 * Raw ClassElement symbols occurring in is-checks and type assertions. If th
e |
30 * program contains parameterized checks `x is Set<int>` and | 30 * program contains parameterized checks `x is Set<int>` and |
31 * `x is Set<String>` then the ClassElement `Set` will occur once in | 31 * `x is Set<String>` then the ClassElement `Set` will occur once in |
32 * [checkedClasses]. | 32 * [checkedClasses]. |
33 */ | 33 */ |
34 Set<ClassEntity> checkedClasses; | 34 Set<ClassEntity> checkedClasses; |
35 | 35 |
36 /** | 36 /** |
37 * The set of function types that checked, both explicity through tests of | 37 * The set of function types that checked, both explicitly through tests of |
38 * typedefs and implicitly through type annotations in checked mode. | 38 * typedefs and implicitly through type annotations in checked mode. |
39 */ | 39 */ |
40 Set<FunctionType> checkedFunctionTypes; | 40 Set<FunctionType> checkedFunctionTypes; |
41 | 41 |
42 /// After [computeNeededClasses] this set only contains classes that are only | 42 /// After [computeNeededClasses] this set only contains classes that are only |
43 /// used for RTI. | 43 /// used for RTI. |
44 Set<ClassEntity> _rtiNeededClasses; | 44 Set<ClassEntity> _rtiNeededClasses; |
45 | 45 |
46 Iterable<ClassEntity> cachedClassesUsingTypeVariableTests; | 46 Iterable<ClassEntity> cachedClassesUsingTypeVariableTests; |
47 | 47 |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 checkedFunctionTypes = new Set<FunctionType>(); | 191 checkedFunctionTypes = new Set<FunctionType>(); |
192 _codegenWorldBuilder.isChecks.forEach((DartType t) { | 192 _codegenWorldBuilder.isChecks.forEach((DartType t) { |
193 if (t is InterfaceType) { | 193 if (t is InterfaceType) { |
194 checkedClasses.add(t.element); | 194 checkedClasses.add(t.element); |
195 } else if (t is FunctionType) { | 195 } else if (t is FunctionType) { |
196 checkedFunctionTypes.add(t); | 196 checkedFunctionTypes.add(t); |
197 } | 197 } |
198 }); | 198 }); |
199 } | 199 } |
200 } | 200 } |
OLD | NEW |