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

Unified Diff: pkg/kernel/lib/transformations/insert_covariance_checks.dart

Issue 2924713002: Replace ClassHierarchy.classes with getOrderedClasses(). (Closed)
Patch Set: Update getOrderedClasses() to return only given classes. Created 3 years, 6 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
« no previous file with comments | « pkg/kernel/lib/src/incremental_class_hierarchy.dart ('k') | pkg/kernel/test/class_hierarchy_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/kernel/lib/transformations/insert_covariance_checks.dart
diff --git a/pkg/kernel/lib/transformations/insert_covariance_checks.dart b/pkg/kernel/lib/transformations/insert_covariance_checks.dart
index 4367dd846fa3e8db5dabca82db2a4d2448c62894..a536697d710bec9c99c49636b73b6417267bfa3c 100644
--- a/pkg/kernel/lib/transformations/insert_covariance_checks.dart
+++ b/pkg/kernel/lib/transformations/insert_covariance_checks.dart
@@ -76,7 +76,11 @@ class InsertCovarianceChecks {
types = new TypeEnvironment(coreTypes, hierarchy);
// We transform every class before their subtypes.
// This ensures that transitive overrides are taken into account.
- hierarchy.classes.forEach(transformClass);
+ var unorderedClasses = program.libraries
+ .map((library) => library.classes)
+ .expand((classes) => classes);
+ var ordered = hierarchy.getOrderedClasses(unorderedClasses);
+ ordered.forEach(transformClass);
program.accept(new _CallTransformer(this));
}
« no previous file with comments | « pkg/kernel/lib/src/incremental_class_hierarchy.dart ('k') | pkg/kernel/test/class_hierarchy_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698