[foreign-jextract] RFR: 8249810: Jextract should generate parameter types with Addressable type [v2]
Maurizio Cimadamore
mcimadamore at openjdk.java.net
Wed Jul 22 10:37:06 UTC 2020
> This patch tweaks jextract so that all foreign functions wrappers use the new Addressable carrier type, as opposed to
> the more specific MemoryAddress type. This is useful, as now clients can call such functions with either an address or
> a segment, w/o any need to call `MemorySegment::address`. The bulk of the changes are in the TypeTranslator visitor,
> which now has a parameter which says as to whether an addressable should be used. There are also some changes in the
> HeaderBuilder class, as we now need to call `Addressable::address` on any incoming addressable parameter (since the
> method handle generated by the linker expects a `MemoryAddress`).
Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision:
Simplify implementation
-------------
Changes:
- all: https://git.openjdk.java.net/panama-foreign/pull/257/files
- new: https://git.openjdk.java.net/panama-foreign/pull/257/files/e8abdab2..1eb31bab
Webrevs:
- full: https://webrevs.openjdk.java.net/panama-foreign/257/webrev.01
- incr: https://webrevs.openjdk.java.net/panama-foreign/257/webrev.00-01
Stats: 35 lines in 3 files changed: 6 ins; 2 del; 27 mod
Patch: https://git.openjdk.java.net/panama-foreign/pull/257.diff
Fetch: git fetch https://git.openjdk.java.net/panama-foreign pull/257/head:pull/257
PR: https://git.openjdk.java.net/panama-foreign/pull/257
More information about the panama-dev
mailing list