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

Unified Diff: pkg/front_end/lib/src/fasta/kernel/kernel_outline_shaker.dart

Issue 2953703002: Tweak public APIs and use them in patch_sdk, dart2js, and kernel-service (Closed)
Patch Set: cl review updates: cleanup in kernel deserialization Created 3 years, 5 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/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);
}
« no previous file with comments | « pkg/front_end/lib/src/fasta/kernel/body_builder.dart ('k') | pkg/front_end/lib/src/fasta/kernel/kernel_target.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698