Index: sdk/lib/_internal/compiler/implementation/js_backend/constant_emitter.dart |
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/constant_emitter.dart b/sdk/lib/_internal/compiler/implementation/js_backend/constant_emitter.dart |
index 1b8992a0a158e5fd65054f1dd5947119949d6118..c5a85ca40257650227bea9c3424ad17011e47067 100644 |
--- a/sdk/lib/_internal/compiler/implementation/js_backend/constant_emitter.dart |
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/constant_emitter.dart |
@@ -300,19 +300,13 @@ class ConstantInitializerEmitter implements ConstantVisitor<js.Expression> { |
String helperName = backend.namer.getName(helper); |
DartType type = constant.representedType; |
Element element = type.element; |
- String typeName; |
- if (type.kind == TypeKind.INTERFACE) { |
- typeName = |
- backend.rti.getStringRepresentation(type, expandRawType: true); |
- } else { |
- assert(type.kind == TypeKind.TYPEDEF); |
- typeName = element.name.slowToString(); |
- } |
+ String name = backend.rti.getRawTypeRepresentation(type); |
+ js.Expression typeName = new js.LiteralString("'$name'"); |
return new js.Call( |
new js.PropertyAccess.field( |
new js.VariableUse(namer.CURRENT_ISOLATE), |
helperName), |
- [new js.LiteralString("'$typeName'")]); |
+ [typeName]); |
} |
js.Expression visitConstructed(ConstructedConstant constant) { |