RFR: 8319316: Clarify text around which layouts a linker supports [v2]

Jorn Vernee jvernee at openjdk.org
Fri Nov 3 16:35:19 UTC 2023


On Fri, 3 Nov 2023 16:17:32 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

>> src/java.base/share/classes/java/lang/foreign/Linker.java line 247:
>> 
>>> 245:  * </ul>
>>> 246:  *
>>> 247:  * Linker implementations may optionally support additional layouts, such as 'packed' struct layouts.
>> 
>> Optional: should we say what a packed struct layout is? E.g. make `packed` italic. Then follow up with a sentence like: 
>> 
>> a packed struct is a struct in which there is at least one member layouts L whose offsets does not respect L's natural alignment: <example>
>
> Yes, good idea

See https://github.com/openjdk/jdk/pull/16485/commits/fea8a26325b3e6142c652821e0ef95d78992b36c

I've avoided talking about offset, since packing can also be used to avoid trailing padding.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16485#discussion_r1381955593


More information about the core-libs-dev mailing list