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

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: 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..912f807762e8f6ce22df3aacb2641d9aee3887c1 100644
--- a/lib/compiler/implementation/enqueue.dart
+++ b/lib/compiler/implementation/enqueue.dart
@@ -247,6 +247,10 @@ class Enqueuer {
String message = "$name != ${selector.name} (${selector.kind})";
compiler.internalError("Wrong selector name: $message.");
}
+ if (name == const SourceString('runtimeType')
+ && selector.argumentCount == 0) {
+ compiler.enabledRuntimeType = true;
ngeoffray 2012/09/14 07:30:21 I'd prefer doing the check on the Element. There a
karlklose 2012/09/14 12:07:13 Done.
+ }
Set<Selector> selectors =
selectorsMap.putIfAbsent(name, () => new Set<Selector>());
if (!selectors.contains(selector)) {

Powered by Google App Engine
This is Rietveld 408576698