| Index: pkg/compiler/lib/src/js_emitter/type_test_registry.dart
|
| diff --git a/pkg/compiler/lib/src/js_emitter/type_test_registry.dart b/pkg/compiler/lib/src/js_emitter/type_test_registry.dart
|
| index 1cf8e1d51dbe91dd8d0cc6270433e01e8d6b5349..c2317f15993abf628ebe8a4c1d987850aec40ce2 100644
|
| --- a/pkg/compiler/lib/src/js_emitter/type_test_registry.dart
|
| +++ b/pkg/compiler/lib/src/js_emitter/type_test_registry.dart
|
| @@ -8,12 +8,7 @@ import '../common.dart';
|
| import '../common_elements.dart';
|
| import '../elements/elements.dart' show ClassElement, MethodElement;
|
| import '../elements/entities.dart';
|
| -import '../elements/resolution_types.dart'
|
| - show
|
| - ResolutionDartType,
|
| - ResolutionFunctionType,
|
| - ResolutionInterfaceType,
|
| - ResolutionTypeVariableType;
|
| +import '../elements/resolution_types.dart' show ResolutionFunctionType;
|
| import '../elements/types.dart';
|
| import '../js_backend/runtime_types.dart'
|
| show
|
| @@ -34,26 +29,28 @@ class TypeTestRegistry {
|
| * `x is Set<String>` then the ClassElement `Set` will occur once in
|
| * [checkedClasses].
|
| */
|
| - Set<ClassElement> checkedClasses;
|
| + Set<ClassEntity> checkedClasses;
|
|
|
| /**
|
| * The set of function types that checked, both explicity through tests of
|
| * typedefs and implicitly through type annotations in checked mode.
|
| */
|
| - Set<ResolutionFunctionType> checkedFunctionTypes;
|
| + Set<FunctionType> checkedFunctionTypes;
|
|
|
| /// After [computeNeededClasses] this set only contains classes that are only
|
| /// used for RTI.
|
| Set<ClassEntity> _rtiNeededClasses;
|
|
|
| - Iterable<ClassElement> cachedClassesUsingTypeVariableTests;
|
| + Iterable<ClassEntity> cachedClassesUsingTypeVariableTests;
|
|
|
| - Iterable<ClassElement> get classesUsingTypeVariableTests {
|
| + Iterable<ClassEntity> get classesUsingTypeVariableTests {
|
| if (cachedClassesUsingTypeVariableTests == null) {
|
| - cachedClassesUsingTypeVariableTests = _codegenWorldBuilder.isChecks
|
| - .where((ResolutionDartType t) => t is ResolutionTypeVariableType)
|
| - .map((ResolutionTypeVariableType v) => v.element.enclosingClass)
|
| - .toList();
|
| + cachedClassesUsingTypeVariableTests = new List<ClassEntity>.from(
|
| + _codegenWorldBuilder.isChecks
|
| + .where((DartType t) =>
|
| + t is TypeVariableType &&
|
| + t.element.typeDeclaration is ClassEntity)
|
| + .map((dynamic v) => v.element.typeDeclaration));
|
| }
|
| return cachedClassesUsingTypeVariableTests;
|
| }
|
| @@ -186,13 +183,12 @@ class TypeTestRegistry {
|
| _codegenWorldBuilder, classesUsingTypeVariableTests);
|
| _rtiChecks = rtiChecksBuilder.computeRequiredChecks(_codegenWorldBuilder);
|
|
|
| - checkedClasses = new Set<ClassElement>();
|
| - checkedFunctionTypes = new Set<ResolutionFunctionType>();
|
| - _codegenWorldBuilder.isChecks.forEach((_t) {
|
| - ResolutionDartType t = _t;
|
| - if (t is ResolutionInterfaceType) {
|
| + checkedClasses = new Set<ClassEntity>();
|
| + checkedFunctionTypes = new Set<FunctionType>();
|
| + _codegenWorldBuilder.isChecks.forEach((DartType t) {
|
| + if (t is InterfaceType) {
|
| checkedClasses.add(t.element);
|
| - } else if (t is ResolutionFunctionType) {
|
| + } else if (t is FunctionType) {
|
| checkedFunctionTypes.add(t);
|
| }
|
| });
|
|
|