RFR: 8310405: Linker.Option.firstVariadicArg should specify which index values are valid
Maurizio Cimadamore
mcimadamore at openjdk.org
Wed Jun 21 00:11:06 UTC 2023
On Tue, 20 Jun 2023 23:58:53 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:
>> src/java.base/share/classes/java/lang/foreign/Linker.java line 659:
>>
>>> 657: * against which the index is validated is available.
>>> 658: *
>>> 659: * @param index the index of the first variadic argument layout in the function descriptor associated
>>
>> IMHO this description is still confusing because it speaks about an index into the function descriptor argument layouts - which this thing is not.
>
> Right, will polish this some more as well.
Possible suggestion/thing to try: use a bullet list to spell out all cases for `index`. E.g. we know there's index == 0 (all variadic). Then we know there's index = N (no variadic). Then there's index == m, 0 < m < N - which means layouts 0..m are non-variadic and m..N are variadic (where n..m denotes an interval with n included and m excluded).
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14565#discussion_r1236021354
More information about the core-libs-dev
mailing list