| 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 0791151512263285c91a821f47d08bb802715f8a..09fe5baa251b8af57c12c4daeaf39444202b6af6 100644
|
| --- a/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart
|
| +++ b/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart
|
| @@ -329,48 +329,4 @@ class RuntimeTypeGenerator {
|
| superclass, generateIsTest, generateSubstitution, alreadyGenerated);
|
| }
|
| }
|
| -
|
| - List<StubMethod> generateTypeVariableReaderStubs(ClassElement classElement) {
|
| - List<StubMethod> stubs = <StubMethod>[];
|
| - ClassElement superclass = classElement;
|
| - while (superclass != null) {
|
| - for (ResolutionTypeVariableType parameter in superclass.typeVariables) {
|
| - if (backend.emitter.readTypeVariables.contains(parameter.element)) {
|
| - stubs.add(
|
| - _generateTypeVariableReader(classElement, parameter.element));
|
| - }
|
| - }
|
| - superclass = superclass.superclass;
|
| - }
|
| -
|
| - return stubs;
|
| - }
|
| -
|
| - StubMethod _generateTypeVariableReader(
|
| - ClassElement cls, TypeVariableElement element) {
|
| - jsAst.Name name = namer.nameForReadTypeVariable(element);
|
| - int index = element.index;
|
| - jsAst.Expression computeTypeVariable;
|
| -
|
| - Substitution substitution =
|
| - backend.rti.getSubstitution(cls, element.typeDeclaration);
|
| - jsAst.Name rtiFieldName = backend.namer.rtiFieldJsName;
|
| - if (substitution != null) {
|
| - computeTypeVariable = js(r'#.apply(null, this.#)', [
|
| - backend.rtiEncoder.getSubstitutionCodeForVariable(substitution, index),
|
| - rtiFieldName
|
| - ]);
|
| - } else {
|
| - // TODO(ahe): These can be generated dynamically.
|
| - computeTypeVariable = js(r'this.# && this.#[#]',
|
| - [rtiFieldName, rtiFieldName, js.number(index)]);
|
| - }
|
| - jsAst.Expression convertRtiToRuntimeType = backend.emitter
|
| - .staticFunctionAccess(backend.helpers.convertRtiToRuntimeType);
|
| -
|
| - return new StubMethod(
|
| - name,
|
| - js('function () { return #(#) }',
|
| - [convertRtiToRuntimeType, computeTypeVariable]));
|
| - }
|
| }
|
|
|