RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v8]
Per Minborg
pminborg at openjdk.org
Wed Mar 22 16:18:47 UTC 2023
On Wed, 22 Mar 2023 14:35:42 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> 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
More information about the build-dev
mailing list