Skip to content

Commit 88eb64d

Browse files
fishythefishCommit Queue
authored andcommitted
[dart2js] Use enumset API for typemask bits.
Change-Id: I8f513d92d05290dceb53edc5f99a6d84a11a5571 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/399121 Reviewed-by: Nate Biggs <[email protected]> Commit-Queue: Mayank Patke <[email protected]>
1 parent 57c3f53 commit 88eb64d

17 files changed

+458
-320
lines changed

pkg/compiler/lib/src/inferrer/typemasks/container_type_mask.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,16 @@ class ContainerTypeMask extends AllocationTypeMask {
5757
}
5858

5959
@override
60-
ContainerTypeMask withFlags({bool? isNullable, bool? hasLateSentinel}) {
60+
ContainerTypeMask withSpecialValues(
61+
{bool? isNullable, bool? hasLateSentinel}) {
6162
isNullable ??= this.isNullable;
6263
hasLateSentinel ??= this.hasLateSentinel;
6364
if (isNullable == this.isNullable &&
6465
hasLateSentinel == this.hasLateSentinel) {
6566
return this;
6667
}
6768
return ContainerTypeMask(
68-
forwardTo.withFlags(
69+
forwardTo.withSpecialValues(
6970
isNullable: isNullable, hasLateSentinel: hasLateSentinel),
7071
allocationNode,
7172
allocationElement,

pkg/compiler/lib/src/inferrer/typemasks/dictionary_type_mask.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,16 @@ class DictionaryTypeMask extends MapTypeMask {
5252
}
5353

5454
@override
55-
DictionaryTypeMask withFlags({bool? isNullable, bool? hasLateSentinel}) {
55+
DictionaryTypeMask withSpecialValues(
56+
{bool? isNullable, bool? hasLateSentinel}) {
5657
isNullable ??= this.isNullable;
5758
hasLateSentinel ??= this.hasLateSentinel;
5859
if (isNullable == this.isNullable &&
5960
hasLateSentinel == this.hasLateSentinel) {
6061
return this;
6162
}
6263
return DictionaryTypeMask(
63-
forwardTo.withFlags(
64+
forwardTo.withSpecialValues(
6465
isNullable: isNullable, hasLateSentinel: hasLateSentinel),
6566
allocationNode,
6667
allocationElement,

0 commit comments

Comments
 (0)