On Wed, 8 Jul 2026 22:46:53 GMT, Dean Long <[email protected]> wrote:

>> David Simms has updated the pull request incrementally with 11 additional 
>> commits since the last revision:
>> 
>>  - Merge branch '8317277' into jep401_sub_review_8317278
>>  - Merge remote-tracking branch 'valhalla/lworld' into 8317277
>>  - 8387703: [lworld] address batch of comments in mainline PR
>>    
>>    Co-authored-by: Tobias Hartmann <[email protected]>
>>    Reviewed-by: thartmann, dlong
>>  - 8387661: [lworld] move generate_return_value_stub() to SharedRuntime
>>    
>>    Reviewed-by: adinn, thartmann
>>  - 8387405: [lworld] is_always_flat_in_array should be always false
>>    
>>    Reviewed-by: thartmann
>>  - 8387686: [lworld] Update the JNI specification version for value types
>>    
>>    Reviewed-by: alanb, dsimms
>>  - 8387726: [lworld] JVMTI/JDWP/JDI docs cleanup
>>    
>>    Reviewed-by: sspitsyn, cjplummer
>>  - 8387673: [lworld] C2: clone() intrinsic does not throw 
>> CloneNotSupportedException for value classes not implementing Cloneable
>>    
>>    Reviewed-by: thartmann
>>  - 8387709: [lworld] Split Valhalla tests from tier1_compiler_3 to avoid 
>> task timeouts
>>    
>>    Reviewed-by: chagedorn
>>  - 8387350: [lworld] ObjectOutputStream.writeObject() doesn't throw 
>> InvalidClassException for Serializable instance with strict init fields
>>    
>>    Reviewed-by: alanb, jpai, thartmann
>>  - ... and 1 more: https://git.openjdk.org/jdk/compare/f1f6d35d...1b6f7c18
>
> src/hotspot/share/ci/ciArrayKlass.cpp line 63:
> 
>> 61:     return ciType::make(as_type_array_klass()->element_type());
>> 62:   } else {
>> 63:     return element_klass()->as_klass();
> 
> This change looks obsolete now that ciValueArrayKlass is gone.  Consider 
> reverting.

Right, we could revert that to have an additional assertion that it's indeed a 
`ciObjArrayKlass`, especially when removing the base method 
`ciArrayKlass::element_klass()` as suggested below. Let's address this 
separately with [JDK-8388019](https://bugs.openjdk.org/browse/JDK-8388019).

> src/hotspot/share/ci/ciArrayKlass.hpp line 62:
> 
>> 60: 
>> 61:   // The one-level type of the array elements.
>> 62:   virtual ciKlass* element_klass() { return nullptr; }
> 
> I think we can devirtualize this function now, leaving non-virtual 
> ciObjArrayKlass::element_klass and removing here from super class.  See my 
> comment in ciArrayKlass::element_type().

See comment above, addressing with 
[JDK-8388019](https://bugs.openjdk.org/browse/JDK-8388019).

> src/hotspot/share/ci/ciEnv.cpp line 493:
> 
>> 491:     if (elem_klass != nullptr && elem_klass->is_loaded()) {
>> 492:       // Now make an array for it
>> 493:       return ciArrayKlass::make(elem_klass);
> 
> This does an extra check for is_primitive_type() that is not needed.  Can we 
> revert this line?
> Suggestion:
> 
>       return ciObjArrayKlass::make_impl(elem_klass);

Addressing with [JDK-8388007](https://bugs.openjdk.org/browse/JDK-8388007).

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/31122#discussion_r3551972668
PR Review Comment: https://git.openjdk.org/jdk/pull/31122#discussion_r3551973150
PR Review Comment: https://git.openjdk.org/jdk/pull/31122#discussion_r3551974895

Reply via email to