[foreign-memaccess+abi] RFR: 8291639: Improve the ability to visualize a MemorySegment in human readable forms [v2]
Rémi Forax
forax at openjdk.org
Fri May 26 15:18:12 UTC 2023
On Fri, 26 May 2023 14:21:39 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> src/java.base/share/classes/java/lang/foreign/GroupLayout.java line 209:
>>
>>> 207: * @since 21
>>> 208: */
>>> 209: <R extends Record> Function<MemorySegment, R> recordMapper(Class<R> type);
>>
>> you also need to throw an IAE if type is Record.class, java.lang.Record is the only subtype of java.lang.Record which is not a record
>
> I wonder if an overload which takes a MethodHandles.Lookup might help with the accessibility issues (but we can add that later)
Yes ! and i'm not even sure that having a version that does not take a Lookup make sense.
-------------
PR Review Comment: https://git.openjdk.org/panama-foreign/pull/833#discussion_r1206939134
More information about the panama-dev
mailing list