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

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

Issue 12210142: Implement is-checks against type variables. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove some obsolete code. Created 7 years, 10 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/runtime_types.dart
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/runtime_types.dart b/sdk/lib/_internal/compiler/implementation/js_backend/runtime_types.dart
index 746df0e8314b54715af2dd13d17c024902cec9ad..0e6acb1b658623cf2fb65cae9ec2cbd36bb01c24 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/runtime_types.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/runtime_types.dart
@@ -21,15 +21,6 @@ class RuntimeTypeInformation {
/// instantiations and checks.
Set<ClassElement> allArguments;
- bool isJsNative(Element element) {
- return (element == compiler.intClass ||
- element == compiler.boolClass ||
- element == compiler.numClass ||
- element == compiler.doubleClass ||
- element == compiler.stringClass ||
- element == compiler.listClass);
- }
-
TypeChecks cachedRequiredChecks;
TypeChecks getRequiredChecks() {
@@ -294,4 +285,14 @@ class TypeCheckMapping implements TypeChecks {
}
Iterator<ClassElement> get iterator => map.keys.iterator;
+
+ String toString() {
+ StringBuffer sb = new StringBuffer();
+ for (ClassElement holder in this) {
+ for (ClassElement check in [holder]) {
+ sb.add('${holder.name.slowToString()}.${check.name.slowToString()}, ');
+ }
+ }
+ return '[$sb]';
+ }
}

Powered by Google App Engine
This is Rietveld 408576698