[lworld] RFR: 8370880: [lworld] Split ciObjArrayKlass into ciRefArrayKlass and ciFlatArrayKlass [v2]
Quan Anh Mai
qamai at openjdk.org
Mon Nov 17 14:45:15 UTC 2025
On Mon, 17 Nov 2025 14:38:02 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:
>> Hi,
>>
>> This PR splits `ciObjArrayKlass` into `ciRefArrayKlass` and `ciFlatArrayKlass`, aligns the hierarchy with the corresponding types of the VM.
>>
>> I also had to fix `GraphKit::cast_to_flat_array`, currently it incorrectly assumes that the cast is to an exact type, splitting into `cast_to_flat_array` and `cast_to_flat_array_exact` seems to make it clearer.
>>
>> Please kindly review, thanks a lot.
>
> Quan Anh Mai has updated the pull request incrementally with one additional commit since the last revision:
>
> can only infer klass if exact
Thanks for your testing. Unfortunately, the issue cuts pretty deep. We have multiple potential inconsistencies when dealing with `_klass` such as when trying to obtain a flat `TypeAryPtr` from a non-flat `TypeAryPtr`. I think it can be addressed as follow-up issues. To fix the immediate crash, I choose to fix a particular issue, that is we can only compute the `_klass` if we have `klass_is_exact`.
-------------
PR Comment: https://git.openjdk.org/valhalla/pull/1739#issuecomment-3542204909
More information about the valhalla-dev
mailing list