[lworld] RFR: 8375306: [lworld] Investigate alternatives to flatArrayOopDesc::obj_at implementation [v3]
Frederic Parain
fparain at openjdk.org
Fri Feb 13 18:14:26 UTC 2026
On Fri, 13 Feb 2026 08:38:25 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:
>> Frederic Parain has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Fix search of specific array klass
>
> src/hotspot/share/prims/jvm.cpp line 539:
>
>> 537: JVM_END
>> 538:
>> 539: JVM_ENTRY(jarray, JVM_NewReferenceArray(JNIEnv *env, jclass elmClass, jint len))
>
> This function looks similar to `JVM_NewNullableAtomicArray`, but it lacks the `klass->initialize(CHECK_NULL);`. Is that intentional?
Yes. In fact, `JVM_NewNullableAtomicArray` should not initialize the element class either. But I didn't remove the class initialization call because for flat arrays the code still needs the null_reset value (which is allocated at class initialization). I've added a comment to JDK-8377576 to mention this future cleanup once the `ValuePayload` PR has been integrated (and C1 fixed) and the null_reset value is not needed anymore.
-------------
PR Review Comment: https://git.openjdk.org/valhalla/pull/2033#discussion_r2805470255
More information about the valhalla-dev
mailing list