[foreign-memaccess+abi] RFR: 8274157: java.foreign: Add method MemorySegment::asOverlappingSlice [v3]
Julia Boes
jboes at openjdk.java.net
Tue Oct 5 10:03:27 UTC 2021
On Mon, 4 Oct 2021 21:42:14 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> src/jdk.incubator.foreign/share/classes/jdk/internal/foreign/AbstractMemorySegmentImpl.java line 263:
>>
>>> 261: final long thatEnd = thatStart + that.byteSize() - 1L;
>>> 262:
>>> 263: if (thisStart <= thatEnd && thisEnd >= thatStart) { //overlap occurs
>>
>> Hi,
>>
>> Minor, I wonder if it would make sense to replace "weak" inequality with strong inequality and remove subtraction of 1 (two instructs less)?
>
> I believe that has been addresses in the latest revision?
Good point, it was addressed in the latest commit b62df7e.
-------------
PR: https://git.openjdk.java.net/panama-foreign/pull/585
More information about the panama-dev
mailing list