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

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

Issue 2697873007: Merge the work on Generic Types Reification from 'dart-lang/reify' repo (Closed)
Patch Set: Get back parameter erroneously removed by previous commit Created 3 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
« no previous file with comments | « pkg/kernel/lib/target/targets.dart ('k') | pkg/kernel/lib/target/vmreify.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/kernel/lib/target/vm.dart
diff --git a/pkg/kernel/lib/target/vm.dart b/pkg/kernel/lib/target/vm.dart
index 1366cae89f9e141531037064d183179c105de028..ed225449dd95610b8939b2bdcce16e0e4366092d 100644
--- a/pkg/kernel/lib/target/vm.dart
+++ b/pkg/kernel/lib/target/vm.dart
@@ -74,13 +74,7 @@ class VmTarget extends Target {
}
if (flags.treeShake) {
- new TreeShaker(program,
- hierarchy: _hierarchy,
- coreTypes: coreTypes,
- strongMode: strongMode,
- programRoots: flags.programRoots)
- .transform(program);
- _hierarchy = null; // Hierarchy must be recomputed.
+ performTreeShaking(program);
}
cont.transformProgram(program);
@@ -94,4 +88,15 @@ class VmTarget extends Target {
new SanitizeForVM().transform(program);
}
+
+ void performTreeShaking(Program program) {
+ var coreTypes = new CoreTypes(program);
+ new TreeShaker(program,
+ hierarchy: _hierarchy,
+ coreTypes: coreTypes,
+ strongMode: strongMode,
+ programRoots: flags.programRoots)
+ .transform(program);
+ _hierarchy = null; // Hierarchy must be recomputed.
+ }
}
« no previous file with comments | « pkg/kernel/lib/target/targets.dart ('k') | pkg/kernel/lib/target/vmreify.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698