mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 14:32:24 +00:00
[vm] Specialize TTS stubs only for legacy types
This is a follow-up to 62835950d
which was using the condition
`type.IsNullable()` for determining whether to generate TTS stubs.
It turns out `type.IsNullable()` is false for legacy types (for whatever
reason, because legacy types are nulable).
Instead we'll change the condition to `type.IsLegacy()`.
Issue https://github.com/flutter/flutter/issues/49893
Change-Id: I4c8a728382c7b7c65ddb6bff41778b384634d83d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134164
Reviewed-by: Teagan Strickland <sstrickl@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
This commit is contained in:
parent
3210109ccf
commit
ce27d1a539
1 changed files with 1 additions and 1 deletions
|
@ -113,7 +113,7 @@ RawCode* TypeTestingStubGenerator::DefaultCodeForType(
|
|||
if (type.IsType() || type.IsTypeParameter()) {
|
||||
// TODO(dartbug.com/39755): Add support for specialized NNBD TTS.
|
||||
const bool should_specialize =
|
||||
!FLAG_precompiled_mode && lazy_specialize && type.IsNullable();
|
||||
!FLAG_precompiled_mode && lazy_specialize && type.IsLegacy();
|
||||
return should_specialize ? StubCode::LazySpecializeTypeTest().raw()
|
||||
: StubCode::DefaultTypeTest().raw();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue