Chromium Code Reviews| Index: sdk/lib/_internal/compiler/implementation/js_emitter/code_emitter_task.dart |
| diff --git a/sdk/lib/_internal/compiler/implementation/js_emitter/code_emitter_task.dart b/sdk/lib/_internal/compiler/implementation/js_emitter/code_emitter_task.dart |
| index cea45c9df7c59fa73b4f8a1faeacc8c51d9fe3b5..2f08c14d0cacaa18d48516d8f8cb2adf4334c802 100644 |
| --- a/sdk/lib/_internal/compiler/implementation/js_emitter/code_emitter_task.dart |
| +++ b/sdk/lib/_internal/compiler/implementation/js_emitter/code_emitter_task.dart |
| @@ -49,6 +49,7 @@ class CodeEmitterTask extends CompilerTask { |
| Set<ClassElement> instantiatedClasses; |
| JavaScriptBackend get backend => compiler.backend; |
| + TypeVariableHandler get typeVariableHandler => backend.typeVariableHandler; |
| String get _ => space; |
| String get space => compiler.enableMinification ? "" : " "; |
| @@ -1621,9 +1622,13 @@ class CodeEmitterTask extends CompilerTask { |
| } |
| int reifyType(DartType type) { |
| - // TODO(ahe): Handle type variables correctly instead of using "#". |
| - String representation = backend.rti.getTypeRepresentation(type, (_) {}); |
| - return addGlobalMetadata(representation.replaceAll('#', 'null')); |
| + jsAst.Expression representation = |
| + backend.rti.getTypeRepresentation(type, (variable) { |
| + return js.toExpression(typeVariableHandler.reifyTypeVariable(variable)); |
|
ahe
2013/10/15 14:56:31
Long line.
zarah
2013/10/16 07:00:47
Done.
|
| + }); |
| + |
| + return addGlobalMetadata( |
| + jsAst.prettyPrint(representation, compiler).getText()); |
| } |
| int reifyName(SourceString name) { |