| Index: pkg/compiler/lib/src/js_backend/backend.dart
|
| diff --git a/pkg/compiler/lib/src/js_backend/backend.dart b/pkg/compiler/lib/src/js_backend/backend.dart
|
| index e813fe938a9f6e0dee1eefc47ca68fd2d6172d24..2bd492d656ede023310ad8c0eaf8463963d25dcb 100644
|
| --- a/pkg/compiler/lib/src/js_backend/backend.dart
|
| +++ b/pkg/compiler/lib/src/js_backend/backend.dart
|
| @@ -1106,7 +1106,7 @@ class JavaScriptBackend extends Backend {
|
| type.isFunctionType ? coreTypes.functionType : type;
|
| if (type is InterfaceType) {
|
| registry.registerInstantiation(instantiatedType);
|
| - if (classNeedsRtiField(type.element)) {
|
| + if (!type.treatAsRaw && classNeedsRti(type.element)) {
|
| registry.registerStaticUse(new StaticUse.staticInvoke(
|
| // TODO(johnniwinther): Find the right [CallStructure].
|
| helpers.setRuntimeTypeInfo,
|
| @@ -1475,14 +1475,8 @@ class JavaScriptBackend extends Backend {
|
| }
|
|
|
| bool classNeedsRti(ClassElement cls) {
|
| - if (compiler.enabledRuntimeType) return true;
|
| - return rti.classesNeedingRti.contains(cls.declaration);
|
| - }
|
| -
|
| - bool classNeedsRtiField(ClassElement cls) {
|
| - if (cls.rawType.typeArguments.isEmpty) return false;
|
| - if (compiler.enabledRuntimeType) return true;
|
| - return rti.classesNeedingRti.contains(cls.declaration);
|
| + return rti.classesNeedingRti.contains(cls.declaration) ||
|
| + compiler.enabledRuntimeType;
|
| }
|
|
|
| bool isComplexNoSuchMethod(FunctionElement element) =>
|
|
|