Skip to content

Commit c96f192

Browse files
alexmarkovcommit-bot@chromium.org
authored andcommitted
Revert "[vm/nnbd] Enable type testing stubs in NNBD weak mode"
This reverts commit bffc9d1. Reason for revert: timeouts in internal builds (b/149301517). Original change's description: > [vm/nnbd] Enable type testing stubs in NNBD weak mode > > According to the current NNBD spec we should use legacy subtyping rules > when running in weak mode (disregarding nullability and accepting 'null' > in type casts). So we can reuse exactly the same type testing stubs as > we used before (in NNBD weak mode). > > Change-Id: I387660fc2c8b36eb993239de9e34cc2bf9f7bb93 > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135381 > Commit-Queue: Alexander Markov <alexmarkov@google.com> > Reviewed-by: Régis Crelier <regis@google.com> TBR=alexmarkov@google.com,regis@google.com Change-Id: I60c2aa74d35c42b6d6149ad3ddec59361c3de41f No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135481 Reviewed-by: Alexander Markov <alexmarkov@google.com> Commit-Queue: Alexander Markov <alexmarkov@google.com>
1 parent 08778f9 commit c96f192

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

runtime/vm/compiler/backend/il.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -387,9 +387,9 @@ bool HierarchyInfo::CanUseSubtypeRangeCheckFor(const AbstractType& type) {
387387
// arguments are not "dynamic" but instantiated-to-bounds.
388388
const Type& rare_type =
389389
Type::Handle(zone, Type::RawCast(type_class.RareType()));
390-
// TODO(dartbug.com/38845): revise when supporting NNBD strong mode.
391-
if (!rare_type.IsEquivalent(type, TypeEquality::kIgnoreNullability)) {
392-
ASSERT(type.arguments() != TypeArguments::null());
390+
// TODO(regis): Revisit the usage of TypeEquality::kSyntactical when
391+
// implementing strong mode.
392+
if (!rare_type.IsEquivalent(type, TypeEquality::kSyntactical)) {
393393
return false;
394394
}
395395
}

runtime/vm/type_testing_stubs.cc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,9 @@ RawCode* TypeTestingStubGenerator::DefaultCodeForType(
111111
}
112112

113113
if (type.IsType() || type.IsTypeParameter()) {
114-
// TODO(dartbug.com/38845): Add support for specialized TTS for
115-
// nullable and non-nullable types in NNBD strong mode.
114+
// TODO(dartbug.com/39755): Add support for specialized NNBD TTS.
116115
const bool should_specialize =
117-
!FLAG_precompiled_mode && lazy_specialize &&
118-
(type.IsLegacy() || !FLAG_strong_non_nullable_type_checks);
116+
!FLAG_precompiled_mode && lazy_specialize && type.IsLegacy();
119117
return should_specialize ? StubCode::LazySpecializeTypeTest().raw()
120118
: StubCode::DefaultTypeTest().raw();
121119
}

0 commit comments

Comments
 (0)