mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 12:24:24 +00:00
206fdf148c
This CL fixes two issues. 1. `FfiNative`s now check the Dart and native type for compatiblity. 2. Both `FfiNative`, `asFunction`, and `lookupFunction` check the type correspondence between native and Dart type with a subtype check of the expected Dart type and the provided Dart type. For functions, any return type is a subtype of a void type. This is fine for Dart, but not for native calls. This CL manually checks the return type for void. This CL does not fix the inconsistency between `asFunction` and `FfiNative` with regard to allowing more strict return types than `Object` for `Handle`s Issue: https://github.com/dart-lang/sdk/issues/49518 Analyzer fixes in follow up CL. TEST=tests/ffi/vmspecific_static_checks_ffinative_test.dart Closes: https://github.com/dart-lang/sdk/issues/49471 Change-Id: Ibc7bd6a1a0db59cc5fa5d755d76999fd7e9a06a4 Cq-Include-Trybots: luci.dart.try:analyzer-linux-release-try,analyzer-mac-release-try,vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64c-try Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252601 Reviewed-by: Martin Kustermann <kustermann@google.com> Commit-Queue: Daco Harkes <dacoharkes@google.com> |
||
---|---|---|
.. | ||
bin | ||
lib | ||
test | ||
testcases/transformations | ||
tool | ||
analysis_options.yaml | ||
LICENSE | ||
OWNERS | ||
pubspec.yaml | ||
README.md |
This package hosts VM specific Dart code and helper scripts.