RFR: 8378086: [lworld] duplication between ObjArrayKlass and refined classes

Stefan Karlsson stefank at openjdk.org
Tue Feb 17 12:20:33 UTC 2026


I have a bunch of patches to remove some code duplication, redundant setting of fields, unneeded dispatch code.

I've tested this with tier1-3.

I'm opening this up as one PR, depending on #2033, but it could be split up into multiple dependent PRs. It could be good to look at each commit individually when making a first pass of over this PR.

I'll add a guide to the individual commits as a comment after the summary.

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

Depends on: https://git.openjdk.org/valhalla/pull/2033

Commit messages:
 - Add temporary assert
 - Restore ObjArrayKlass private
 - Remove create_element_klass_array_name duplication
 - Remove ObjArrayKlass::oop_verify_on implementation
 - Remove ObjArrayKlass::oop_size
 - Remove ObjArrayKlass::copy_array
 - Fix incorrect reference to RefArrayKlass::
 - Deduplicate array klass code

Changes: https://git.openjdk.org/valhalla/pull/2117/files
  Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=2117&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8378086
  Stats: 256 lines in 12 files changed: 48 ins; 165 del; 43 mod
  Patch: https://git.openjdk.org/valhalla/pull/2117.diff
  Fetch: git fetch https://git.openjdk.org/valhalla.git pull/2117/head:pull/2117

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


More information about the valhalla-dev mailing list