Skip to content

Commit 9504e96

Browse files
stereotype441Commit Queue
authored andcommitted
[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 <[email protected]> Auto-Submit: Paul Berry <[email protected]> Reviewed-by: Johnni Winther <[email protected]>
1 parent a621589 commit 9504e96

File tree

1 file changed

+11
-29
lines changed

1 file changed

+11
-29
lines changed

pkg/front_end/lib/src/base/incremental_compiler.dart

Lines changed: 11 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -526,42 +526,24 @@ class IncrementalCompiler implements IncrementalKernelGenerator {
526526
componentWithDill,
527527
);
528528

529-
// If we didn't get a result, go back to the previous one so expression
530-
// calculation has the potential to work.
531-
// ignore: unnecessary_null_comparison, dead_code
532-
if (componentWithDill == null) {
533-
// Coverage-ignore-block(suite): Not run.
534-
currentKernelTarget.loader.clearLibraryBuilders();
535-
currentKernelTarget = lastGoodKernelTarget!;
536-
_dillLoadedData!.loader.currentSourceLoader =
537-
currentKernelTarget.loader;
538-
} else {
539-
_benchmarker
540-
// Coverage-ignore(suite): Not run.
541-
?.enterPhase(
542-
BenchmarkPhases.incremental_convertSourceLibraryBuildersToDill,
543-
);
544-
_previousSourceBuilders = _convertSourceLibraryBuildersToDill(
545-
currentKernelTarget,
546-
experimentalInvalidation,
547-
cleanedUpBuilders: cleanedUpBuilders,
548-
);
549-
}
529+
_benchmarker
530+
// Coverage-ignore(suite): Not run.
531+
?.enterPhase(
532+
BenchmarkPhases.incremental_convertSourceLibraryBuildersToDill,
533+
);
534+
_previousSourceBuilders = _convertSourceLibraryBuildersToDill(
535+
currentKernelTarget,
536+
experimentalInvalidation,
537+
cleanedUpBuilders: cleanedUpBuilders,
538+
);
550539

551540
_benchmarker
552541
// Coverage-ignore(suite): Not run.
553542
?.enterPhase(BenchmarkPhases.incremental_end);
554543
experimentalInvalidation = null;
555544

556545
// Output result.
557-
// ignore: unnecessary_null_comparison
558-
Procedure? mainMethod = componentWithDill == null
559-
?
560-
// Coverage-ignore(suite): Not run.
561-
// ignore: dead_code
562-
data.component?.mainMethod
563-
: componentWithDill.mainMethod;
564-
// ignore: unnecessary_null_comparison
546+
Procedure? mainMethod = componentWithDill.mainMethod;
565547
Component result =
566548
context.options.target.configureComponent(
567549
new Component(

0 commit comments

Comments
 (0)