[lworld] RFR: 8378000: [lworld] Move ArrayProperties to its own class [v2]
Joel Sikström
jsikstro at openjdk.org
Mon Feb 16 16:29:49 UTC 2026
On Mon, 16 Feb 2026 15:05:40 GMT, Paul Hübner <phubner at openjdk.org> wrote:
>> Joel Sikström has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Braces around if-statement
>
> src/hotspot/share/c1/c1_Runtime1.cpp line 1211:
>
>> 1209: k = ek->array_klass(CHECK);
>> 1210: if (!k->is_typeArray_klass() && !k->is_refArray_klass() && !k->is_flatArray_klass()) {
>> 1211: k = ObjArrayKlass::cast(k)->klass_with_properties(ArrayProperties(), THREAD);
>
> Summarizing the discussion we had offline: I like this refactor overall and I think it makes the code much easier to understand, but `ArrayProperties()` meaning `DEFAULT` is less maintainable than before in my opinion. It looks like there are no properties.
>
> I suggest making a private constructor and a static `from_default` or `infer` or `infer_default`. We had a discussion previously on the name `DEFAULT` name not being ideal/slightly misleading. Perhaps it is time to address it?
FTR, your proposal would look something like this (maybe with another name):
https://github.com/openjdk/valhalla/commit/64a2230025118e68cee0aca742c261597c78e2dd
What do you and others think?
-------------
PR Review Comment: https://git.openjdk.org/valhalla/pull/2114#discussion_r2813216026
More information about the valhalla-dev
mailing list