Skip to content

Conversation

@fparain
Copy link
Collaborator

@fparain fparain commented Nov 18, 2025

Add some helper methods to test properties of layouts in a more reliable way.

Tested with Mach5, tier 1 to 3.

Fred


Progress

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

Issue

  • JDK-8371915: [lworld] LayoutKind enum should have helper methods (Enhancement - P4)

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 1745

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/valhalla/pull/1745.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 18, 2025

👋 Welcome back fparain! A progress list of the required criteria for merging this PR into lworld 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 Nov 18, 2025

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

@openjdk openjdk bot added the rfr Pull request is ready for review label Nov 18, 2025
@mlbridge
Copy link

mlbridge bot commented Nov 18, 2025

Webrevs

props = (ArrayKlass::ArrayProperties)(ArrayKlass::ArrayProperties::NULL_RESTRICTED | ArrayKlass::ArrayProperties::NON_ATOMIC);
break;
case LayoutKind::NULLABLE_ATOMIC_FLAT:
props = ArrayKlass::ArrayProperties::NON_ATOMIC;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does NULLABLE_ATOMIC_FLAT produce NON_ATOMIC? Something, maybe just naming?, seems off here.

I know this is a refactoring of existing code and so has the same meaning but it doesn't make sense to me

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!
I've copied/pasted this code when refactoring without verifying it.
It doesn't make sense to me either.
For LayoutKind::NULLABLE_ATOMIC_FLAT the method should return ArrayKlass::ArrayProperties::DEFAULT.
Let me fix this and run some tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

2 participants