[foreign-abi] RFR 8228509: Add support for binding varargs functions on Windows

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Thu Jul 25 15:32:12 UTC 2019


Looks very nice.

But I think we can make it simpler :-)

Note that in SysV and Aarch64 we don't care whether an argument is 
varargs or not. In Windows we do, but now the layout is expressive 
enough to encode the 'isVarargs' info itself.

So... I propose to change CallingSequenceBuilder::addArgument and to 
drop the boolean 'isVarargs' from there. Win64 
CallingSequenceBuilderImpl can easily check the layout annotation and 
act accordingly.

Other than that looks great - very nice test!

Maurizio


On 25/07/2019 16:02, Jorn Vernee wrote:
> Hi,
>
> Please review the following patch which adds support for using varargs 
> functions with float arguments on Windows (e.g. printf).
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8228509
> Webrev: 
> http://cr.openjdk.java.net/~jvernee/panama/webrevs/8228509/webrev.00/
>
> This mainly consists of a way to mark varargs argument layouts as such 
> through the use of an annotation, which is then detected when 
> computing a CallingSequence.
>
> I've also added a general purpose test for testing the passing of 
> vararg arguments.
>
> Thanks,
> Jorn


More information about the panama-dev mailing list