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

Unified Diff: lib/compiler/implementation/enqueue.dart

Issue 10908142: Add runtimeType() to Object which returns canonicalized instances of Type. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address more comments. Created 8 years, 3 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: lib/compiler/implementation/enqueue.dart
diff --git a/lib/compiler/implementation/enqueue.dart b/lib/compiler/implementation/enqueue.dart
index 6d6f40c6400de2472407741849db1a1d7fbd78ca..4a4b3530618480f43f0728e3cd928b74278471b5 100644
--- a/lib/compiler/implementation/enqueue.dart
+++ b/lib/compiler/implementation/enqueue.dart
@@ -107,6 +107,11 @@ class Enqueuer {
queue.add(new WorkItem(element, elements, itemCompilationContextCreator()));
+ // Enable runtime type support if we discover a method called runtimeType.
+ if (element.isFunction() && element.name == Compiler.RUNTIME_TYPE) {
+ compiler.enabledRuntimeType = true;
+ }
+
// Enable isolate support if we start using something from the
// isolate library.
LibraryElement library = element.getLibrary();

Powered by Google App Engine
This is Rietveld 408576698