[front_end] Remove unreachable code.
This code started getting flagged as unreachable when the language
version was bumped to 3.9 in
https://dart-review.googlesource.com/c/sdk/+/447628, due to stronger
flow analysis.
Change-Id: I6a6a69646e972f649ba8f47aa43811118a308375
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/447740
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
diff --git a/pkg/front_end/lib/src/base/incremental_compiler.dart b/pkg/front_end/lib/src/base/incremental_compiler.dart
index e83dbb2..b2488a6 100644
--- a/pkg/front_end/lib/src/base/incremental_compiler.dart
+++ b/pkg/front_end/lib/src/base/incremental_compiler.dart
@@ -526,27 +526,16 @@
componentWithDill,
);
- // If we didn't get a result, go back to the previous one so expression
- // calculation has the potential to work.
- // ignore: unnecessary_null_comparison, dead_code
- if (componentWithDill == null) {
- // Coverage-ignore-block(suite): Not run.
- currentKernelTarget.loader.clearLibraryBuilders();
- currentKernelTarget = lastGoodKernelTarget!;
- _dillLoadedData!.loader.currentSourceLoader =
- currentKernelTarget.loader;
- } else {
- _benchmarker
- // Coverage-ignore(suite): Not run.
- ?.enterPhase(
- BenchmarkPhases.incremental_convertSourceLibraryBuildersToDill,
- );
- _previousSourceBuilders = _convertSourceLibraryBuildersToDill(
- currentKernelTarget,
- experimentalInvalidation,
- cleanedUpBuilders: cleanedUpBuilders,
- );
- }
+ _benchmarker
+ // Coverage-ignore(suite): Not run.
+ ?.enterPhase(
+ BenchmarkPhases.incremental_convertSourceLibraryBuildersToDill,
+ );
+ _previousSourceBuilders = _convertSourceLibraryBuildersToDill(
+ currentKernelTarget,
+ experimentalInvalidation,
+ cleanedUpBuilders: cleanedUpBuilders,
+ );
_benchmarker
// Coverage-ignore(suite): Not run.
@@ -554,14 +543,7 @@
experimentalInvalidation = null;
// Output result.
- // ignore: unnecessary_null_comparison
- Procedure? mainMethod = componentWithDill == null
- ?
- // Coverage-ignore(suite): Not run.
- // ignore: dead_code
- data.component?.mainMethod
- : componentWithDill.mainMethod;
- // ignore: unnecessary_null_comparison
+ Procedure? mainMethod = componentWithDill.mainMethod;
Component result =
context.options.target.configureComponent(
new Component(