[foreign-memaccess+abi] RFR: 8307253: Make FunctionDescriptor::toMethodType an instance method of Linker [v2]
Jorn Vernee
jvernee at openjdk.org
Thu May 4 14:50:44 UTC 2023
On Thu, 4 May 2023 13:31:38 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> 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?
Yes, I mean reject padding upon construction of the FunctionDescriptor (e.g. using `of` or `ofVoid`).
-------------
PR Review Comment: https://git.openjdk.org/panama-foreign/pull/830#discussion_r1185131564
More information about the panama-dev
mailing list