On Mon, 16 Feb 2026 15:05:40 GMT, Paul Hübner <[email protected]> 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

Reply via email to