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

Unified Diff: sdk/lib/_internal/compiler/implementation/js_backend/backend.dart

Issue 12598003: Support type variables as expressions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 7 years, 9 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_backend/backend.dart
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart b/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
index 46bece00e25882af8f425bd6c3452d96de5c5024..e94c96459720b2acf6bfa0b6627c3da96bd2ef3a 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
@@ -1068,6 +1068,12 @@ class JavaScriptBackend extends Backend {
compiler.listClass, elements);
}
+ void registerTypeVariableExpression(TreeElements elements) {
+ registerRuntimeType(elements);
+ enqueueInResolution(getRuntimeTypeToString(), elements);
+ enqueueInResolution(getCreateRuntimeType(), elements);
+ }
+
void registerIsCheck(DartType type, Enqueuer world, TreeElements elements) {
world.registerInstantiatedClass(compiler.boolClass, elements);
bool isTypeVariable = type.kind == TypeKind.TYPE_VARIABLE;
@@ -1539,6 +1545,10 @@ class JavaScriptBackend extends Backend {
return compiler.findHelper(const SourceString('getRuntimeTypeArgument'));
}
+ Element getRuntimeTypeToString() {
+ return compiler.findHelper(const SourceString('runtimeTypeToString'));
+ }
+
Element getCheckArguments() {
return compiler.findHelper(const SourceString('checkArguments'));
}

Powered by Google App Engine
This is Rietveld 408576698