[foreign-jextract] RFR: 8252759: Jextract flattens nested anonymous structs and unions when computing layouts
Maurizio Cimadamore
mcimadamore at openjdk.java.net
Fri Jan 15 12:26:11 UTC 2021
On Fri, 15 Jan 2021 12:01:09 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:
> Note that we already have a test that more broadly tests nested structs; https://github.com/openjdk/panama-foreign/blob/foreign-jextract/test/jdk/tools/jextract/nested.h
>
> It just wasn't catching this particular case, so I added something separate. I can enhance that test to also check offsets of fields.
Yes, but that test is super simple:
https://github.com/openjdk/panama-foreign/blob/foreign-jextract/test/jdk/tools/jextract/Test8244512.java
(unless I'm missing something).
I'd suggest to unify both test and verify the emitted layouts (and field accessors too), not just the classes that come out. I'm also ok if we do that as a separate change.
-------------
PR: https://git.openjdk.java.net/panama-foreign/pull/434
More information about the panama-dev
mailing list