| Index: sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
|
| diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart b/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
|
| index 9151b71b64d9c5716c39bb68541acdd54f0cf6f0..875a1d38ba277b2e73575643b72becf21f60c65f 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
|
| @@ -1010,29 +1010,14 @@ class JavaScriptBackend extends Backend {
|
| * If [argument] has type variables or is a type variable, this
|
| * method registers a RTI dependency between the class where the
|
| * type variable is defined (that is the enclosing class of the
|
| - * current element being resolved) and the class of [annotation].
|
| - * If the class of [annotation] requires RTI, then the class of
|
| + * current element being resolved) and the class of [type].
|
| + * If the class of [type] requires RTI, then the class of
|
| * the type variable does too.
|
| */
|
| - void analyzeTypeArgument(DartType annotation, DartType argument) {
|
| - if (argument == null) return;
|
| - if (argument.element.isTypeVariable()) {
|
| - ClassElement enclosing = argument.element.getEnclosingClass();
|
| - assert(enclosing == enclosingElement.getEnclosingClass().declaration);
|
| - rti.registerRtiDependency(annotation.element, enclosing);
|
| - } else if (argument is InterfaceType) {
|
| - InterfaceType type = argument;
|
| - type.typeArguments.forEach((DartType argument) {
|
| - analyzeTypeArgument(annotation, argument);
|
| - });
|
| - }
|
| - }
|
| -
|
| - if (type is InterfaceType) {
|
| - InterfaceType itf = type;
|
| - itf.typeArguments.forEach((DartType argument) {
|
| - analyzeTypeArgument(type, argument);
|
| - });
|
| + ClassElement contextClass = Types.getClassContext(type);
|
| + if (contextClass != null) {
|
| + assert(contextClass == enclosingElement.getEnclosingClass().declaration);
|
| + rti.registerRtiDependency(type.element, contextClass);
|
| }
|
| }
|
|
|
|
|