@@ -16,8 +16,7 @@ import 'dart:_foreign_helper'
1616 JS_GET_NAME,
1717 JS_STRING_CONCAT,
1818 RAW_DART_FUNCTION_REF,
19- TYPE_REF,
20- LEGACY_TYPE_REF;
19+ TYPE_REF;
2120import 'dart:_interceptors'
2221 show JavaScriptFunction, JSArray, JSNull, JSUnmodifiableArray;
2322import 'dart:_js_helper'
@@ -1477,8 +1476,6 @@ Object? _installSpecializedAsCheck(Object? object) {
14771476bool _nullIs (Rti testRti) {
14781477 int kind = Rti ._getKind (testRti);
14791478 return isSoundTopType (testRti) ||
1480- isLegacyObjectType (testRti) ||
1481- _Utils .isIdentical (testRti, LEGACY_TYPE_REF <Never >()) ||
14821479 kind == Rti .kindQuestion ||
14831480 kind == Rti .kindStar && _nullIs (Rti ._getStarArgument (testRti)) ||
14841481 kind == Rti .kindFutureOr && _nullIs (Rti ._getFutureOrArgument (testRti)) ||
@@ -2686,8 +2683,7 @@ class _Universe {
26862683 baseKind == Rti .kindFutureOr &&
26872684 isNullable (Rti ._getFutureOrArgument (baseType))) {
26882685 return baseType;
2689- } else if (baseKind == Rti .kindNever ||
2690- _Utils .isIdentical (baseType, LEGACY_TYPE_REF <Never >())) {
2686+ } else if (baseKind == Rti .kindNever) {
26912687 return TYPE_REF <Null >();
26922688 } else if (baseKind == Rti .kindStar) {
26932689 Rti starArgument = Rti ._getStarArgument (baseType);
@@ -2731,9 +2727,7 @@ class _Universe {
27312727 ) {
27322728 if (normalize) {
27332729 int baseKind = Rti ._getKind (baseType);
2734- if (isSoundTopType (baseType) ||
2735- isObjectType (baseType) ||
2736- isLegacyObjectType (baseType)) {
2730+ if (isSoundTopType (baseType) || isObjectType (baseType)) {
27372731 return baseType;
27382732 } else if (baseKind == Rti .kindNever) {
27392733 return _lookupFutureRti (universe, baseType);
@@ -4358,7 +4352,7 @@ bool isDefinitelyTopType(Rti t) => isTopType(
43584352
43594353@pragma ('dart2js:parameter:trust' )
43604354bool isTopType (Rti t, bool isLegacy) =>
4361- isSoundTopType (t) || isLegacyObjectType (t) || isLegacy && isObjectType (t);
4355+ isSoundTopType (t) || isLegacy && isObjectType (t);
43624356
43634357bool isSoundTopType (Rti t) {
43644358 int kind = Rti ._getKind (t);
@@ -4373,8 +4367,6 @@ bool isBottomType(Rti t, bool isLegacy) =>
43734367 Rti ._getKind (t) == Rti .kindNever || isLegacy && isNullType (t);
43744368
43754369bool isObjectType (Rti t) => _Utils .isIdentical (t, TYPE_REF <Object >());
4376- bool isLegacyObjectType (Rti t) =>
4377- _Utils .isIdentical (t, LEGACY_TYPE_REF <Object >());
43784370bool isNullableObjectType (Rti t) => _Utils .isIdentical (t, TYPE_REF <Object ?>());
43794371bool isNullType (Rti t) =>
43804372 _Utils .isIdentical (t, TYPE_REF <Null >()) ||
0 commit comments