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

Maurizio Cimadamore mcimadamore at openjdk.org
Mon May 8 14:30:45 UTC 2023


On Mon, 8 May 2023 13:00:14 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

>> Maurizio Cimadamore has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains four commits:
>> 
>>  - Address review comments (check for padding during function descriptor construction)
>>  - Merge branch 'foreign-memaccess+abi' into toMethodType
>>  - Revert changes.
>>    Fix javadoc and impl for FunctionDescriptor::toMethodType to allow sequence layouts.
>>  - Initial push
>
> src/java.base/share/classes/jdk/internal/foreign/FunctionDescriptorImpl.java line 55:
> 
>> 53:             throw new IllegalArgumentException("Unsupported padding layout return in function descriptor: " + resLayout);
>> 54:         }
>> 55:         Optional<MemoryLayout> paddingLayout = argLayouts.stream().filter(l -> l instanceof PaddingLayout).findAny();
> 
> This could use `Stream::anyMatch`.

Uhm - I thought about that when writing the code, but then I can't print out the problematic layout.

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

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


More information about the panama-dev mailing list