[foreign-jextract] RFR: 8249810: Jextract should generate parameter types with Addressable type
Maurizio Cimadamore
mcimadamore at openjdk.java.net
Tue Jul 21 21:21:32 UTC 2020
On Tue, 21 Jul 2020 18:06:09 GMT, Henry Jen <henryjen at openjdk.org> wrote:
> With code generation, I think that we can simply patch all MemoryAddress into Addressable in the static function
> wrapper to avoid conflict of choices.
What do you mean? Isn't that what the patch is doing? Note that we don't want to patch e.g. the MemoryAddress that
represents a global variable, or the MemoryAddress which is used by a struct getter/setter to do a dereference - e.g.
those should still be addresses? Also, in the latter case, a follow up patch will eventually replace the dereference
address with a dereference segment, so I don't think Addressable would be the right choice there. Addressable works
well mostly for function parameter types and, in principle, could also work as a callback return type (but I didn't try
that here).
-------------
PR: https://git.openjdk.java.net/panama-foreign/pull/257
More information about the panama-dev
mailing list