dart-sdk/sdk/lib
Daco Harkes f992bfc7b1 Revert "[vm/ffi] Introduce Struct.create and Union.create"
This reverts commit c2e15cff6d.

Reason for revert: https://github.com/dart-lang/sdk/issues/54754
Version skew somewhere in the analyzer/dartdoc/flutter combination.
We need to land the fix inside ffi_verifier.dart first, and then
reland the API docs that trigger the code path in the analyzer
that throws the exception.

Original change's description:
> [vm/ffi] Introduce `Struct.create` and `Union.create`
>
> 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>

Change-Id: I285dc39946b5659219b37a1d8f10de479133957e
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/+/349061
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2024-01-30 10:43:22 +00:00
..
_http [io] Use _addConnection instead _add in _HttpParser 2023-12-12 18:25:19 +00:00
_internal [io] Fix a bug where Socket.addStream never completes after the socket is destroyed. 2024-01-29 23:09:22 +00:00
_wasm Move Wasm{Object,Int,Float}Array -> WasmArray, use extensions on WasmArray for static dispatc0h 2023-12-12 17:05:49 +00:00
async Mention future callback ordering is undefined 2024-01-26 19:32:14 +00:00
cli [vm] Disable dart:cli waitFor by default 2023-09-14 10:08:29 +00:00
collection [collection] Update example code in dartdoc 2023-12-28 23:37:27 +00:00
convert Remove Utf8Decoder._convertIntercepted hook 2023-11-23 12:25:26 +00:00
core Add extra documentation to Enum to point to EnumName. 2024-01-23 09:34:32 +00:00
developer [sdk] Mark dart:developer APIs with since information 2024-01-22 14:58:12 +00:00
ffi Revert "[vm/ffi] Introduce Struct.create and Union.create" 2024-01-30 10:43:22 +00:00
html [docs] update the messaging for dart:html and related libraries 2024-01-22 21:28:02 +00:00
indexed_db [docs] update the messaging for dart:html and related libraries 2024-01-22 21:28:02 +00:00
internal Hide the existence of EfficientLengthIterable better. 2023-09-12 11:08:42 +00:00
io [doc,io]: Document how errors with File.openRead are exposed 2024-01-17 18:43:50 +00:00
isolate Refer to unnamed constructors in doc comments with '.new' 2023-10-17 14:42:38 +00:00
js [docs] update the messaging for dart:html and related libraries 2024-01-22 21:28:02 +00:00
js_interop [web docs] add package:web to the main sdk docs - api.dart.dev 2024-01-26 15:54:59 +00:00
js_interop_unsafe [dart:js_interop_unsafe] Add has helper 2024-01-03 01:00:19 +00:00
js_util [docs] update the messaging for dart:html and related libraries 2024-01-22 21:28:02 +00:00
math Adding class modifiers to dart:math. 2023-03-13 14:01:26 +00:00
mirrors [vm] Add minimal support for mirrors of extension type members 2023-12-07 21:48:50 +00:00
svg [docs] update the messaging for dart:html and related libraries 2024-01-22 21:28:02 +00:00
typed_data Revert "[typed_data] Deprecate unmodifiable views" 2023-10-27 15:22:54 +00:00
vmservice [vm] Pass offset and script uri for expression compilation 2023-10-12 10:22:38 +00:00
web_audio [docs] update the messaging for dart:html and related libraries 2024-01-22 21:28:02 +00:00
web_gl [docs] update the messaging for dart:html and related libraries 2024-01-22 21:28:02 +00:00
web_sql [docs] update dart:html template files 2024-01-12 18:17:13 +00:00
analysis_options.yaml [vm/ffi] Support varargs 2023-01-20 10:30:41 +00:00
libraries.json [dart2wasm] Start using WebAssembly.String imports 2023-12-08 10:04:41 +00:00
libraries.yaml [dart2wasm] Start using WebAssembly.String imports 2023-12-08 10:04:41 +00:00
PRESUBMIT.py [build] Python 3.12 compatibility. 2023-12-12 18:19:35 +00:00
vmservice_libraries.json
vmservice_libraries.yaml update the tooling to generate libraries.json from libraries.yaml 2021-07-27 23:02:50 +00:00