On Thu, 9 Jul 2026 04:15:15 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/ciFlatArray.hpp line 34:
> 
>> 32: //
>> 33: // This class represents a flatArrayOop in the HotSpot virtual machine.
>> 34: class ciFlatArray : public ciArray {
> 
> Shouldn't this be a subclass of ciObjArray?  If not, then I think there 
> should be a comment explaining why.

Good observation. This was actually missed by 
[JDK-8370880](https://bugs.openjdk.org/browse/JDK-8370880).  The hierarchy of 
array metadata in the runtime was changed relatively late in the project by 
[JDK-8366705](https://bugs.openjdk.org/browse/JDK-8366705). 
[JDK-8370880](https://bugs.openjdk.org/browse/JDK-8370880) then implemented the 
counterpart in the CI for the Klass types but missed the Oop types. I filed 
[JDK-8388127](https://bugs.openjdk.org/browse/JDK-8388127) to fix this. I will 
add a TODO at the corresponding classes with 
[JDK-8388007](https://bugs.openjdk.org/browse/JDK-8388007).

> src/hotspot/share/ci/ciObjArray.cpp line 39:
> 
>> 37:   VM_ENTRY_MARK;
>> 38:   // The array should be a refArray, otherwise a ciFlatArray object 
>> would have been used
>> 39:   refArrayOop array = oop_cast<refArrayOop>(get_objArrayOop());
> 
> This is worth documenting in ciFlatArray as well.  Normally we would expect a 
> flat array to be "is a" object array, right?  For example:
> class ciFlatArrayKlass : public ciObjArrayKlass {
> class flatArrayOopDesc : public objArrayOopDesc {

See answer further up at `class ciFlatArray`. Will be addressed with 
[JDK-8388127](https://bugs.openjdk.org/browse/JDK-8388127) to fix this and I'll 
add a TODO with [JDK-8388007](https://bugs.openjdk.org/browse/JDK-8388007).

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

PR Review Comment: https://git.openjdk.org/jdk/pull/31122#discussion_r3569874722
PR Review Comment: https://git.openjdk.org/jdk/pull/31122#discussion_r3569875058

Reply via email to