2017-08-15 04:54:34 +00:00
|
|
|
# Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
|
|
|
|
# for details. All rights reserved. Use of this source code is governed by a
|
|
|
|
# BSD-style license that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
# This file contains all sources (vm and tests) for the dart virtual machine.
|
|
|
|
# Unit test files need to have a "_test" suffix appended to the name.
|
|
|
|
vm_sources = [
|
|
|
|
"allocation.cc",
|
|
|
|
"allocation.h",
|
2018-06-05 04:16:39 +00:00
|
|
|
"base64.cc",
|
|
|
|
"base64.h",
|
2017-08-15 04:54:34 +00:00
|
|
|
"base_isolate.h",
|
|
|
|
"bit_vector.cc",
|
|
|
|
"bit_vector.h",
|
|
|
|
"bitfield.h",
|
|
|
|
"bitmap.cc",
|
|
|
|
"bitmap.h",
|
|
|
|
"boolfield.h",
|
|
|
|
"bootstrap.h",
|
|
|
|
"bootstrap_natives.cc",
|
|
|
|
"bootstrap_natives.h",
|
2019-09-18 14:56:27 +00:00
|
|
|
"bss_relocs.cc",
|
|
|
|
"bss_relocs.h",
|
2020-12-07 19:43:48 +00:00
|
|
|
"canonical_tables.cc",
|
2020-09-23 19:13:29 +00:00
|
|
|
"canonical_tables.h",
|
2017-08-15 04:54:34 +00:00
|
|
|
"class_finalizer.cc",
|
|
|
|
"class_finalizer.h",
|
2019-01-25 16:45:13 +00:00
|
|
|
"class_id.h",
|
2017-08-15 04:54:34 +00:00
|
|
|
"class_table.cc",
|
|
|
|
"class_table.h",
|
2021-01-07 09:41:27 +00:00
|
|
|
"closure_functions_cache.cc",
|
|
|
|
"closure_functions_cache.h",
|
2017-08-15 04:54:34 +00:00
|
|
|
"clustered_snapshot.cc",
|
|
|
|
"clustered_snapshot.h",
|
2019-08-21 13:33:37 +00:00
|
|
|
"code_comments.cc",
|
2020-03-10 21:56:11 +00:00
|
|
|
"code_comments.h",
|
2017-08-15 04:54:34 +00:00
|
|
|
"code_descriptors.cc",
|
|
|
|
"code_descriptors.h",
|
2019-01-25 16:45:13 +00:00
|
|
|
"code_entry_kind.h",
|
2017-08-15 04:54:34 +00:00
|
|
|
"code_observers.cc",
|
|
|
|
"code_observers.h",
|
|
|
|
"code_patcher.cc",
|
|
|
|
"code_patcher.h",
|
|
|
|
"code_patcher_arm.cc",
|
|
|
|
"code_patcher_arm64.cc",
|
|
|
|
"code_patcher_ia32.cc",
|
|
|
|
"code_patcher_x64.cc",
|
|
|
|
"compilation_trace.cc",
|
|
|
|
"compilation_trace.h",
|
2019-04-10 13:15:16 +00:00
|
|
|
"constants_arm.cc",
|
2017-08-15 04:54:34 +00:00
|
|
|
"constants_arm.h",
|
2019-03-20 17:45:23 +00:00
|
|
|
"constants_arm64.cc",
|
2017-08-15 04:54:34 +00:00
|
|
|
"constants_arm64.h",
|
[vm] Clean up header file style guide violation
> Header files should be self-contained (compile on their own) and end in .h. Non-header files that are meant for inclusion should end in .inc and be used sparingly.
>
> All header files should be self-contained. Users and refactoring tools should not have to adhere to special conditions to include the header. Specifically, a header should have header guards and include all other headers it needs.
This cleans up header files referring to types and functions defined in the files including those header files.
This does not clean up the include guards in xyz_<arch>.h. We have currently 45 such include guards. We can clean that up by moving the #ifdefs from xyz.h to the individual xyz_<arch>.h files. A list of header files which cannot stand on itself is maintained in runtime/tools/run_clang_tidy.dart.
Change-Id: I9ab1fc09056d86e8ac59a80c063a812633cf7c71
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64-try,app-kernel-linux-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-kernel-precomp-linux-debug-x64-try,vm-dartkb-linux-release-x64-abi-try,vm-kernel-precomp-android-release-arm64-try,vm-kernel-asan-linux-release-x64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-precomp-android-release-arm_x64-try,vm-kernel-precomp-obfuscate-linux-release-x64-try,dart-sdk-linux-try,analyzer-analysis-server-linux-try,analyzer-linux-release-try,front-end-linux-release-x64-try,vm-kernel-precomp-win-release-x64-try,vm-kernel-mac-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135650
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-02-18 08:43:16 +00:00
|
|
|
"constants_base.h",
|
2019-03-20 17:45:23 +00:00
|
|
|
"constants_ia32.cc",
|
2019-04-08 09:45:27 +00:00
|
|
|
"constants_ia32.h",
|
2019-02-13 12:42:47 +00:00
|
|
|
"constants_x64.cc",
|
2017-08-15 04:54:34 +00:00
|
|
|
"constants_x64.h",
|
|
|
|
"cpu.h",
|
|
|
|
"cpu_arm.cc",
|
|
|
|
"cpu_arm64.cc",
|
|
|
|
"cpu_ia32.cc",
|
|
|
|
"cpu_x64.cc",
|
|
|
|
"cpuid.cc",
|
2017-09-04 14:18:37 +00:00
|
|
|
"cpuid.h",
|
2017-08-15 04:54:34 +00:00
|
|
|
"cpuinfo.h",
|
|
|
|
"cpuinfo_android.cc",
|
|
|
|
"cpuinfo_fuchsia.cc",
|
|
|
|
"cpuinfo_linux.cc",
|
|
|
|
"cpuinfo_macos.cc",
|
|
|
|
"cpuinfo_win.cc",
|
|
|
|
"dart.cc",
|
|
|
|
"dart.h",
|
|
|
|
"dart_api_impl.h",
|
|
|
|
"dart_api_message.cc",
|
|
|
|
"dart_api_message.h",
|
|
|
|
"dart_api_state.cc",
|
|
|
|
"dart_api_state.h",
|
|
|
|
"dart_entry.cc",
|
|
|
|
"dart_entry.h",
|
2018-03-08 19:26:17 +00:00
|
|
|
"datastream.cc",
|
2017-08-15 04:54:34 +00:00
|
|
|
"datastream.h",
|
|
|
|
"debugger.cc",
|
|
|
|
"debugger.h",
|
|
|
|
"debugger_arm.cc",
|
|
|
|
"debugger_arm64.cc",
|
|
|
|
"debugger_ia32.cc",
|
|
|
|
"debugger_x64.cc",
|
|
|
|
"deferred_objects.cc",
|
|
|
|
"deferred_objects.h",
|
|
|
|
"deopt_instructions.cc",
|
|
|
|
"deopt_instructions.h",
|
2020-02-03 11:04:15 +00:00
|
|
|
"dispatch_table.cc",
|
|
|
|
"dispatch_table.h",
|
2017-08-15 04:54:34 +00:00
|
|
|
"double_conversion.cc",
|
|
|
|
"double_conversion.h",
|
|
|
|
"double_internals.h",
|
|
|
|
"dwarf.cc",
|
|
|
|
"dwarf.h",
|
2019-05-28 18:48:57 +00:00
|
|
|
"elf.cc",
|
|
|
|
"elf.h",
|
2017-08-15 04:54:34 +00:00
|
|
|
"exceptions.cc",
|
|
|
|
"exceptions.h",
|
2020-11-13 00:29:38 +00:00
|
|
|
"experimental_features.cc",
|
|
|
|
"experimental_features.h",
|
2019-08-21 13:33:37 +00:00
|
|
|
"ffi_callback_trampolines.cc",
|
|
|
|
"ffi_callback_trampolines.h",
|
2020-01-17 18:12:24 +00:00
|
|
|
"field_table.cc",
|
|
|
|
"field_table.h",
|
2020-03-10 21:56:11 +00:00
|
|
|
"finalizable_data.h",
|
2017-08-15 04:54:34 +00:00
|
|
|
"fixed_cache.h",
|
|
|
|
"flag_list.h",
|
|
|
|
"flags.cc",
|
|
|
|
"flags.h",
|
2019-01-25 16:45:13 +00:00
|
|
|
"frame_layout.h",
|
2017-08-15 04:54:34 +00:00
|
|
|
"gdb_helpers.cc",
|
|
|
|
"globals.h",
|
|
|
|
"growable_array.h",
|
2019-01-25 16:45:13 +00:00
|
|
|
"handle_visitor.h",
|
2017-08-15 04:54:34 +00:00
|
|
|
"handles.cc",
|
|
|
|
"handles.h",
|
|
|
|
"handles_impl.h",
|
|
|
|
"hash_map.h",
|
|
|
|
"hash_table.h",
|
2017-11-02 00:57:42 +00:00
|
|
|
"image_snapshot.cc",
|
|
|
|
"image_snapshot.h",
|
2017-08-15 04:54:34 +00:00
|
|
|
"instructions.h",
|
|
|
|
"instructions_arm.cc",
|
|
|
|
"instructions_arm.h",
|
|
|
|
"instructions_arm64.cc",
|
|
|
|
"instructions_arm64.h",
|
|
|
|
"instructions_ia32.cc",
|
|
|
|
"instructions_ia32.h",
|
|
|
|
"instructions_x64.cc",
|
|
|
|
"instructions_x64.h",
|
2019-01-17 12:32:38 +00:00
|
|
|
"intrusive_dlist.h",
|
2017-08-15 04:54:34 +00:00
|
|
|
"isolate.cc",
|
|
|
|
"isolate.h",
|
|
|
|
"isolate_reload.cc",
|
|
|
|
"isolate_reload.h",
|
|
|
|
"json_stream.cc",
|
2017-09-04 14:18:37 +00:00
|
|
|
"json_stream.h",
|
2017-11-03 18:31:50 +00:00
|
|
|
"json_writer.cc",
|
|
|
|
"json_writer.h",
|
2017-09-04 14:18:37 +00:00
|
|
|
"kernel.cc",
|
|
|
|
"kernel.h",
|
|
|
|
"kernel_binary.cc",
|
|
|
|
"kernel_binary.h",
|
2017-08-15 04:54:34 +00:00
|
|
|
"kernel_isolate.cc",
|
|
|
|
"kernel_isolate.h",
|
2017-09-04 14:18:37 +00:00
|
|
|
"kernel_loader.cc",
|
|
|
|
"kernel_loader.h",
|
2017-08-15 04:54:34 +00:00
|
|
|
"lockers.cc",
|
|
|
|
"lockers.h",
|
|
|
|
"log.cc",
|
|
|
|
"log.h",
|
|
|
|
"longjump.cc",
|
|
|
|
"longjump.h",
|
2017-09-04 14:18:37 +00:00
|
|
|
"malloc_hooks.h",
|
2017-08-15 04:54:34 +00:00
|
|
|
"malloc_hooks_arm.cc",
|
|
|
|
"malloc_hooks_arm64.cc",
|
|
|
|
"malloc_hooks_ia32.cc",
|
2017-09-04 14:18:37 +00:00
|
|
|
"malloc_hooks_tcmalloc.cc",
|
2017-08-15 04:54:34 +00:00
|
|
|
"malloc_hooks_unsupported.cc",
|
2017-09-04 14:18:37 +00:00
|
|
|
"malloc_hooks_x64.cc",
|
2017-08-15 04:54:34 +00:00
|
|
|
"megamorphic_cache_table.cc",
|
|
|
|
"megamorphic_cache_table.h",
|
|
|
|
"memory_region.cc",
|
|
|
|
"memory_region.h",
|
|
|
|
"message.cc",
|
|
|
|
"message.h",
|
|
|
|
"message_handler.cc",
|
|
|
|
"message_handler.h",
|
|
|
|
"metrics.cc",
|
|
|
|
"metrics.h",
|
|
|
|
"native_arguments.h",
|
|
|
|
"native_entry.cc",
|
|
|
|
"native_entry.h",
|
|
|
|
"native_message_handler.cc",
|
|
|
|
"native_message_handler.h",
|
|
|
|
"native_symbol.h",
|
|
|
|
"native_symbol_android.cc",
|
|
|
|
"native_symbol_fuchsia.cc",
|
|
|
|
"native_symbol_linux.cc",
|
|
|
|
"native_symbol_macos.cc",
|
|
|
|
"native_symbol_win.cc",
|
|
|
|
"object.cc",
|
|
|
|
"object.h",
|
|
|
|
"object_graph.cc",
|
|
|
|
"object_graph.h",
|
|
|
|
"object_id_ring.cc",
|
|
|
|
"object_id_ring.h",
|
|
|
|
"object_reload.cc",
|
|
|
|
"object_service.cc",
|
|
|
|
"object_set.h",
|
|
|
|
"object_store.cc",
|
|
|
|
"object_store.h",
|
|
|
|
"os.h",
|
|
|
|
"os_android.cc",
|
|
|
|
"os_fuchsia.cc",
|
|
|
|
"os_linux.cc",
|
|
|
|
"os_macos.cc",
|
|
|
|
"os_thread.cc",
|
|
|
|
"os_thread.h",
|
|
|
|
"os_thread_android.cc",
|
|
|
|
"os_thread_android.h",
|
|
|
|
"os_thread_fuchsia.cc",
|
|
|
|
"os_thread_fuchsia.h",
|
|
|
|
"os_thread_linux.cc",
|
|
|
|
"os_thread_linux.h",
|
|
|
|
"os_thread_macos.cc",
|
|
|
|
"os_thread_macos.h",
|
|
|
|
"os_thread_win.cc",
|
|
|
|
"os_thread_win.h",
|
|
|
|
"os_win.cc",
|
|
|
|
"parser.cc",
|
|
|
|
"parser.h",
|
2021-03-03 09:31:53 +00:00
|
|
|
"pending_deopts.cc",
|
|
|
|
"pending_deopts.h",
|
2019-01-25 16:45:13 +00:00
|
|
|
"pointer_tagging.h",
|
2017-08-15 04:54:34 +00:00
|
|
|
"port.cc",
|
|
|
|
"port.h",
|
2020-04-21 12:43:12 +00:00
|
|
|
"port_set.h",
|
2017-08-15 04:54:34 +00:00
|
|
|
"proccpuinfo.cc",
|
|
|
|
"proccpuinfo.h",
|
|
|
|
"profiler.cc",
|
|
|
|
"profiler.h",
|
2017-09-04 14:18:37 +00:00
|
|
|
"profiler_service.cc",
|
|
|
|
"profiler_service.h",
|
|
|
|
"program_visitor.cc",
|
|
|
|
"program_visitor.h",
|
2017-08-15 04:54:34 +00:00
|
|
|
"random.cc",
|
|
|
|
"random.h",
|
|
|
|
"raw_object.cc",
|
|
|
|
"raw_object.h",
|
2018-12-03 19:11:42 +00:00
|
|
|
"raw_object_fields.cc",
|
|
|
|
"raw_object_fields.h",
|
2017-08-15 04:54:34 +00:00
|
|
|
"raw_object_snapshot.cc",
|
|
|
|
"regexp.cc",
|
|
|
|
"regexp.h",
|
|
|
|
"regexp_assembler.cc",
|
|
|
|
"regexp_assembler.h",
|
|
|
|
"regexp_assembler_bytecode.cc",
|
|
|
|
"regexp_assembler_bytecode.h",
|
|
|
|
"regexp_assembler_bytecode_inl.h",
|
|
|
|
"regexp_assembler_ir.cc",
|
|
|
|
"regexp_assembler_ir.h",
|
|
|
|
"regexp_ast.cc",
|
|
|
|
"regexp_ast.h",
|
|
|
|
"regexp_bytecodes.h",
|
|
|
|
"regexp_interpreter.cc",
|
|
|
|
"regexp_interpreter.h",
|
|
|
|
"regexp_parser.cc",
|
|
|
|
"regexp_parser.h",
|
|
|
|
"report.cc",
|
|
|
|
"report.h",
|
|
|
|
"resolver.cc",
|
|
|
|
"resolver.h",
|
|
|
|
"reusable_handles.h",
|
2018-12-13 17:45:02 +00:00
|
|
|
"reverse_pc_lookup_cache.cc",
|
|
|
|
"reverse_pc_lookup_cache.h",
|
2017-08-15 04:54:34 +00:00
|
|
|
"ring_buffer.h",
|
2017-09-04 14:18:37 +00:00
|
|
|
"runtime_entry.cc",
|
2017-08-15 04:54:34 +00:00
|
|
|
"runtime_entry.h",
|
|
|
|
"runtime_entry_arm.cc",
|
|
|
|
"runtime_entry_arm64.cc",
|
|
|
|
"runtime_entry_ia32.cc",
|
2017-09-04 14:18:37 +00:00
|
|
|
"runtime_entry_list.h",
|
2017-08-15 04:54:34 +00:00
|
|
|
"runtime_entry_x64.cc",
|
|
|
|
"scope_timer.h",
|
|
|
|
"scopes.cc",
|
|
|
|
"scopes.h",
|
|
|
|
"service.cc",
|
|
|
|
"service.h",
|
|
|
|
"service_event.cc",
|
|
|
|
"service_event.h",
|
|
|
|
"service_isolate.cc",
|
|
|
|
"service_isolate.h",
|
2017-09-04 14:18:37 +00:00
|
|
|
"signal_handler.h",
|
2017-08-15 04:54:34 +00:00
|
|
|
"signal_handler_android.cc",
|
|
|
|
"signal_handler_fuchsia.cc",
|
|
|
|
"signal_handler_linux.cc",
|
|
|
|
"signal_handler_macos.cc",
|
|
|
|
"signal_handler_win.cc",
|
|
|
|
"simulator.h",
|
|
|
|
"simulator_arm.cc",
|
|
|
|
"simulator_arm.h",
|
|
|
|
"simulator_arm64.cc",
|
|
|
|
"simulator_arm64.h",
|
|
|
|
"snapshot.cc",
|
|
|
|
"snapshot.h",
|
|
|
|
"snapshot_ids.h",
|
|
|
|
"source_report.cc",
|
|
|
|
"source_report.h",
|
|
|
|
"stack_frame.cc",
|
|
|
|
"stack_frame.h",
|
|
|
|
"stack_frame_arm.h",
|
|
|
|
"stack_frame_arm64.h",
|
|
|
|
"stack_frame_ia32.h",
|
|
|
|
"stack_frame_x64.h",
|
|
|
|
"stack_trace.cc",
|
|
|
|
"stack_trace.h",
|
2019-02-12 13:52:28 +00:00
|
|
|
"static_type_exactness_state.h",
|
2017-08-15 04:54:34 +00:00
|
|
|
"stub_code.cc",
|
|
|
|
"stub_code.h",
|
2019-02-12 13:52:28 +00:00
|
|
|
"stub_code_list.h",
|
2017-08-15 04:54:34 +00:00
|
|
|
"symbols.cc",
|
|
|
|
"symbols.h",
|
|
|
|
"tags.cc",
|
|
|
|
"tags.h",
|
|
|
|
"thread.cc",
|
|
|
|
"thread.h",
|
|
|
|
"thread_barrier.h",
|
|
|
|
"thread_interrupter.cc",
|
|
|
|
"thread_interrupter.h",
|
|
|
|
"thread_interrupter_android.cc",
|
|
|
|
"thread_interrupter_fuchsia.cc",
|
|
|
|
"thread_interrupter_linux.cc",
|
|
|
|
"thread_interrupter_macos.cc",
|
|
|
|
"thread_interrupter_win.cc",
|
|
|
|
"thread_pool.cc",
|
|
|
|
"thread_pool.h",
|
|
|
|
"thread_registry.cc",
|
|
|
|
"thread_registry.h",
|
2019-01-11 20:47:10 +00:00
|
|
|
"thread_stack_resource.cc",
|
|
|
|
"thread_stack_resource.h",
|
|
|
|
"thread_state.cc",
|
|
|
|
"thread_state.h",
|
2017-08-15 04:54:34 +00:00
|
|
|
"timeline.cc",
|
|
|
|
"timeline.h",
|
|
|
|
"timeline_analysis.cc",
|
|
|
|
"timeline_analysis.h",
|
|
|
|
"timeline_android.cc",
|
|
|
|
"timeline_fuchsia.cc",
|
|
|
|
"timeline_linux.cc",
|
2020-01-17 18:10:04 +00:00
|
|
|
"timeline_macos.cc",
|
2017-08-15 04:54:34 +00:00
|
|
|
"timer.cc",
|
|
|
|
"timer.h",
|
|
|
|
"token.cc",
|
|
|
|
"token.h",
|
|
|
|
"token_position.cc",
|
|
|
|
"token_position.h",
|
Reland "[VM] Introduction of type testing stubs - Part 1-4"
Relands 165c583d57af613836cf7d08242ce969521db00b
[VM] Introduction of type testing stubs - Part 1
This CL:
* Adds a field to [RawAbstractType] which will always hold a pointer
to the entrypoint of a type testing stub
* Makes this new field be initialized to a default stub whenever a
instances are created (e.g. via Type::New(), snapshot reader, ...)
* Makes the clustered snapshotter write a reference to the
corresponding [RawInstructions] object when writing the field and do
the reverse when reading it.
* Makes us call the type testing stub for performing assert-assignable
checks.
To reduce unnecessary loads on callsites, we store the entrypoint of the
type testing stubs directly in the type objects. This means that the
caller of type testing stubs can simply branch there without populating
a code object first. This also means that the type testing stubs
themselves have no access to a pool and we therefore also don't hold on
to the [Code] object, only the [Instruction] object is necessary.
The type testing stubs do not setup a frame themselves and also have no
safepoint. In the case when the type testing stubs could not determine
a positive answer they will tail-call a general-purpose stub.
The general-purpose stub sets up a stub frame, tries to consult a
[SubtypeTestCache] and bails out to runtime if this was unsuccessful.
This CL is just the the first, for ease of reviewing. The actual
type-specialized type testing stubs will be generated in later CLs.
Reviewed-on: https://dart-review.googlesource.com/44787
Relands f226c22424c483d65499545e560efc059f9dde1c
[VM] Introduction of type testing stubs - Part 2
This CL starts building type testing stubs specialzed for [Type] objects
we test against.
More specifically, it adds support for:
* Handling obvious fast cases on the call sites (while still having a
call to stub for negative case)
* Handling type tests against type parameters, by loading the value
of the type parameter on the call sites and invoking it's type testing stub.
* Specialzed type testing stubs for instantiated types where we can
do [CidRange]-based subtype-checks.
==> e.g. String/List<dynamic>
* Specialzed type testing stubs for instantiated types where we can
do [CidRange]-based subclass-checks for the class and
[CidRange]-based subtype-checks for the type arguments.
==> e.g. Widget<State>, where we know [Widget] is only extended and not
implemented.
* Specialzed type testing stubs for certain non-instantiated types where we
can do [CidRange]-based subclass-checks for the class and
[CidRange]-based subtype-checks for the instantiated type arguments and
cid based comparisons for type parameters. (Note that this fast-case migth
result in some false-negatives!)
==> e.g. _HashMapEntry<K, V>, where we know [_HashMapEntry] is only
extended and not implemented.
This optimizes cases where the caller uses `new HashMap<A, B>()` and only
uses `A` and `B` as key/values (and not subclasses of it). The false-negative
can occur when subtypes of A or B are used. In such cases we fall back to the
[SubtypeTestCache]-based imlementation.
Reviewed-on: https://dart-review.googlesource.com/44788
Relands 25f98bcc7561006d70a487ba3de55551658ac683
[VM] Introduction of type testing stubs - Part 3
The changes include:
* Make AssertAssignableInstr no longer have a call-summary, which
helps methods with several parameter checks by not having to
re-load/re-initialize type arguments registers
* Lazily create SubtypeTestCaches: We already go to runtime to warm up
the caches, so we now also create the caches on the first runtime
call and patch the pool entries.
* No longer load the destination name into a register: We only need
the name when we throw an exception, so it is not on the hot path.
Instead we let the runtime look at the call site, decoding a pool
index from the instructions stream. The destination name will be
available in the pool, at a consecutive index to the subtype cache.
* Remove the fall-through to N=1 case for probing subtypeing tests,
since those will always be handled by the optimized stubs.
* Do not generate optimized stubs for FutureOr<T> (so far it just
falled-through to TTS). We can make optimzed version of that later,
but it requires special subtyping rules.
* Local code quality improvement in the type-testing-stubs: Avoid
extra jump at last case of cid-class-range checks.
There are still a number of optimization opportunities we can do in
future changes.
Reviewed-on: https://dart-review.googlesource.com/46984
Relands 2c52480ec87392992a1388517c46ccc97bdc9b2b
[VM] Introduction of type testing stubs - Part 4
In order to avoid generating type testing stubs for too many types in
the system - and thereby potentially cause an increase in code size -
this change introduces a smarter way to decide for which types we should
generate optimized type testing stubs.
The precompiler creates a [TypeUsageInfo] which we use to collect
information. More specifically:
a) We collect the destination types for all type checks we emit
(we do this inside AssertAssignableInstr::EmitNativeCode).
-> These are types we might want to generate optimized type testing
stubs for.
b) We collect type argument vectors used in instance creations (we do
this inside AllocateObjectInstr::EmitNativeCode) and keep a set of
of used type argument vectors for each class.
After the precompiler has finished compiling normal code we scan the set
of destination types collected in a) for uninstantiated types (or more
specifically, type parameter types).
We then propagate the type argument vectors used on object allocation sites,
which were collected in b), in order to find out what kind of types are flowing
into those type parameters.
This allows us to extend the set of types which we test against, by
adding the types that flow into type parameters.
We use this final augmented set of destination types as a "filter" when
making the decision whether to generate an optimized type testing stub
for a given type.
Reviewed-on: https://dart-review.googlesource.com/48640
Issue https://github.com/dart-lang/sdk/issues/32603
Closes https://github.com/dart-lang/sdk/issues/32852
Change-Id: Ib79fbe7f043aa88f32bddad62d7656c638914b44
Reviewed-on: https://dart-review.googlesource.com/50944
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2018-04-13 09:06:56 +00:00
|
|
|
"type_testing_stubs.cc",
|
2020-03-10 21:56:11 +00:00
|
|
|
"type_testing_stubs.h",
|
2017-09-04 14:18:37 +00:00
|
|
|
"unibrow-inl.h",
|
2017-08-15 04:54:34 +00:00
|
|
|
"unibrow.cc",
|
|
|
|
"unibrow.h",
|
|
|
|
"unicode.cc",
|
|
|
|
"unicode_data.cc",
|
|
|
|
"uri.cc",
|
|
|
|
"uri.h",
|
2018-11-22 15:14:46 +00:00
|
|
|
"v8_snapshot_writer.cc",
|
|
|
|
"v8_snapshot_writer.h",
|
2017-08-15 04:54:34 +00:00
|
|
|
"virtual_memory.cc",
|
|
|
|
"virtual_memory.h",
|
2021-02-25 20:48:07 +00:00
|
|
|
"virtual_memory_compressed.cc",
|
|
|
|
"virtual_memory_compressed.h",
|
2017-08-15 04:54:34 +00:00
|
|
|
"virtual_memory_fuchsia.cc",
|
2019-01-24 22:39:50 +00:00
|
|
|
"virtual_memory_posix.cc",
|
2017-08-15 04:54:34 +00:00
|
|
|
"virtual_memory_win.cc",
|
2020-01-31 12:56:31 +00:00
|
|
|
"visitor.cc",
|
2017-08-15 04:54:34 +00:00
|
|
|
"visitor.h",
|
|
|
|
"zone.cc",
|
|
|
|
"zone.h",
|
|
|
|
"zone_text_buffer.cc",
|
|
|
|
"zone_text_buffer.h",
|
|
|
|
]
|
|
|
|
|
|
|
|
vm_sources_tests = [
|
|
|
|
"allocation_test.cc",
|
|
|
|
"assert_test.cc",
|
|
|
|
"atomic_test.cc",
|
2018-06-20 00:39:49 +00:00
|
|
|
"base64_test.cc",
|
2017-08-15 04:54:34 +00:00
|
|
|
"benchmark_test.cc",
|
|
|
|
"benchmark_test.h",
|
|
|
|
"bit_set_test.cc",
|
|
|
|
"bit_vector_test.cc",
|
|
|
|
"bitfield_test.cc",
|
|
|
|
"bitmap_test.cc",
|
|
|
|
"boolfield_test.cc",
|
2019-03-11 22:32:31 +00:00
|
|
|
"catch_entry_moves_test.cc",
|
2017-08-15 04:54:34 +00:00
|
|
|
"class_finalizer_test.cc",
|
|
|
|
"code_descriptors_test.cc",
|
|
|
|
"code_patcher_arm64_test.cc",
|
2017-09-04 14:18:37 +00:00
|
|
|
"code_patcher_arm_test.cc",
|
2017-08-15 04:54:34 +00:00
|
|
|
"code_patcher_ia32_test.cc",
|
|
|
|
"code_patcher_x64_test.cc",
|
|
|
|
"compiler_test.cc",
|
|
|
|
"cpu_test.cc",
|
|
|
|
"cpuinfo_test.cc",
|
|
|
|
"custom_isolate_test.cc",
|
|
|
|
"dart_api_impl_test.cc",
|
2020-10-12 11:07:21 +00:00
|
|
|
"datastream_test.cc",
|
2017-08-15 04:54:34 +00:00
|
|
|
"debugger_api_impl_test.cc",
|
|
|
|
"exceptions_test.cc",
|
|
|
|
"fixed_cache_test.cc",
|
|
|
|
"flags_test.cc",
|
|
|
|
"growable_array_test.cc",
|
|
|
|
"guard_field_test.cc",
|
|
|
|
"handles_test.cc",
|
|
|
|
"hash_map_test.cc",
|
|
|
|
"hash_table_test.cc",
|
|
|
|
"instructions_arm64_test.cc",
|
2017-09-04 14:18:37 +00:00
|
|
|
"instructions_arm_test.cc",
|
2017-08-15 04:54:34 +00:00
|
|
|
"instructions_ia32_test.cc",
|
|
|
|
"instructions_x64_test.cc",
|
2019-01-17 12:32:38 +00:00
|
|
|
"intrusive_dlist_test.cc",
|
2017-08-15 04:54:34 +00:00
|
|
|
"isolate_reload_test.cc",
|
|
|
|
"isolate_test.cc",
|
|
|
|
"json_test.cc",
|
|
|
|
"log_test.cc",
|
|
|
|
"longjump_test.cc",
|
|
|
|
"malloc_hooks_test.cc",
|
|
|
|
"memory_region_test.cc",
|
|
|
|
"message_handler_test.cc",
|
|
|
|
"message_test.cc",
|
|
|
|
"metrics_test.cc",
|
2017-11-08 20:17:51 +00:00
|
|
|
"mixin_test.cc",
|
2017-08-15 04:54:34 +00:00
|
|
|
"native_entry_test.cc",
|
|
|
|
"native_entry_test.h",
|
|
|
|
"object_arm64_test.cc",
|
2017-09-04 14:18:37 +00:00
|
|
|
"object_arm_test.cc",
|
2017-08-15 04:54:34 +00:00
|
|
|
"object_graph_test.cc",
|
|
|
|
"object_ia32_test.cc",
|
|
|
|
"object_id_ring_test.cc",
|
|
|
|
"object_store_test.cc",
|
|
|
|
"object_test.cc",
|
|
|
|
"object_x64_test.cc",
|
|
|
|
"os_test.cc",
|
|
|
|
"port_test.cc",
|
|
|
|
"profiler_test.cc",
|
|
|
|
"regexp_test.cc",
|
|
|
|
"ring_buffer_test.cc",
|
|
|
|
"scopes_test.cc",
|
|
|
|
"service_test.cc",
|
|
|
|
"snapshot_test.cc",
|
|
|
|
"source_report_test.cc",
|
|
|
|
"stack_frame_test.cc",
|
2020-10-22 13:08:10 +00:00
|
|
|
"stub_code_test.cc",
|
2017-08-15 04:54:34 +00:00
|
|
|
"stub_code_arm64_test.cc",
|
2017-09-04 14:18:37 +00:00
|
|
|
"stub_code_arm_test.cc",
|
2017-08-15 04:54:34 +00:00
|
|
|
"stub_code_ia32_test.cc",
|
|
|
|
"stub_code_x64_test.cc",
|
|
|
|
"thread_barrier_test.cc",
|
|
|
|
"thread_pool_test.cc",
|
|
|
|
"thread_test.cc",
|
|
|
|
"timeline_test.cc",
|
[vm/compiler] Tests, cleanups and fixes to Type Testing Stubs.
So far we relied on our normal Dart tests to exercise and test TTS.
This CL adds concrete TTS unit tests, which directly construct the
values the TTS accepts via the calling convention (instance,
dst_type, instantiator tav, function tav), and allows us to test
* whether TTS handled the type test
* whether TTS was falling back to STC which handled the type test
* whether TTS (and STC) preserve the necessary registers
This CL also gets rid of TMP usage in TTS related code.
This CL also adds documentation about TTS to
runtime/docs/compiler/type_testing_stubs.md.
This CL also fixes two issues:
* handle all-dynamic null vector `as Foo<..., T, ...>`
* compare the actual type parameter value in `as Foo<..., T, ...>`
(instead of using type_class_id>)
There seem to be no major performance changes, some benchmarks change
positive/negative but many of them seem to be bi-modal.
Issue https://github.com/dart-lang/sdk/issues/40964
Issue https://github.com/dart-lang/sdk/issues/40736
Change-Id: Iad41e405fe693c67be6221a18e3dad03cc0a5f24
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139461
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2020-03-17 14:11:02 +00:00
|
|
|
"type_testing_stubs_test.cc",
|
2017-08-15 04:54:34 +00:00
|
|
|
"unicode_test.cc",
|
|
|
|
"unit_test.cc",
|
|
|
|
"unit_test.h",
|
|
|
|
"uri_test.cc",
|
|
|
|
"utils_test.cc",
|
|
|
|
"virtual_memory_test.cc",
|
|
|
|
"zone_test.cc",
|
|
|
|
]
|
2020-11-16 16:10:55 +00:00
|
|
|
|
|
|
|
constants_sources = [
|
|
|
|
"constants_arm.cc",
|
|
|
|
"constants_arm.h",
|
|
|
|
"constants_arm64.cc",
|
|
|
|
"constants_arm64.h",
|
|
|
|
"constants_base.h",
|
|
|
|
"constants_ia32.cc",
|
|
|
|
"constants_ia32.h",
|
|
|
|
"constants_x64.cc",
|
|
|
|
"constants_x64.h",
|
|
|
|
]
|