[Rev 01] RFR: 8238226: Revisit FunctionDescriptor

Jorn Vernee jvernee at openjdk.java.net
Tue Feb 11 16:40:29 UTC 2020


> Continuation of: https://mail.openjdk.java.net/pipermail/panama-dev/2020-February/007418.html
> 
>> 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

The pull request has been updated with 1 additional commit.

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

Added commits:
 - 54a4b4a7: Use appendArgumentLayouts in StdLibTest to specialize printf descriptor

Changes:
  - all: https://git.openjdk.java.net/panama-foreign/pull/15/files
  - new: https://git.openjdk.java.net/panama-foreign/pull/15/files/a986883a..54a4b4a7

Webrevs:
 - full: https://webrevs.openjdk.java.net/panama-foreign/15/webrev.01
 - incr: https://webrevs.openjdk.java.net/panama-foreign/15/webrev.00-01

  Stats: 11 lines in 1 file changed: 3 ins; 5 del; 3 mod
  Patch: https://git.openjdk.java.net/panama-foreign/pull/15.diff
  Fetch: git fetch https://git.openjdk.java.net/panama-foreign pull/15/head:pull/15

PR: https://git.openjdk.java.net/panama-foreign/pull/15


More information about the panama-dev mailing list