[foreign-abi] [Rev 02] RFR: 8245988: Add a special VaList carrier

Jorn Vernee jvernee at openjdk.java.net
Thu Jun 4 12:14:45 UTC 2020


> Hi,
> 
> This patch adds a special VaList carrier to CSupport that can be used by C linker implementations to pass `va_list`
> arguments to upcalls and downcalls.
> Currently Windows VaList and SysV VaLists are implemented, but AArach64 not yet.
> 
> The API for the Reader and Builder might be a bit strange; the limitation to int, long, and double comes from the
> standard argument promotions that are done in C when calling a variadic function. Since we do not know how to promote
> any arbitrary value, at least for now the API restricts itself to accepting only types that would not be promoted in C,
> leaving any needed conversion up to the user.  For reviewers; I moved CallArranger.TypeClass + classification code to
> the top level, since it is now shared with the VaList implementations, so that's where the CallArranger diff comes
> from.  Thanks, Jorn

Jorn Vernee has updated the pull request incrementally with one additional commit since the last revision:

  Rename VaList and VaList.Builder methods for adding and reading arguments per review.

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

Changes:
  - all: https://git.openjdk.java.net/panama-foreign/pull/184/files
  - new: https://git.openjdk.java.net/panama-foreign/pull/184/files/27562016..47d43037

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

  Stats: 107 lines in 5 files changed: 0 ins; 0 del; 107 mod
  Patch: https://git.openjdk.java.net/panama-foreign/pull/184.diff
  Fetch: git fetch https://git.openjdk.java.net/panama-foreign pull/184/head:pull/184

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


More information about the panama-dev mailing list