Skip to content

Commit

Permalink
[vm/ffi] Adds transforms for FfiNative return type of Handle.
Browse files Browse the repository at this point in the history
FFI functions return Handles as Object so we have to add a cast
to get the expected return type. E.g.:
  @FfiNative<Handle Function()>(..)
  external String getSomeStr();
Will have a synthetic FFI function of type `Object Function()`,
which we need to add a `as String` to.

This CL also refactors the overlapping parts of
`_transformInstanceMethod` and `_transformInstanceFunction` into
two shared functions.

TEST=Updated .expect file.
Change-Id: I0f74d34ee3eef4928f7beb38a1180180c13672ad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216286
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
  • Loading branch information
Clement Skau authored and commit-bot@chromium.org committed Oct 20, 2021
1 parent 0a39aa7 commit 4522d4b
Show file tree
Hide file tree
Showing 3 changed files with 309 additions and 250 deletions.
Loading

0 comments on commit 4522d4b

Please sign in to comment.