| Index: pkg/compiler/lib/src/cps_ir/type_mask_system.dart
|
| diff --git a/pkg/compiler/lib/src/cps_ir/type_mask_system.dart b/pkg/compiler/lib/src/cps_ir/type_mask_system.dart
|
| index b8167b7447c522df44380ece440b2acdb3ae4d1a..c2d704291545fe865a83285849b38ed31c4afc94 100644
|
| --- a/pkg/compiler/lib/src/cps_ir/type_mask_system.dart
|
| +++ b/pkg/compiler/lib/src/cps_ir/type_mask_system.dart
|
| @@ -38,6 +38,10 @@ class TypeMaskSystem {
|
| TypeMask get nullType => inferrer.nullType;
|
| TypeMask get extendableNativeListType => backend.extendableArrayType;
|
|
|
| + TypeMask get uint31Type => inferrer.uint31Type;
|
| + TypeMask get uint32Type => inferrer.uint32Type;
|
| + TypeMask get uintType => inferrer.positiveIntType;
|
| +
|
| TypeMask numStringBoolType;
|
| TypeMask interceptorType;
|
|
|
| @@ -199,6 +203,21 @@ class TypeMaskSystem {
|
| return t.satisfies(backend.jsIntClass, classWorld);
|
| }
|
|
|
| + bool isDefinitelyUint31(TypeMask t, {bool allowNull: false}) {
|
| + if (!allowNull && t.isNullable) return false;
|
| + return t.satisfies(backend.jsUInt31Class, classWorld);
|
| + }
|
| +
|
| + bool isDefinitelyUint32(TypeMask t, {bool allowNull: false}) {
|
| + if (!allowNull && t.isNullable) return false;
|
| + return t.satisfies(backend.jsUInt32Class, classWorld);
|
| + }
|
| +
|
| + bool isDefinitelyUint(TypeMask t, {bool allowNull: false}) {
|
| + if (!allowNull && t.isNullable) return false;
|
| + return t.satisfies(backend.jsPositiveIntClass, classWorld);
|
| + }
|
| +
|
| // TODO(sra): Find a better name. 'NativeList' is a bad name because there
|
| // are many native classes in dart:html that implement List but are not (and
|
| // should not be) included in this predicate.
|
|
|