Closed ChengJin01 closed 8 months ago
According to the announcement for the FFI work at https://mail.openjdk.org/pipermail/panama-dev/2023-July/019510.html,
Of course, the fact that FFM API is headed for finalization doesn't mean
that development on FFM API will stop. There are several enhancements
(aside from "regular" performance fixes) that we have been discussing
over the years which can be delivered as follow-up JEPs:
* Support for unsigned/complex types (needs Valhalla)
* Mapping between structs and records [12]
* Integration between Linker and JNI [13]
* Structured arenas (depends on finalization of StructuredTaskScope) [14]
* Pinning of heap segments
The listed work above which are related to FFI but interact with other features will be addressed in separate JEPs in the near future.
We have issues to track the remaining failures
See https://openjdk.org/jeps/454 with the following changes in terms of APIs which might affect our FFI implementation in Java after the updated code at https://github.com/eclipse-openj9/openj9/issues/16951 (Third Preview).
1.Provided a new linker option allowing clients to pass heap segments to downcall method handles 2.Introduced the
Enable-Native-Access
JAR-file manifest attribute, allowing code in executable JAR files to call restricted methods without having to use the --enable-native-access command-line option 3.Enabled clients to build C-language function descriptors programmatically, avoiding platform-specific constants 4.Improved support for variable-length arrays in native memory 5.Added support for arbitrary charsets for native stringsFYI: @tajila, @pshipton