[foreign-memaccess+abi] RFR: 8308293: A linker should expose the layouts it supports
Jorn Vernee
jvernee at openjdk.org
Thu Jun 15 15:29:24 UTC 2023
On Thu, 15 Jun 2023 14:57:33 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> src/java.base/share/classes/jdk/internal/foreign/abi/AbstractLinker.java line 288:
>>
>>> 286: Map.entry("int", ValueLayout.JAVA_INT),
>>> 287: Map.entry("float", ValueLayout.JAVA_FLOAT),
>>> 288: Map.entry("long", CABI.current() == CABI.WIN_64 ? ValueLayout.JAVA_INT : ValueLayout.JAVA_LONG),
>>
>> This also needs to cover Windows/AArch64.
>>
>> Also, I don't think this will work for the fallback linker. In that case I think we need to get the native types from libffi, and then look at the size and alignment to determine the corresponding layout.
>
> Now that you speak of fallback linker, I'm reminded of Zero, and the fact that it does not support JNI. As such, I believe we're right in not including jint and friends in the javadoc (as some linkers can't support these).
? Zero supports JNI (we use it to implement the fallback linker)
-------------
PR Review Comment: https://git.openjdk.org/panama-foreign/pull/839#discussion_r1231192805
More information about the panama-dev
mailing list