mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 16:59:47 +00:00
c2e15cff6d
Structs and unions can now be created from an existing typed data with the new `create` methods. The typed data argument to these `create` methods is optional. If the typed data argument is omitted, a new typed data of the right size will be allocated. Compound field reads and writes are unchecked. (These are TypedDataBase loads and stores, rather than TypedData loads and stores. And Pointers have no byte length.) Therefore the `create` method taking existing TypedData objects check whether the length in bytes it at least the size of the compound. TEST=pkg/analyzer/test/src/diagnostics/creation_of_struct_or_union_test.dart TEST=pkg/vm/testcases/transformations/ffi/struct_typed_data.dart TEST=tests/ffi/structs_typed_data_test.dart TEST=tests/ffi/vmspecific_static_checks_test.dart Closes: https://github.com/dart-lang/sdk/issues/45697 Closes: https://github.com/dart-lang/sdk/issues/53418 Change-Id: If12c56106c7ca56611bccfacbc1c680c2d4ce407 CoreLibraryReviewExempt: FFI is a VM and WASM only feature. 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-x64c-try,vm-aot-win-release-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-debug-x64c-try,vm-win-release-ia32-try Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342763 Commit-Queue: Daco Harkes <dacoharkes@google.com> Reviewed-by: Johnni Winther <johnniwinther@google.com> Reviewed-by: Lasse Nielsen <lrn@google.com> Reviewed-by: Martin Kustermann <kustermann@google.com> |
||
---|---|---|
.. | ||
co19 | ||
corelib | ||
dartdevc | ||
ffi | ||
language | ||
lib | ||
modular | ||
standalone | ||
web | ||
legacy_status_dart2js.csv | ||
OWNERS | ||
README.md |
This directory contains tests of the language and core library implementations. For more information, see https://github.com/dart-lang/sdk/wiki/Testing.