[foreign-abi] RFR: Revisit FunctionDescriptor

Jorn Vernee jorn.vernee at oracle.com
Mon Feb 3 16:19:59 UTC 2020


Hi,

Please review the following patch that revisits FunctionDescriptor: 1. 
Adds appendArgumentLayouts, and changeReturnLayout combinator methods. 
2. Removes the variadic flag. This flag was not really being used in 
practice, since we can not link variadic functions directly any ways. 
Using the new appendArgumentLayouts method we can 'specialize' a base FD 
with different argument layouts representing vararg arguments. I think 
if a similar flag is needed in the future, we should consider adding 
annotations to FunctionDescriptor, and making it an annotation instead, 
but currently it doesn't seem like it's pulling it's weight by being in 
the API.

Webrev: 
http://cr.openjdk.java.net/~jvernee/panama/webrevs/cleanup_fd/webrev.00/
Bugs: https://bugs.openjdk.java.net/browse/JDK-8238226, 
https://bugs.openjdk.java.net/browse/JDK-8237580

Again, this patch applies on top of the Binding cleanup patch.

Thanks,
Jorn



More information about the panama-dev mailing list