[lworld] RFR: 8352613: [lworld] New Unsafe API for special array creation needed by VarHandle
Frederic Parain
fparain at openjdk.org
Fri Mar 21 17:27:34 UTC 2025
On Fri, 21 Mar 2025 15:24:08 GMT, Chen Liang <liach at openjdk.org> wrote:
>> 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`
Special is less restrictive if we have to evolve this API (the layout argument being an opaque token for the Java side, we can encode a lot of things in it).
-------------
PR Review Comment: https://git.openjdk.org/valhalla/pull/1404#discussion_r2008013464
More information about the valhalla-dev
mailing list