| Index: sdk/lib/_internal/compiler/implementation/js_emitter/class_emitter.dart
|
| diff --git a/sdk/lib/_internal/compiler/implementation/js_emitter/class_emitter.dart b/sdk/lib/_internal/compiler/implementation/js_emitter/class_emitter.dart
|
| index edf808f5b97b28aa514d411ba67ea39d9d6ff7ad..552150f12edfcbed6321423e32873e574b16a001 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/js_emitter/class_emitter.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/js_emitter/class_emitter.dart
|
| @@ -291,9 +291,9 @@ class ClassEmitter extends CodeEmitterHelper {
|
| if (backend.isNeededForReflection(classElement)) {
|
| Link typeVars = classElement.typeVariables;
|
| List properties = [];
|
| - for (TypeVariableType typeVar in typeVars) {
|
| - properties.add(js.string(typeVar.name.slowToString()));
|
| - properties.add(js.toExpression(task.reifyType(typeVar.element.bound)));
|
| + if (task.typeVariableHandler.typeVariablesOf(classElement) != null) {
|
| + properties = task.typeVariableHandler.typeVariablesOf(classElement)
|
| + .map(js.toExpression);
|
| }
|
|
|
| ClassElement superclass = classElement.superclass;
|
| @@ -340,11 +340,15 @@ class ClassEmitter extends CodeEmitterHelper {
|
| buffer.write(jsAst.prettyPrint(builder.toObjectInitializer(), compiler));
|
| String reflectionName = task.getReflectionName(classElement, className);
|
| if (reflectionName != null) {
|
| - List<int> interfaces = <int>[];
|
| - for (DartType interface in classElement.interfaces) {
|
| - interfaces.add(task.reifyType(interface));
|
| + if (!backend.isNeededForReflection(classElement)) {
|
| + buffer.write(',$n$n"+$reflectionName": 0');
|
| + } else {
|
| + List<int> interfaces = <int>[];
|
| + for (DartType interface in classElement.interfaces) {
|
| + interfaces.add(task.reifyType(interface));
|
| + }
|
| + buffer.write(',$n$n"+$reflectionName": $interfaces');
|
| }
|
| - buffer.write(',$n$n"+$reflectionName": $interfaces');
|
| }
|
| }
|
|
|
|
|