dart-sdk/pkg/front_end
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
..
benchmarks
lib/src [macros] Improvements to exceptions. 2024-01-29 15:53:27 +00:00
outline_extraction_testcases
parser_testcases [cfe] Report error on covariant in extension type methods 2023-12-15 09:13:07 +00:00
test [macros] Improvements to exceptions. 2024-01-29 15:53:27 +00:00
testcases Revert "[vm/ffi] Introduce Struct.create and Union.create" 2024-01-30 10:43:22 +00:00
tool [cfe] Refactor isPatch, isAugmentation flags 2024-01-26 12:00:58 +00:00
analysis_options.yaml
analysis_options_no_lints.yaml [cfe] Add CFE test for DartScope 2023-11-15 10:17:23 +00:00
error_recovery.yaml
LICENSE
messages.status [dart:js_interop] Add isA helper 2024-01-25 18:52:45 +00:00
messages.yaml [dart:js_interop] Add isA helper 2024-01-25 18:52:45 +00:00
OWNERS Also add global owners to CFE/VM packages 2023-11-27 14:35:52 +00:00
PRESUBMIT.py [build] Python 3.12 compatibility. 2023-12-12 18:19:35 +00:00
pubspec.yaml Enable private field promotion in pkg/front_end 2023-09-18 15:39:47 +00:00
README.md
testing.json [CFE] Remove unused fasta/sdk_test.dart 2024-01-16 13:18:57 +00:00
testing_with_lints.json Fix incorrect file reference in license headers 2023-09-18 06:44:08 +00:00

Front end for Dart

This package provides a low-level API for use by compiler back ends that wish to implement the Dart language. It is intended for eventual use by dev_compiler, dart2js, and the Dart VM. In addition, it will share implementation details with the analyzer package--this will be accomplished by having the analyzer package import (and re-export) parts of this package's private implementation.

End-users should use the dart analyze command-line tool to analyze their Dart code.

Integrators that want to write tools that analyze Dart code should use the analyzer package.

Note: A previous version of this package was published on pub.dev. It has now been marked DISCONTINUED as it is not intended for direct consumption, as per the notes above.