On Fri, 11 Mar 2022 15:53:08 GMT, Maurizio Cimadamore <mcimadam...@openjdk.org> 
wrote:

>> src/java.base/share/classes/java/lang/runtime/Carrier.java line 380:
>> 
>>> 378:                 }
>>> 379: 
>>> 380:                 return Unsafe.ARRAY_LONG_BASE_OFFSET +
>> 
>> Shouldn't you add the offset of the first `int` value in the array to the 
>> resulting expression? E.g. I'm assuming we're storing `long`s first and 
>> `int`s after? If so, `int` values will be located at an offset from the 
>> start of the array.
>
> Ah ok - I see - the constructor method handle binds the correct offset, 
> adding the required constant offset (for all the long values). So my comment 
> it's mostly stylistic.

I'll add commentary.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7744

Reply via email to