RFR: 8340205: Native linker allows MemoryLayout consisting of only PaddingLayout [v4]
Jorn Vernee
jvernee at openjdk.org
Mon Sep 23 14:46:38 UTC 2024
On Mon, 23 Sep 2024 14:40:40 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:
>> Per Minborg has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Add to specification and refine detection of PL GLs
>
> src/java.base/share/classes/java/lang/foreign/Linker.java line 265:
>
>> 263: * its non-padding layout elements, or to satisfy (2), and</li>
>> 264: * <li>{@code G} is {@code G.memberLayouts().isEmpty()} or (at the same time) not all
>> 265: * elements are padding layouts.</li>
>
> I suggest splitting the last list item into 2. The prior item also needs to be cleaned up (replace `, and` with `;`).
>
> Not sure what you mean here with 'at the same time'? An empty group layout can not contain padding layouts.
I think it might be enough to just mention that not only padding layouts are allowed. The list is for things that should all be true, so adding an 'or' condition in there seems a bit confusing.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21041#discussion_r1771596648
More information about the core-libs-dev
mailing list