On Wed, 22 Mar 2023 14:35:42 GMT, Maurizio Cimadamore <[email protected]>
wrote:
>> Per Minborg has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Improve javadocs for Linker::captureStateLayout
>
> src/java.base/share/classes/java/lang/foreign/MemoryLayout.java line 697:
>
>> 695: */
>> 696: static PaddingLayout paddingLayout(long bitSize) {
>> 697: if (bitSize <= 0) {
>
> While this does the right thing, I wonder if we can do better, as it seems
> we're checking size twice - perhaps we need to customize the
> `requireBitSizeValid` function?
I tried that but it turned out it can be zero in other contexts. Maybe we
should add back the good 'ole "allowZero" flag?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13079#discussion_r1145052056