Index: pkg/front_end/lib/src/fasta/kernel/kernel_outline_shaker.dart |
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_outline_shaker.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_outline_shaker.dart |
index bb18d8420e5d643b0a8b85cf85c630f170f5adf2..0f59af0e01ae47741650f4650a3e9cccc89b2ac2 100644 |
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_outline_shaker.dart |
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_outline_shaker.dart |
@@ -15,9 +15,8 @@ import '../errors.dart' show internalError; |
/// |
/// This applies a simple "tree-shaking" technique: the full body of libraries |
/// whose URI match [isIncluded] is preserved, and so is the outline of the |
-/// members and classes which are indicated by [data] (which should |
-/// practically include all members and classes transitively visible from the |
-/// included libraries). |
+/// members and classes which are transitively visible from the |
+/// included libraries. |
/// |
/// The intent is that the resulting program has the entire code that is meant |
/// to be included and the minimum required to prevent dangling references and |
@@ -26,7 +25,9 @@ import '../errors.dart' show internalError; |
/// Note that the resulting program may include libraries not in [isIncluded], |
/// but those will be marked as external. There should be no method bodies for |
/// any members of those libraries. |
-void trimProgram(Program program, RetainedData data, bool isIncluded(Uri uri)) { |
+void trimProgram(Program program, bool isIncluded(Uri uri)) { |
+ var data = new RetainedDataBuilder(); |
+ new RootsMarker(new CoreTypes(program), data).run(program, isIncluded); |
new KernelOutlineShaker(data, isIncluded).transform(program); |
} |