dart-sdk/runtime
Tess Strickland bb1640eec2 Reland "[vm/compiler] Add more checks in TTSes for uninstantiated types."
This is a reland of 1016bbadde

The broken benchmarks causing the revert were not due to this CL.

TEST=vm/cc/TTS

Original change's description:
> [vm/compiler] Add more checks in TTSes for uninstantiated types.
>
> In certain cases, optimized type testing stubs for uninstantiated types
> compare the instantiation of the type arguments for the type against the
> corresponding instance type arguments. Previously, only an identity
> check was generated, so the instantiation had to match the instance type
> argument exactly.
>
> This CL adds checks for the following cases:
> * The instantiated type argument is dynamic, void, or Object.
> * The instance type argument is Null or Never.
>
> When strong null safety is enabled, we also check that the the instance
> type argument is legacy or non-nullable when the instantiated type
> argument is non-nullable Object or that the instantiated type argument
> is nullable or legacy when the instance type argument is Null.
>
> This CL also adds handling for the case where the instantiated or
> instance type argument is not a Type, which is necessary for safely
> retrieving the type class id and nullability, and allocates some
> additional registers in TTSInternalRegs for storing type arguments. On
> ARM7, this requires pushes/pops around type argument checking, because
> we've run out of registers there.
>
> Fixes https://github.com/dart-lang/sdk/issues/40736
>
> TEST=vm/cc/TTS
>
> Bug: https://github.com/dart-lang/sdk/issues/46920
> Cq-Include-Trybots: luci.dart.try:vm-kernel-linux-release-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-nnbd-linux-release-x64-try,vm-kernel-nnbd-linux-release-x64-try,vm-kernel-linux-product-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try
> Change-Id: Ib8498fd2b9593b4abb92111f062ed2fc95a45c16
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210681
> Commit-Queue: Tess Strickland <sstrickl@google.com>
> Reviewed-by: Alexander Markov <alexmarkov@google.com>

Bug: https://github.com/dart-lang/sdk/issues/46920
Change-Id: Id84730b3bb292ea7fdfe9ebd8b1fc6e71c64cf22
Cq-Include-Trybots: luci.dart.try:vm-kernel-linux-release-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-nnbd-linux-release-x64-try,vm-kernel-nnbd-linux-release-x64-try,vm-kernel-linux-product-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/211901
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2021-09-27 10:57:18 +00:00
..
bin [ CLI / VM ] Add support for disabling DDS 2021-09-16 20:31:45 +00:00
docs [vm] Rename clustered_snapshot.h/cc to app_snapshot.h/cc. 2021-09-16 00:13:34 +00:00
include [vm] Remove Dart_GetImportsOfScheme. 2021-09-14 21:18:37 +00:00
lib [vm] Adds args_n to FFI resolver. 2021-09-13 07:57:00 +00:00
observatory [ VM / Service ] Fix 'dart:' scripts lookup 2021-09-24 01:20:38 +00:00
observatory_2 [ VM / Service ] Fix 'dart:' scripts lookup 2021-09-24 01:20:38 +00:00
platform [vm] Remove support for dart-ext: imports 2021-09-02 14:14:35 +00:00
tests [vm/ffi] Skips new DartAPI FFI tests on simarm. 2021-09-27 10:22:33 +00:00
third_party [tools] Update all iteritems -> items 2021-05-20 11:36:52 +00:00
tools [vm] Use UTF-8 to read files in *_layering_check.py 2021-09-24 09:50:27 +00:00
vm Reland "[vm/compiler] Add more checks in TTSes for uninstantiated types." 2021-09-27 10:57:18 +00:00
.clang-tidy
.gitignore
BUILD.gn Allow deprecated copy on fuchsia 2021-08-11 01:14:22 +00:00
codereview.settings
configs.gni Reland "[vm] Build dart2native dependencies with the normal "create_sdk" target" 2020-06-17 16:12:26 +00:00
CPPLINT.cfg
PRESUBMIT.py [python3] Migrate PRESUBMIT.py files 2021-08-16 08:29:54 +00:00
runtime_args.gni [wasm] Remove deprecated dart_enable_wasm flag. 2021-04-01 22:45:07 +00:00