[foreign-memaccess+abi] RFR: 8308293: A linker should expose the layouts it supports
Maurizio Cimadamore
mcimadamore at openjdk.org
Thu Jun 15 13:21:22 UTC 2023
On Thu, 15 Jun 2023 10:51:55 GMT, Per Minborg <pminborg at openjdk.org> wrote:
> Maybe we could add a test that ensures basic mapping is in place?
Good idea.
> src/java.base/share/classes/jdk/internal/foreign/abi/AbstractLinker.java line 280:
>
>> 278: .orElseGet(() -> FunctionDescriptor.ofVoid(stripNames(function.argumentLayouts())));
>> 279: }
>> 280:
>
> Would it make sense to add a "hook" that exotic platforms can use to modify the initialization of the Map?
If you mean a public hook, no. Because the set of canonical layout is fixed by the linker impl. If you mean an internal hook, yeah, that might make sense (but can also be added later, if needed). One such example would be adding "long double" on Windows (in which this type just decays to `double`).
-------------
PR Comment: https://git.openjdk.org/panama-foreign/pull/839#issuecomment-1593042748
PR Review Comment: https://git.openjdk.org/panama-foreign/pull/839#discussion_r1231001012
More information about the panama-dev
mailing list