On Wed, 31 May 2023 23:57:01 GMT, Jorn Vernee <jver...@openjdk.org> wrote:

>> Also, should we say somewhere that, for prototype-less functions, 
>> `firstVariadicArg` should always have an index of 0 (e.g. any other value is 
>> illegal, trivially). It's not super important, just one of those little 
>> things that can reinforce understanding.
>
>> Perhaps if we used a bullet-list to define the two ways in which variadic 
>> function can be declared, the definition could stand out even more?
> 
> Yes, I think this is a good idea. I'll do another pass.
> 
>> Also, should we say somewhere that, for prototype-less functions, 
>> firstVariadicArg should always have an index of 0
> 
> I think this is also a good idea. It helps hammer the point home.

Did another pass: 
https://github.com/openjdk/jdk/pull/14225/commits/e806fae5dc295726846d197dad59e6b0ba715ceb

There are now 3 paragraphs in the javadoc: One that explains what a variadic 
function is (in C), one  that explains how they are linked using specialized 
function descriptors, and finally one which explains the limitation on variadic 
argument layouts.

Additionally I've switched the polarity of the check to be the same as it is in 
the doc, and aligned the exception message with the terminology in the doc.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14225#discussion_r1213310000

Reply via email to