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

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: Fix a long line. 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 bfad2078dfcb9b3a5fea2f08d9412d4320bf9230..e8930755916d4ea7b4d2dfa521bf0b4067a46537 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/runtime_types.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/runtime_types.dart
@@ -62,6 +62,16 @@ class RuntimeTypeInformation {
}
}
}
+
+ // TODO(karlklose): remove this temporary fix: we need to add the classes
+ // used in substitutions to addArguments.
ngeoffray 2013/02/28 12:14:52 What's the implication of this? The comment is not
karlklose 2013/02/28 12:20:46 We will generate holders for these in every progra
ngeoffray 2013/02/28 12:39:03 OK, please make sure fixing this is #1 in your TOD
+ allArguments.addAll([compiler.intClass,
+ compiler.boolClass,
+ compiler.numClass,
+ compiler.doubleClass,
+ compiler.stringClass,
+ compiler.listClass]);
+
return cachedRequiredChecks = requiredChecks;
}
@@ -294,4 +304,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