[foreign-memaccess+abi] RFR: Deduplicate layouts and simplify value layout implementations [v3]
Maurizio Cimadamore
mcimadamore at openjdk.org
Thu Feb 16 10:03:42 UTC 2023
On Thu, 16 Feb 2023 09:47:36 GMT, Per Minborg <pminborg at openjdk.org> wrote:
> The PR is more aimed at cases where there is something like this:
>
> ```
> private static final MY_INT = JAVA_INT.withOrder(ByteOrder.LITTLE_ENDIAN);
> private static final OTHER_INT = JAVA_INT.withBitAlignment(32);
> ```
>
> I am happy to close this PR if the quorum is this would provide relatively little benefit compared to the added complexity.
In my experience, the code above is not very idiomatic, so I'd be for closing the PR until some evidence points otherwise. The data you have collected on jextract is interesting (thanks!), in the sense that running the generated bindings has the characteristics I would expect, but it seems like jextract itself (when running) is being a bit wild when it comes to layout creation (which might or might not be an issue, I'd have to look more at the code).
-------------
PR: https://git.openjdk.org/panama-foreign/pull/795
More information about the panama-dev
mailing list