[foreign-memaccess+abi] RFR: 8307253: Make FunctionDescriptor::toMethodType an instance method of Linker [v2]

Jorn Vernee jvernee at openjdk.org
Thu May 4 13:02:46 UTC 2023


On Thu, 4 May 2023 09:50:44 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> This patch moves `FunctionDescriptor::toMethodType` as an instance method of `Linker`. This allows linker implementations to be more opinionated on how the function descriptor -> method type conversion should behave.
>
> Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Revert changes.
>   Fix javadoc and impl for FunctionDescriptor::toMethodType to allow sequence layouts.

Marked as reviewed by jvernee (Committer).

src/java.base/share/classes/jdk/internal/foreign/abi/AbstractLinker.java line 113:

> 111: 
> 112:     private static void checkIsSupportedLayout(MemoryLayout layout) {
> 113:         if (layout instanceof SequenceLayout || layout instanceof PaddingLayout) {

Maybe we even want to check for padding layouts when creating the function descriptor. Does padding ever make sense as an argument/return layout?

-------------

PR Review: https://git.openjdk.org/panama-foreign/pull/830#pullrequestreview-1413035190
PR Review Comment: https://git.openjdk.org/panama-foreign/pull/830#discussion_r1184978864


More information about the panama-dev mailing list