dart-sdk/runtime/platform
Tess Strickland 431ed5183f [vm/compiler] Reduce number of subtype comparisons in AOT.
Previously when building subtype class id ranges for a class in AOT, we
looped over the entire class table, even though in most cases, the
number of actual subclasses and implementors of the class is a small
subset of all loaded classes.

Instead, use the same hierarchy information in both JIT and AOT, only
falling back to traversing the entire class table in cases where the
hierarchy information is missing.

Additional changes:
* Do not generate unused type argument checks if the subtype class id
  range to check is empty.
* Only generate a nullability check when checking that an instance
  type argument is a subtype of non-nullable Object in null safe mode.
* Fix AbstractType::IsSubtypeOf so _Closure <: Function.

Fixes https://github.com/dart-lang/sdk/issues/46936

TEST=vm/cc/HierarchyInfo

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-tsan-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: Ic0310208d271ef04e778f070f420ae0abbdd47d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210581
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2021-08-19 18:32:01 +00:00
..
address_sanitizer.h [vm] Fix LSAN when used without ASAN. 2020-05-12 17:38:19 +00:00
allocation.cc [vm] Produce clearer error messages for malloc/realloc failures. 2020-11-13 22:10:54 +00:00
allocation.h [vm] Produce clearer error messages for malloc/realloc failures. 2020-11-13 22:10:54 +00:00
assert.cc [vm/compiler] Reduce number of subtype comparisons in AOT. 2021-08-19 18:32:01 +00:00
assert.h [vm/compiler] Reduce number of subtype comparisons in AOT. 2021-08-19 18:32:01 +00:00
atomic.h [ VM / Service ] Allow for CpuSamples to be streamed when samples are about to be overwritten. 2021-07-16 20:50:58 +00:00
BUILD.gn [fuchsia] allow injecting the inspect node 2021-03-22 17:38:24 +00:00
elf.h [vm] Simplify symbol naming/address retrieval. 2020-10-06 17:10:05 +00:00
floating_point.h [gardening] Fix import to fix Flutter build 2019-09-06 09:08:49 +00:00
floating_point_win.cc [vm] Reland: Prefix HOST_OS_* and TARGET_OS_* with DART_ 2021-07-02 19:06:45 +00:00
floating_point_win.h Make header include guards great again 2016-10-26 00:26:03 -07:00
globals.h [vm] Introduce HAS_SMI_63_BITS 2021-08-03 13:19:01 +00:00
growable_array.h [vm/concurrency] Implement a fast transitive object copy for isolate message passing 2021-07-13 19:04:20 +00:00
hashmap.cc [vm] Produce clearer error messages when operator new fails. 2020-11-13 19:07:20 +00:00
hashmap.h [vm] Propagate more UTF8 conversion errors 2018-09-06 02:23:21 +00:00
leak_sanitizer.h [vm] Fix LSAN when used without ASAN. 2020-05-12 17:38:19 +00:00
memory_sanitizer.h [vm, io] Fix some MemorySanitizer issues. 2020-02-27 17:50:43 +00:00
platform_sources.gni [vm] Produce clearer error messages for malloc/realloc failures. 2020-11-13 22:10:54 +00:00
priority_queue.h [vm] Make event handler use appropriate data structure for timers 2020-12-16 10:55:12 +00:00
safe_stack.h [vm] Fix various UBSan failures. 2020-05-07 19:40:18 +00:00
signal_blocker.h [vm] Reland: Prefix HOST_OS_* and TARGET_OS_* with DART_ 2021-07-02 19:06:45 +00:00
splay-tree-inl.h [ VM ] Updated splay-tree licenses, added V8 project authors to AUTHORS 2019-04-30 19:50:46 +00:00
splay-tree.h [ VM ] Updated splay-tree licenses, added V8 project authors to AUTHORS 2019-04-30 19:50:46 +00:00
syslog.h [build] Remove last platform -> vm and bin -> vm dependencies. Fix some ODR violations. 2019-04-22 20:15:43 +00:00
syslog_android.cc [vm] Reland: Prefix HOST_OS_* and TARGET_OS_* with DART_ 2021-07-02 19:06:45 +00:00
syslog_fuchsia.cc [vm] Reland: Prefix HOST_OS_* and TARGET_OS_* with DART_ 2021-07-02 19:06:45 +00:00
syslog_linux.cc [vm] Reland: Prefix HOST_OS_* and TARGET_OS_* with DART_ 2021-07-02 19:06:45 +00:00
syslog_macos.cc [vm] Reland: Prefix HOST_OS_* and TARGET_OS_* with DART_ 2021-07-02 19:06:45 +00:00
syslog_win.cc [vm] Reland: Prefix HOST_OS_* and TARGET_OS_* with DART_ 2021-07-02 19:06:45 +00:00
text_buffer.cc [vm] Add buffering of --trace_precompiler_to output in memory 2020-12-11 18:19:39 +00:00
text_buffer.h [vm] Add buffering of --trace_precompiler_to output in memory 2020-12-11 18:19:39 +00:00
thread_sanitizer.h [vm/concurrency] Notify tsan of load-acquire/store-release from generated code. 2021-07-15 13:26:56 +00:00
unaligned.h [vm] Fix various UBSan failures. 2020-05-07 19:40:18 +00:00
undefined_behavior_sanitizer.h [vm] Fix various UBSan failures. 2020-05-07 19:40:18 +00:00
unicode.cc [dart/fuzzer] Mechanism for target functions 2019-05-02 18:12:19 +00:00
unicode.h [vm] Adjust internal UTF-8 encoder to match dart:convert. 2020-06-29 16:10:13 +00:00
utils.cc [vm] Reland: Prefix HOST_OS_* and TARGET_OS_* with DART_ 2021-07-02 19:06:45 +00:00
utils.h [platform] Make NBitMask, Bit, and TestBit constexpr. 2021-07-27 11:22:47 +00:00
utils_android.cc [vm] Reland: Prefix HOST_OS_* and TARGET_OS_* with DART_ 2021-07-02 19:06:45 +00:00
utils_android.h [vm/compiler] bit utilities 2019-10-07 18:13:06 +00:00
utils_fuchsia.cc [vm] Reland: Prefix HOST_OS_* and TARGET_OS_* with DART_ 2021-07-02 19:06:45 +00:00
utils_fuchsia.h [fuchsia] allow injecting the inspect node 2021-03-22 17:38:24 +00:00
utils_linux.cc [vm] Reland: Prefix HOST_OS_* and TARGET_OS_* with DART_ 2021-07-02 19:06:45 +00:00
utils_linux.h [vm/compiler] bit utilities 2019-10-07 18:13:06 +00:00
utils_macos.cc [vm] Reland: Prefix HOST_OS_* and TARGET_OS_* with DART_ 2021-07-02 19:06:45 +00:00
utils_macos.h [vm/compiler] bit utilities 2019-10-07 18:13:06 +00:00
utils_win.cc [vm] Reland: Prefix HOST_OS_* and TARGET_OS_* with DART_ 2021-07-02 19:06:45 +00:00
utils_win.h [vm/compiler] bit utilities 2019-10-07 18:13:06 +00:00