RFR: 8310405: Linker.Option.firstVariadicArg should specify which index values are valid [v2]

Jorn Vernee jvernee at openjdk.org
Wed Jun 21 23:33:38 UTC 2023


On Wed, 21 Jun 2023 07:34:20 GMT, Per Minborg <pminborg at openjdk.org> wrote:

>> 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).
>
>> 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).
> 
> I think this is a good suggestion. It makes it much easier to understand.

Thanks for the review.

I've added a bullet list, and switch same of the language to refer to the 'start of the variadic arguments passed to the function described by the function descriptor'. I think the latter avoids implying the index is an index into the argument layouts, but it feels like a bit of a mouthful (any suggestions?). I've also added a small note to the global variadic function doc to indicate that the index might not necessarily have a corresponding argument layout.

How does the new version look?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14565#discussion_r1237819366


More information about the core-libs-dev mailing list