[lworld] RFR: 8366705: [lworld] Re-work of arrays meta-data [v4]
Frederic Parain
fparain at openjdk.org
Thu Sep 4 16:57:24 UTC 2025
On Wed, 3 Sep 2025 16:56:50 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> Frederic Parain has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 67 commits:
>>
>> - Merge branch 'array_klasses' of github.com:fparain/valhalla into array_klasses
>> - Forgot a TODO
>> - Small cleanup
>> - Merge remote-tracking branch 'upstream/lworld' into array_klasses
>> - Moved get_Klass() back to protected and updated usages
>> - Merge branch 'array_klasses' of github.com:fparain/valhalla into array_klasses
>> - Linked TODOs to JDK-8366668
>> - Multidim array fix
>> - Cleanup T_FLAT_ELEMENT related code
>> - Fix for isAssignableFrom + tests
>> - ... and 57 more: https://git.openjdk.org/valhalla/compare/22e9d5f5...527a17b6
>
> src/hotspot/share/oops/klass.hpp line 473:
>
>> 471: static const unsigned int _lh_array_tag_type_value = 0Xfffffffc;
>> 472: static const unsigned int _lh_array_tag_flat_value = 0Xfffffffa;
>> 473: static const unsigned int _lh_array_tag_ref_value = 0Xfffffff8;
>
> So there is no more layout_helper value for objArray, right? Only flat and ref values?
Correct. The layout_helper provides information about the layout of an allocated Java array. ObjArrayKlass instances cannot contain details about a particular layout.
> src/hotspot/share/prims/jni.cpp line 2400:
>
>> 2398: oop v = JNIHandles::resolve(value);
>> 2399: if (a->is_within_bounds(index)) {
>> 2400: // TODO FIXME Temporary hack, to be removed when FlatArrayKlass is made a sub-class of ObjArrayKlass
>
> You've done this. Can this be cleaned up here?
Fixed
-------------
PR Review Comment: https://git.openjdk.org/valhalla/pull/1452#discussion_r2322782948
PR Review Comment: https://git.openjdk.org/valhalla/pull/1452#discussion_r2322785360
More information about the valhalla-dev
mailing list