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

Henry Jen henry.jen at oracle.com
Fri Feb 1 02:24:44 UTC 2019


So we are saying I revert back to have the 

final static INT16 = ByteOrder.naturalOrder() == ByteOrder.BIG_ENDIAN ? BE_INT16 : LE_INT16 in user’s code, that’s in EndiannessTest.java in this patch, and eventually all code where we are writing now to get JVM compatible INT16, INT32, INT64. Luckily we probably only need C types available now via SystemtemABI in most places.

Cheers,
Henry


> On Jan 31, 2019, at 5:51 PM, Maurizio Cimadamore <maurizio.cimadamore at oracle.com> wrote:
> 
> 
> On 01/02/2019 01:45, Henry Jen wrote:
>> We cannot just drop INT16, name it as PE_INT16 is fine. That’s the them of the discussion, we need something programmatically portable on JVM.
> 
> I would question the use of the term "need" here - longer term? Sure - but I can defo see the API not having platform-dependent layout types in the short term.
> 
> In  other words, there are two parts to this problem; one is to take endianness into account when accessing memory, which you have done. The second is to provide a reasonable kit of starter layout types for people to use. These two problems don't have (and shouldn't) to be tackled at the same time.
> 
> John suggested to go for all explicit mode - I'd say let's stick with that plan, and see what use cases will crop up in common code, and find ways (John's static import idea is a fine one - there could be others) to address them accordingly.
> 
> Maurizio
> 
>> 
>> Cheers,
>> Henry
>> 
>> 
>>> On Jan 31, 2019, at 5:13 PM, John Rose <john.r.rose at oracle.com> wrote:
>>> 
>>> On Jan 31, 2019, at 5:00 PM, Maurizio Cimadamore <maurizio.cimadamore at oracle.com> wrote:
>>>> I'm saying make everything explicit - and drop INT16 at least for now, for either LE_INT16, or some other scheme.
>>>> 
>>> That would be fine with me also, of course.



More information about the panama-dev mailing list