[foreign-memaccess] RFR 8235837: Memory access API refinements
John Rose
john.r.rose at oracle.com
Fri Jan 10 00:42:06 UTC 2020
+1.00
> On Jan 9, 2020, at 3:22 AM, Maurizio Cimadamore <maurizio.cimadamore at oracle.com> wrote:
>
> Overnight, especially after merging changes on foreign-abi and foreign-jextract, I had a change of heart - and I'm gonna go for the slightly longer names:
>
> add -> addOffset
> owner -> ownerThread
>
> which will make the code slightly more readable.
>
> I will take care of downstream merges.
>
> Apologizes for the back and forth.
>
> Maurizio
>
> On 08/01/2020 23:31, Maurizio Cimadamore wrote:
>> Thanks, pushed
>>
>> Maurizio
>>
>> On 08/01/2020 21:41, Paul Sandoz wrote:
>>> Looks good.
>>>
>>> Paul.
>>>
>>>> On Jan 8, 2020, at 1:00 PM, Maurizio Cimadamore <maurizio.cimadamore at oracle.com> wrote:
>>>>
>>>> New revision:
>>>>
>>>> http://cr.openjdk.java.net/~mcimadamore/panama/8235837_v2/
>>>>
>>>> This new patch basically just changes the name of MemoryAddress::offset(long) to add(long) and then remove MemorySegment::isAccessible() in favor of MemorySegment::owner. Simple, and minimal.
>>>>
>>>> I kept the test, as I don't think we had any test specifically for slicing.
>>>>
>>>> Maurizio
>>>>
>>>> On 08/01/2020 19:23, Paul Sandoz wrote:
>>>>> I was just looking at the current patch and also was not sure about it.
>>>>>
>>>>>
>>>>>> On Jan 8, 2020, at 11:11 AM, Maurizio Cimadamore <maurizio.cimadamore at oracle.com> wrote:
>>>>>>
>>>>>>
>>>>>> On 08/01/2020 18:59, Maurizio Cimadamore wrote:
>>>>>>> Am I the only one finding the use of the 'relative' word confusing here? E.g. that "relativeTo" seems to suggest re-interpreting of same memory location, rather than a change in the addressed location.
>>>>> Yeah, it's a little confusing, “relative” applies to the argument.
>>>>>
>>>>>
>>>>>> Proposal - let's just have:
>>>>>>
>>>>>> long offset()
>>>>>>
>>>>>> MemoryAddress add(long offset)
>>>>>>
>>>>>> where the offset in add is allowed to be negative.
>>>>>>
>>>>>> Deal?
>>>>>>
>>>>> Deal!
>>>>>
>>>>> Paul.
More information about the panama-dev
mailing list