Skip to content

Conversation

coleenp
Copy link
Contributor

@coleenp coleenp commented Sep 30, 2025

This change upstreams some changes in the Valhalla repo that refactored arrays into ObjArrayKlass - that holds the Java type links (points back and forth to mirror) and RefArrayKlass which are the metadata that represents the physical layout of Java array objects in the heap. RefArrayKlass._super points to ObjArrayKlass (the java Type) so that checkcast works (except in c2 in this patch because it's broken).

There's still a significant amount of compiler work that needs to be done for this change. https://bugs.openjdk.org/browse/JDK-8366668

Not really tested. Just builds with c1.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/27576/head:pull/27576
$ git checkout pull/27576

Update a local copy of the PR:
$ git checkout pull/27576
$ git pull https://git.openjdk.org/jdk.git pull/27576/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 27576

View PR using the GUI difftool:
$ git pr show -t 27576

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/27576.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 30, 2025

👋 Welcome back coleenp! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Sep 30, 2025

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk bot added graal graal-dev@openjdk.org serviceability serviceability-dev@openjdk.org hotspot hotspot-dev@openjdk.org shenandoah shenandoah-dev@openjdk.org labels Sep 30, 2025
@openjdk
Copy link

openjdk bot commented Sep 30, 2025

@coleenp The following labels will be automatically applied to this pull request:

  • graal
  • hotspot
  • serviceability
  • shenandoah

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command.

@coleenp coleenp changed the title Ref array Upstream Array rework from Valhalla repository Sep 30, 2025
@liach
Copy link
Member

liach commented Sep 30, 2025

Should core libs port the part where array base offset/index scale etc. are now per-instance?

@coleenp
Copy link
Contributor Author

coleenp commented Oct 1, 2025

Should core libs port the part where array base offset/index scale etc. are now per-instance?

With this patch refArrayKlass and objArrayKlass have the same array base offset and index scale, so I don't know this yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
graal graal-dev@openjdk.org hotspot hotspot-dev@openjdk.org serviceability serviceability-dev@openjdk.org shenandoah shenandoah-dev@openjdk.org
Development

Successfully merging this pull request may close these issues.

2 participants