[foreign] RFR 8218153: Read/Write of Value layout should honor declared endianness

Henry Jen henry.jen at oracle.com
Thu Feb 28 20:13:14 UTC 2019


OK, here is another update[1], and hopefully this is the last for basic support.

As the jextract part, I have a preliminary version[2] we can review. The fix modify the Runner to get explicit endian layout instead of modifying the template. This should be enough, but I suspect this is not 100% fit to the philosophy to compare against golden master file.

With jextract fix, future work to enforce check of explicit endianness on memory access can be continued, which I then expect issues to be fixed in UniversalInvoker.

Cheers,
Henry


[1] http://cr.openjdk.java.net/~henryjen/panama/8218153/3/webrev/
[2] http://cr.openjdk.java.net/~henryjen/panama/8218153/jextract/webrev/


> On Feb 27, 2019, at 2:58 PM, Maurizio Cimadamore <maurizio.cimadamore at oracle.com> wrote:
> 
> Yeah - covering Group (Sequence is a Group) and Value (Address is a Value) gives you a lot of cover... but...
> 
> Most of the code will work on 'Layout' - and if the root doesn't have the API point, clients will suffer.
> 
> Actually, it seems to me that the only Layout for which this will be a no-op is Unresolved. Everything else will have a non-trivial override, as your current implementation of the protected method in Group demonstrates.
> 
> Maurizio
> 
> On 27/02/2019 22:25, Henry Jen wrote:
>> OK, if we agreed that certainly can be done. :)
>> 
>> Just that, the method doesn’t make sense for other Layout except Value and Group, so they will be no-op.
>> 
>> Cheers,
>> Henry
>> 
>> 
>>> On Feb 27, 2019, at 2:13 PM, John Rose <john.r.rose at oracle.com> wrote:
>>> 
>>> On Feb 27, 2019, at 11:06 AM, Maurizio Cimadamore <maurizio.cimadamore at oracle.com> wrote:
>>>> Henry I think what we were suggesting was to add a new interface method to Layout
>>>> 
>>>> e.g.
>>>> 
>>>> interface Layout
>>>> 
>>>>    Layout withEndianness(Endianness)
>>>> }
>>>> 
>>>> and have the subtypes override accordingly. We want this to be usable by clients.
>>> Yes please; that's what I was hoping for also.
>>> 
>>> 



More information about the panama-dev mailing list