Skip to content

Commit

Permalink
[cfe] Use exhaustive switch in isSubtypeOf
Browse files Browse the repository at this point in the history
This CL uses exhaustive switch statement instead of chained if
statements in the implementation of isSubtypeOf. In addition to that,
all of the individual methods for computing isSubtypeOf for specific
pairs of DartTypes are inlined into the switch statement.

Change-Id: I425e8d415d07767313c6f1ff796f7715e35f10bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382000
Commit-Queue: Chloe Stefantsova <[email protected]>
Reviewed-by: Johnni Winther <[email protected]>
  • Loading branch information
chloestefantsova authored and Commit Queue committed Aug 26, 2024
1 parent ee0b971 commit a02427f
Show file tree
Hide file tree
Showing 2 changed files with 911 additions and 1,402 deletions.
2 changes: 1 addition & 1 deletion pkg/front_end/test/coverage_suite_expected.dart
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ const Map<String, ({int hitCount, int missCount})> _expect = {
),
// 100.0%.
"package:front_end/src/kernel/const_conditional_simplifier.dart": (
hitCount: 72,
hitCount: 95,
missCount: 0,
),
// 100.0%.
Expand Down
Loading

0 comments on commit a02427f

Please sign in to comment.