On Mon, 16 Feb 2026 16:24:23 GMT, Joel Sikström <[email protected]> wrote:
>> 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?
I think that's already much better regardless of the name we land on in the
end. I'd still vote for `infer` or personally.
-------------
PR Review Comment:
https://git.openjdk.org/valhalla/pull/2114#discussion_r2813225521