Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Unified Diff: sdk/lib/_internal/compiler/implementation/js_emitter/metadata_emitter.dart

Issue 26166003: Revert "Add TypeVariable object on runtime to support reflection on type variables." and "Fix type … (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sdk/lib/_internal/compiler/implementation/js_emitter/metadata_emitter.dart
diff --git a/sdk/lib/_internal/compiler/implementation/js_emitter/metadata_emitter.dart b/sdk/lib/_internal/compiler/implementation/js_emitter/metadata_emitter.dart
index 162272eb588f82408c3c81541c1ac5f95e90bd7f..f4597f3b9946389ee7dedb5a424331c19a09c13a 100644
--- a/sdk/lib/_internal/compiler/implementation/js_emitter/metadata_emitter.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_emitter/metadata_emitter.dart
@@ -70,14 +70,9 @@ class MetadataEmitter extends CodeEmitterHelper {
}
int reifyType(DartType type) {
- jsAst.Expression representation =
- backend.rti.getTypeRepresentation(type, (variable) {
- return js.toExpression(
- task.typeVariableHandler.reifyTypeVariable(variable.element));
- });
-
- return addGlobalMetadata(
- jsAst.prettyPrint(representation, compiler).getText());
+ // TODO(ahe): Handle type variables correctly instead of using "#".
+ String representation = backend.rti.getTypeRepresentation(type, (_) {});
+ return addGlobalMetadata(representation.replaceAll('#', 'null'));
}
int reifyName(SourceString name) {

Powered by Google App Engine
This is Rietveld 408576698