[lworld] RFR: 8355397: [lworld] Parse::array_load fails with "array can't be flat" assert [v2]

Tobias Hartmann thartmann at openjdk.org
Tue Apr 29 08:42:02 UTC 2025


On Mon, 28 Apr 2025 14:46:42 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:

>> Hi,
>> 
>> The issue here is that `InstanceKlass::flat_array` is too strict and it rejects any class that is atomic and has more than 1 field. I remove the unnecessary restrictions and rename the method to `maybe_flat_in_array` to illustrate the functionality in a clearer manner.
>> 
>> Please kindly review, thanks a lot.
>
> Quan Anh Mai has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
> 
>  - Merge branch 'lworld' into flatinarray
>  - add tests
>  - fix InstanceKlass::flat_array

Thanks for fixing this, @merykitty! Looks good to me and all tests pass.

src/hotspot/share/ci/ciMetadata.hpp line 64:

> 62:   virtual bool is_type_array_klass() const  { return false; }
> 63:   virtual bool is_wrapper() const           { return false; }
> 64:   virtual bool maybe_flat_in_array() const        { return false; }

Maybe fix the indentation here.

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

Marked as reviewed by thartmann (Committer).

PR Review: https://git.openjdk.org/valhalla/pull/1446#pullrequestreview-2802524477
PR Review Comment: https://git.openjdk.org/valhalla/pull/1446#discussion_r2065799610


More information about the valhalla-dev mailing list