[foreign-memaccess+abi] RFR: 8291639: Improve the ability to visualize a MemorySegment in human readable forms [v2]
Maurizio Cimadamore
mcimadamore at openjdk.org
Wed Aug 3 17:21:52 UTC 2022
On Wed, 3 Aug 2022 16:30:08 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> So, suppose there is a nested union such that: U = (A|B)|(C|D). Then the actual layout U could be either of AC, AD, BC or BD. Hence, we could present all these combinations.
>
> Ah I see. I think that, perhaps, it would be better to collect all fields in a union, and present them all (like if it was a struct). I don't see any particular problem with that, and I don't think the API should "pick" a field.
Ah ok, I misread your comment. I think what the impl does now is actually sensible, as it presents the full `(A|B)|(C|D)`.
-------------
PR: https://git.openjdk.org/panama-foreign/pull/695
More information about the panama-dev
mailing list