On Fri, 11 Mar 2022 15:48:37 GMT, Maurizio Cimadamore <mcimadam...@openjdk.org> wrote:
>> Jim Laskey has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Use long array for primitives >> - Use long arrays for primitives > > 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. ------------- PR: https://git.openjdk.java.net/jdk/pull/7744