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

Unified Diff: pkg/compiler/lib/src/js_backend/runtime_types.dart

Issue 1783053005: Fix all for-in warnings in dart2js (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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: pkg/compiler/lib/src/js_backend/runtime_types.dart
diff --git a/pkg/compiler/lib/src/js_backend/runtime_types.dart b/pkg/compiler/lib/src/js_backend/runtime_types.dart
index 1501a939e5c5273a3f4ede38fd38ff5190d99505..c407039637915523f53d98e0b344d529bf1da445 100644
--- a/pkg/compiler/lib/src/js_backend/runtime_types.dart
+++ b/pkg/compiler/lib/src/js_backend/runtime_types.dart
@@ -8,8 +8,8 @@ part of js_backend;
abstract class TypeChecks {
/// Get the set of checks required for class [element].
Iterable<TypeCheck> operator[](ClassElement element);
- /// Get the iterator for all classes that need type checks.
- Iterator<ClassElement> get iterator;
+ /// Get the iterable for all classes that need type checks.
+ Iterable<ClassElement> get classes;
}
typedef jsAst.Expression OnVariableCallback(TypeVariableType variable);
@@ -478,7 +478,7 @@ class _RuntimeTypes implements RuntimeTypes {
TypeChecks checks) {
Set<ClassElement> instantiated = new Set<ClassElement>();
ArgumentCollector collector = new ArgumentCollector(backend);
- for (ClassElement target in checks) {
+ for (ClassElement target in checks.classes) {
instantiated.add(target);
for (TypeCheck check in checks[target]) {
Substitution substitution = check.substitution;
@@ -937,11 +937,11 @@ class TypeCheckMapping implements TypeChecks {
map[cls].add(new TypeCheck(check, substitution));
}
- Iterator<ClassElement> get iterator => map.keys.iterator;
+ Iterable<ClassElement> get classes => map.keys;
String toString() {
StringBuffer sb = new StringBuffer();
- for (ClassElement holder in this) {
+ for (ClassElement holder in this.allClassesNeedingTypeChecks) {
Siggi Cherem (dart-lang) 2016/03/12 00:40:19 => classes
sra1 2016/03/12 00:44:20 Done.
for (ClassElement check in [holder]) {
sb.write('${holder.name}.' '${check.name}, ');
}
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_emitter/type_test_registry.dart » ('j') | pkg/compiler/lib/src/util/util.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698