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

Maurizio Cimadamore mcimadamore at openjdk.org
Thu May 4 13:34:44 UTC 2023


On Thu, 4 May 2023 12:58:23 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

>> 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.
>
> 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?

I believe FunctionDescriptor::toMethodType is specified to throw if it sees padding?

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

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


More information about the panama-dev mailing list