mirror of
https://github.com/dart-lang/sdk
synced 2024-09-20 04:11:30 +00:00
045b9c1715
We're adding these types to `dart:ffi` rather than `package:ffi` so that they can be used with `FfiNative`s. Adds `NativeType`s for the following C types: * unsigned char * signed char * short * unsigned short * int * unsigned int * long * unsigned long * long long * unsigned long long * uintptr_t * size_t * wchar_t Because the C standard only defines minimum sizes for many of these types, future platforms might diverge from the typical size even if all platforms currently agree on a size. To avoid having to reification later, we define all types as AbiSpecificIntegers rather than typedefs, even if all current target platforms agree on the size. Closes: https://github.com/dart-lang/sdk/issues/36140 TEST=tests/ffi/c_types_test.dart Original patch in patchset 1. * Removes `Char` for now until package:win32 has rolled to 2.3.8 in Flutter. https://pub.dev/packages/win32/versions/2.3.8/changelog https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8824468064587445729/+/u/Android_Views_Integration_Tests/stdout * Adds `c_type.dart` in `ffi_source.gni` which should fix `IntPtr` missing when analyzing `path_provider_linux`. (However, I was unable to reproduce the issue locally.) https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8824468064571399025/+/u/run_test.dart_for_flutter_plugins_shard_and_subshard_analyze/test_stdout `/tmp/flutter_plugins.KZMNMC/packages/path_provider/path_provider_linux$ ~/flt/engine/src/out/host_debug/dart-sdk/bin/dart analyze --fatal-infos` Change-Id: I89130cccba285fc9c483bb53f5710a302f2b104f Cq-Include-Trybots: luci.dart.try:dart-sdk-linux-try,dart-sdk-mac-try,dart-sdk-win-try,vm-ffi-android-debug-arm64c-try,vm-ffi-android-debug-arm-try,vm-canary-linux-debug-try,vm-fuchsia-release-x64-try,vm-kernel-gcc-linux-try,vm-kernel-asan-linux-release-x64-try,vm-kernel-linux-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-kernel-mac-debug-x64-try,vm-kernel-mac-release-arm64-try,vm-kernel-nnbd-win-release-ia32-try,vm-kernel-nnbd-win-release-x64-try,vm-precomp-ffi-qemu-linux-release-arm-try,vm-kernel-win-release-x64-try,flutter-analyze-try,flutter-engine-linux-try,flutter-frontend-try Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229156 Reviewed-by: Martin Kustermann <kustermann@google.com> Commit-Queue: Daco Harkes <dacoharkes@google.com> |
||
---|---|---|
.. | ||
generator | ||
abi_specific_int_incomplete_aot_test.dart | ||
abi_specific_int_incomplete_jit_test.dart | ||
abi_specific_int_test.dart | ||
abi_test.dart | ||
aliasing_test.dart | ||
all_positive.dart | ||
allocator_test.dart | ||
analysis_options.yaml | ||
bool_test.dart | ||
c_types_test.dart | ||
callback_tests_utils.dart | ||
calloc_test.dart | ||
coordinate.dart | ||
coordinate_nnbd_workaround.dart | ||
data_not_asan_test.dart | ||
data_test.dart | ||
dylib_isolates_test.dart | ||
dylib_utils.dart | ||
expando_test.dart | ||
extension_methods_test.dart | ||
external_typed_data_test.dart | ||
ffi.status | ||
ffi_native_test.dart | ||
ffi_test_helpers.dart | ||
function_callbacks_many_test.dart | ||
function_callbacks_structs_by_value_generated_test.dart | ||
function_callbacks_structs_by_value_test.dart | ||
function_callbacks_test.dart | ||
function_callbacks_very_many_test.dart | ||
function_structs_by_value_generated_compounds.dart | ||
function_structs_by_value_generated_leaf_test.dart | ||
function_structs_by_value_generated_test.dart | ||
function_structs_test.dart | ||
function_test.dart | ||
function_very_many_test.dart | ||
hardfp_test.dart | ||
has_symbol_test.dart | ||
inline_array_multi_dimensional_test.dart | ||
inline_array_test.dart | ||
native_effect_test.dart | ||
negative_function_test.dart | ||
regress_37254_test.dart | ||
regress_39044_test.dart | ||
regress_39063_test.dart | ||
regress_39885_test.dart | ||
regress_40537_test.dart | ||
regress_43016_test.dart | ||
regress_43693_test.dart | ||
regress_44985_test.dart | ||
regress_44986_test.dart | ||
regress_45189_test.dart | ||
regress_45198_test.dart | ||
regress_45507_test.dart | ||
regress_45988_test.dart | ||
regress_46004_test.dart | ||
regress_46085_test.dart | ||
regress_46127_test.dart | ||
regress_47594_test.dart | ||
regress_47673_2_test.dart | ||
regress_47673_test.dart | ||
regress_flutter79441_test.dart | ||
regress_jump_to_frame_test.dart | ||
sizeof_test.dart | ||
snapshot_test.dart | ||
stacktrace_regress_37910_test.dart | ||
structs_nested_test.dart | ||
structs_nnbd_workaround_test.dart | ||
structs_packed_test.dart | ||
structs_test.dart | ||
unaligned_test.dart | ||
variance_function_test.dart | ||
very_large_struct.dart | ||
vmspecific_dynamic_library_test.dart | ||
vmspecific_enable_ffi_test.dart | ||
vmspecific_ffi_native_test.dart | ||
vmspecific_function_callbacks_exit_test.dart | ||
vmspecific_function_callbacks_negative_test.dart | ||
vmspecific_function_callbacks_test.dart | ||
vmspecific_function_gc_test.dart | ||
vmspecific_function_test.dart | ||
vmspecific_handle_dynamically_linked_test.dart | ||
vmspecific_handle_test.dart | ||
vmspecific_highmem_32bit_test.dart | ||
vmspecific_leaf_call_test.dart | ||
vmspecific_object_gc_test.dart | ||
vmspecific_regress_37100_test.dart | ||
vmspecific_regress_37511_callbacks_test.dart | ||
vmspecific_regress_37511_test.dart | ||
vmspecific_regress_37780_test.dart | ||
vmspecific_regress_38993_test.dart | ||
vmspecific_send_port_id_test.dart | ||
vmspecific_static_checks_test.dart | ||
vmspecific_variance_function_checks_test.dart |