dart-sdk/sdk/lib/ffi
Daco Harkes ddfc00e773 [vm/ffi] Unify TypedDataBase wrappers
For getting the address of `Struct` fields and `Array` elements
it would be useful to access the `_typedDataBase` field in these
'wrappers' in a unified way.

This CL makes `Array` extend `_Compound`.
Since `Array` is not a `SizedNativeType`, the implements clauses
for `Struct` and `Union` are moved to these classes.

Moreover, any references to 'compound' which only apply to struct or
union are updated.

TEST=test/ffi

Bug: https://github.com/dart-lang/sdk/issues/44589
Bug: https://github.com/dart-lang/sdk/issues/54739
Bug: https://github.com/dart-lang/sdk/issues/41237

CoreLibraryReviewExempt: No API change, only refactoring.
Change-Id: Ib9d8bccd4872df04bcc67731e4052f826ab70af4
Cq-Include-Trybots: luci.dart.try:vm-aot-android-release-arm64c-try,vm-aot-android-release-arm_x64-try,vm-aot-linux-debug-x64-try,vm-aot-linux-debug-x64c-try,vm-aot-mac-release-arm64-try,vm-aot-mac-release-x64-try,vm-aot-obfuscate-linux-release-x64-try,vm-aot-optimization-level-linux-release-x64-try,vm-aot-win-debug-arm64-try,vm-aot-win-debug-x64-try,vm-appjit-linux-debug-x64-try,vm-asan-linux-release-x64-try,vm-checked-mac-release-arm64-try,vm-eager-optimization-linux-release-ia32-try,vm-eager-optimization-linux-release-x64-try,vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64c-try,vm-ffi-qemu-linux-release-arm-try,vm-ffi-qemu-linux-release-riscv64-try,vm-fuchsia-release-x64-try,vm-kernel-linux-debug-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-linux-debug-ia32-try,vm-linux-debug-x64-try,vm-linux-debug-x64c-try,vm-mac-debug-arm64-try,vm-mac-debug-x64-try,vm-msan-linux-release-x64-try,vm-reload-linux-debug-x64-try,vm-reload-rollback-linux-debug-x64-try,vm-ubsan-linux-release-x64-try,vm-win-debug-arm64-try,vm-win-debug-x64-try,vm-win-release-ia32-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350960
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
2024-02-09 21:27:29 +00:00
..
abi.dart [vm] Add arch-specific bits for Android RISCV64. 2023-05-22 16:43:04 +00:00
abi_specific.dart [vm/ffi] Introduce SizedNativeType 2024-01-12 10:13:39 +00:00
allocation.dart [vm/ffi] Introduce SizedNativeType 2024-01-12 10:13:39 +00:00
annotations.dart [vm/ffi] Introduce SizedNativeType 2024-01-12 10:13:39 +00:00
c_type.dart [vm] Add arch-specific bits for Android RISCV64. 2023-05-22 16:43:04 +00:00
dynamic_library.dart [ffi/docs] Elaborate on limitations on leaf functions 2023-07-31 11:17:12 +00:00
ffi.dart [vm/ffi] Unify TypedDataBase wrappers 2024-02-09 21:27:29 +00:00
ffi_sources.gni
native_finalizer.dart [ffi] Update comment for NativeFinalizer 2023-08-22 11:17:47 +00:00
native_type.dart [vm/ffi] Introduce SizedNativeType 2024-01-12 10:13:39 +00:00
struct.dart [vm/ffi] Unify TypedDataBase wrappers 2024-02-09 21:27:29 +00:00
union.dart [vm/ffi] Unify TypedDataBase wrappers 2024-02-09 21:27:29 +00:00