[lworld] RFR: 8372075: [lworld] Information about the layout of a TypeAryPtr is only available if it is exact

Quan Anh Mai qamai at openjdk.org
Tue Nov 18 11:26:07 UTC 2025


Hi,

The layout of a flat `TypeAryPtr` can only be obtained if it is exact. This small patch refactors `TypeAryPtr::flat_layout_helper` and similar methods to use `exact_klass()` instead of `klass()`, and add an additional condition for when we can compute `_field_offset` during `TypeAryPtr::add_field_offset_and_offset`. We can then remove the extra condition in `TypeAryPtr::compute_klass`.

Please leave your reviews, thanks a lot.

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

Commit messages:
 - details about the flat-ness of an array is only available for exact types

Changes: https://git.openjdk.org/valhalla/pull/1744/files
  Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1744&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8372075
  Stats: 12 lines in 1 file changed: 0 ins; 7 del; 5 mod
  Patch: https://git.openjdk.org/valhalla/pull/1744.diff
  Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1744/head:pull/1744

PR: https://git.openjdk.org/valhalla/pull/1744


More information about the valhalla-dev mailing list