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

Unified Diff: pkg/kernel/lib/target/vm.dart

Issue 2918593003: Pass ClassHierarchy instead of creating it. (Closed)
Patch Set: Created 3 years, 7 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/kernel/lib/target/vm.dart
diff --git a/pkg/kernel/lib/target/vm.dart b/pkg/kernel/lib/target/vm.dart
index 03c3f31709422c5b5f53996244774909945d7123..eae4b7fbc0ffd8ac52d53bcaeaee40060c979afe 100644
--- a/pkg/kernel/lib/target/vm.dart
+++ b/pkg/kernel/lib/target/vm.dart
@@ -56,8 +56,9 @@ class VmTarget extends Target {
ClassHierarchy _hierarchy;
- void performModularTransformations(CoreTypes coreTypes, Program program) {
- var mixins = new mix.MixinFullResolution(this, coreTypes)
+ void performModularTransformations(
+ CoreTypes coreTypes, ClassHierarchy hierarchy, Program program) {
+ var mixins = new mix.MixinFullResolution(this, coreTypes, hierarchy)
..transform(program.libraries);
_hierarchy = mixins.hierarchy;
@@ -65,9 +66,8 @@ class VmTarget extends Target {
void performGlobalTransformations(CoreTypes coreTypes, Program program) {
if (strongMode) {
- new InsertTypeChecks(coreTypes, hierarchy: _hierarchy)
- .transformProgram(program);
- new InsertCovarianceChecks(coreTypes, hierarchy: _hierarchy)
+ new InsertTypeChecks(coreTypes, _hierarchy).transformProgram(program);
+ new InsertCovarianceChecks(coreTypes, _hierarchy)
.transformProgram(program);
}
@@ -85,10 +85,8 @@ class VmTarget extends Target {
}
void performTreeShaking(CoreTypes coreTypes, Program program) {
- new TreeShaker(coreTypes, program,
- hierarchy: _hierarchy,
- strongMode: strongMode,
- programRoots: flags.programRoots)
+ new TreeShaker(coreTypes, _hierarchy, program,
+ strongMode: strongMode, programRoots: flags.programRoots)
.transform(program);
_hierarchy = null; // Hierarchy must be recomputed.
}

Powered by Google App Engine
This is Rietveld 408576698