RFR: 7903878: jextract should derive struct field offsets from struct layouts

Nizar Benalla nbenalla at openjdk.org
Wed Dec 11 15:42:27 UTC 2024


On Fri, 6 Dec 2024 23:03:47 GMT, Nizar Benalla <nbenalla at openjdk.org> wrote:

> Please read the JBS issue for more details.
> 
> Currently jextract emits hardwired offsets, it would be better if the offsets could be computed dynamically from the struct layouts.
> 
> Passes all tests, unsure if this patch requires new tests.
> Note: I used `fieldElementPaths(field.name())))` instead of the `javaName` to deal with nested structs.
> 
> 
> It seems like GitHub actions are broken for Ubuntu? will look into this next week if necessary.

On the same platforms, the offset are same the before/after the patch.

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

PR Comment: https://git.openjdk.org/jextract/pull/262#issuecomment-2536343329


More information about the jextract-dev mailing list