[foreign-memaccess+abi] RFR: 8292037: Consider moving Linker::methodType as FunctionDescriptor::toMethodType [v2]
Jorn Vernee
jvernee at openjdk.org
Tue Sep 13 15:08:19 UTC 2022
On Thu, 8 Sep 2022 17:30:02 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> src/java.base/share/classes/java/lang/foreign/FunctionDescriptor.java line 105:
>>
>>> 103: * <li>If the layout is a {@link ValueLayout} the carrier type is determined through {@link ValueLayout#carrier()}.</li>
>>> 104: * <li>If the layout is a {@link GroupLayout}, or {@link SequenceLayout} the carrier type is {@link MemorySegment}.</li>
>>> 105: * <li>If the layout is a {@link PaddingLayout} an {@link IllegalArgumentException} is thrown.</li>
>>
>> This comment seems to be inconsistent with the @throws clause
>
> The implementation seems to support sequence layouts, and return MemorySegment. Not super sure about that (given the linker doesn't support that).
In the interest of moving this forward, for now I'll keep the current mapping behavior from Linker.methodType, and just do the move to FunctionDescriptor in this patch.
-------------
PR: https://git.openjdk.org/panama-foreign/pull/717
More information about the panama-dev
mailing list