[lworld] RFR: 8352613: [lworld] New Unsafe API for special array creation needed by VarHandle

Chen Liang liach at openjdk.org
Fri Mar 21 15:26:21 UTC 2025


On Fri, 21 Mar 2025 14:52:15 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> New Unsafe API to help the implementation of VarHandle's CAS operations on flat values.
>
> src/hotspot/share/prims/unsafe.cpp line 409:
> 
>> 407: } UNSAFE_END
>> 408: 
>> 409: UNSAFE_ENTRY(jarray, Unsafe_NewSpecialArray(JNIEnv *env, jobject unsafe, jclass elmClass, jint len, jint layoutKind)) {
> 
> Should it be called newFlatArray?

Indeed, this rejects `LayoutKind::REFERENCE`

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

PR Review Comment: https://git.openjdk.org/valhalla/pull/1404#discussion_r2007818916


More information about the valhalla-dev mailing list