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

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

Issue 10941031: Reapply '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/lib/core_patch.dart
diff --git a/lib/compiler/implementation/lib/core_patch.dart b/lib/compiler/implementation/lib/core_patch.dart
index 70ac1c3ac87b32c5c11be9f9646cf0372033a8c4..eeabd1c3c27df7e4cde6766b5e0102871c515ec8 100644
--- a/lib/compiler/implementation/lib/core_patch.dart
+++ b/lib/compiler/implementation/lib/core_patch.dart
@@ -23,6 +23,11 @@ patch class Object {
patch void noSuchMethod(String name, List args) {
throw new NoSuchMethodError(this, name, args);
}
+
+ patch Type runtimeType() {
+ String key = getRuntimeTypeString(this);
+ return getOrCreateCachedRuntimeType(key);
+ }
}

Powered by Google App Engine
This is Rietveld 408576698