| Index: pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart
|
| diff --git a/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart b/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart
|
| index 16ada26bf3693b0fc94edc5630d3698a39a9d316..ffe0e87d9f14637ec757ece109a2e43ee295357d 100644
|
| --- a/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart
|
| +++ b/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart
|
| @@ -41,6 +41,8 @@ class RuntimeTypeGenerator {
|
|
|
| Iterable<ClassElement> get classesUsingTypeVariableTests =>
|
| typeTestRegistry.classesUsingTypeVariableTests;
|
| + Iterable<ClassElement> get classesUsingTypeVariableExpression =>
|
| + backend.rti.classesUsingTypeVariableExpression;
|
|
|
| Set<FunctionType> get checkedFunctionTypes =>
|
| typeTestRegistry.checkedFunctionTypes;
|
| @@ -186,6 +188,8 @@ class RuntimeTypeGenerator {
|
| return backend.rti.isTrivialSubstitution(a, b);
|
| }
|
|
|
| + bool supertypesNeedSubstitutions = false;
|
| +
|
| if (superclass != null &&
|
| superclass != coreClasses.objectClass &&
|
| !haveSameTypeVariables(cls, superclass)) {
|
| @@ -203,11 +207,20 @@ class RuntimeTypeGenerator {
|
| }
|
| superclass = superclass.superclass;
|
| }
|
| + supertypesNeedSubstitutions = true;
|
| + }
|
| +
|
| + if (cls is MixinApplicationElement) {
|
| + supertypesNeedSubstitutions = true;
|
| + }
|
| +
|
| + if (supertypesNeedSubstitutions) {
|
| for (DartType supertype in cls.allSupertypes) {
|
| ClassElement superclass = supertype.element;
|
| if (generated.contains(superclass)) continue;
|
|
|
| if (classesUsingTypeVariableTests.contains(superclass) ||
|
| + classesUsingTypeVariableExpression.contains(superclass) ||
|
| checkedClasses.contains(superclass)) {
|
| // Generate substitution. If no substitution is necessary, emit
|
| // `null` to overwrite a (possibly) existing substitution from the
|
| @@ -217,7 +230,6 @@ class RuntimeTypeGenerator {
|
| }
|
|
|
| void emitNothing(_, {emitNull}) {}
|
| - ;
|
|
|
| generateSubstitution = emitNothing;
|
| }
|
| @@ -266,8 +278,6 @@ class RuntimeTypeGenerator {
|
| }
|
| }
|
|
|
| - ;
|
| -
|
| tryEmitTest(cls);
|
|
|
| for (DartType interfaceType in cls.interfaces) {
|
|
|