diff --git a/pkg/front_end/lib/src/base/incremental_compiler.dart b/pkg/front_end/lib/src/base/incremental_compiler.dart index 3588a98ad91..d995a1e4b01 100644 --- a/pkg/front_end/lib/src/base/incremental_compiler.dart +++ b/pkg/front_end/lib/src/base/incremental_compiler.dart @@ -441,10 +441,6 @@ class IncrementalCompiler implements IncrementalKernelGenerator { ); componentWithDill = buildResult.component; } - // Coverage-ignore(suite): Not run. - else if (componentWithDill != null) { - context.options.target.performOutlineTransformations(componentWithDill); - } _benchmarker // Coverage-ignore(suite): Not run. @@ -582,11 +578,6 @@ class IncrementalCompiler implements IncrementalKernelGenerator { // about other libraries. result.metadata.addAll(componentWithDill.metadata); - if (outlineOnly) { - // Coverage-ignore-block(suite): Not run. - context.options.target.performOutlineComponentOperations(result); - } - // We're now done. Allow any waiting compile to start. Completer currentlyCompilingLocal = _currentlyCompiling!; _currentlyCompiling = null; diff --git a/pkg/front_end/lib/src/kernel_generator_impl.dart b/pkg/front_end/lib/src/kernel_generator_impl.dart index 4ee685413fe..394619f7015 100644 --- a/pkg/front_end/lib/src/kernel_generator_impl.dart +++ b/pkg/front_end/lib/src/kernel_generator_impl.dart @@ -224,7 +224,6 @@ Future _buildInternal( // the only need we have for these transformations). if (!buildComponent) { options.target.performOutlineTransformations(trimmedSummaryComponent); - options.target.performOutlineComponentOperations(trimmedSummaryComponent); options.ticker.logMs("Transformed outline"); } if (serializeIfBuildingSummary) { diff --git a/pkg/frontend_server/lib/compute_kernel.dart b/pkg/frontend_server/lib/compute_kernel.dart index e0a7972dcbc..8aca0e1d9b5 100644 --- a/pkg/frontend_server/lib/compute_kernel.dart +++ b/pkg/frontend_server/lib/compute_kernel.dart @@ -483,6 +483,7 @@ Future computeKernel( incrementalComponent.uriToSource.clear(); incrementalComponent.problemsAsJson = null; incrementalComponent.setMainMethodAndMode(null, true); + target.performOutlineTransformations(incrementalComponent); makeStable(incrementalComponent); return new Future.value( fe.serializeComponent( diff --git a/pkg/kernel/lib/target/targets.dart b/pkg/kernel/lib/target/targets.dart index 62ba79613fd..ce2b72727cc 100644 --- a/pkg/kernel/lib/target/targets.dart +++ b/pkg/kernel/lib/target/targets.dart @@ -334,24 +334,13 @@ abstract class Target { /// Perform target-specific transformations on the outlines stored in /// [Component] when generating summaries. /// - /// This is used to transforming the libraries, but not for instance - /// filtering the output libraries or adding metadata. Do this in - /// [performOutlineComponentOperations] instead. - /// This transformation is not applied when compiling full kernel programs to + /// This transformation is used to add metadata on outlines and to filter + /// unnecessary information before generating program summaries. This + /// transformation is not applied when compiling full kernel programs to /// prevent affecting the internal invariants of the compiler and accidentally /// slowing down compilation. void performOutlineTransformations(Component component) {} - /// Perform target-specific operations on the [Component] storing the outlines - /// when generating summaries. - /// - /// This is not for transforming the libraries, but can be used to add - /// metadata and filter libraries. - /// This is not applied when compiling full kernel programs to prevent - /// affecting the internal invariants of the compiler and accidentally - /// slowing down compilation. - void performOutlineComponentOperations(Component component) {} - /// Perform target-specific transformations on the given libraries that must /// run before constant evaluation. void performPreConstantEvaluationTransformations( @@ -1033,11 +1022,6 @@ class TargetWrapper extends Target { _target.performOutlineTransformations(component); } - @override - void performOutlineComponentOperations(Component component) { - _target.performOutlineComponentOperations(component); - } - @override void performPreConstantEvaluationTransformations( Component component, @@ -1116,8 +1100,8 @@ mixin SummaryMixin on Target { bool get excludeNonSources; @override - void performOutlineComponentOperations(Component component) { - super.performOutlineComponentOperations(component); + void performOutlineTransformations(Component component) { + super.performOutlineTransformations(component); if (!excludeNonSources) return; List libraries = new List.of(component.libraries);