5380fa5d40
The CCallInstr takes unboxed word-sized integers and does a call to C without any VM transitions. This can be used for the following. 1) Leaf runtime entries. This CL removes the EnterHandleScope, ExitHandleScope, and AllocateHandle instructions. 2) Compilation of isolate independent code where all definitions in IL are unboxed integers. Currently, the CCallInstr expects all it's arguments and the return type to be word-sized. This CL also: - Adds loadImmediate and CCall with a register for each assembler. - Adds a CSE pass to force-optimized so that LoadThreadInstr gets de- duplicated. TEST=tests/ffi(_2)/* Change-Id: I67c6aaa1b7d6aa7d60e274477686a54e5a331216 Cq-Include-Trybots: luci.dart.try:vm-kernel-linux-debug-simriscv64-try,vm-kernel-precomp-linux-debug-simriscv64-try,vm-kernel-nnbd-mac-debug-arm64-try,vm-kernel-nnbd-mac-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-kernel-win-debug-x64-try Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/246240 Reviewed-by: Martin Kustermann <kustermann@google.com> Commit-Queue: Daco Harkes <dacoharkes@google.com> Reviewed-by: Ryan Macnak <rmacnak@google.com>