-
Notifications
You must be signed in to change notification settings - Fork 118
8363846: [lworld] Make Class.isIdentityClass() non-native #1514
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
👋 Welcome back coleenp! A progress list of the required criteria for merging this PR into |
@coleenp This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 3 new commits pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the ➡️ To integrate this PR with the above commit message to the |
Webrevs
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is_identity_class seems widely used in many areas, such as C2 - do we need to verify those usages?
Good question. I did check most/attempted all of these places and added the assert in klass.hpp but since AccessFlags are in klass, it is possible to copy them from an ArrayKlass to a ciKlass and fail the is_identity check for an array. The only way to make this completely safe is to move the access flags, which I started in another repo but it's got pretty hairy since Klass and InstanceKlass are used interchangeably in some of the compiler code that I don't know very well, when I think they really mean InstanceKlass. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For new tests we use junit.
See other tests like UseValueClassTest for imports and per test annotations.
Co-authored-by: Roger Riggs <[email protected]>
Co-authored-by: Roger Riggs <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test looks good, the conditions are more complicated than is obvious because with --enable-preview new modifier bits are defined with new used.
Thanks for the updates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Look good, thanks
* @library /test/lib | ||
* @enablePreview false | ||
* @modules java.base/jdk.internal.misc | ||
* java.base/jdk.internal.value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TEST.properties is updated; we might remove these directives.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I can't merge right now with the latest to test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The redundant directives in tests are fine.
Thank you for all your help with this test, Roger and Chen. |
Going to push as commit acfb4f0.
Your commit was automatically rebased without conflicts. |
This moves isIdentityClass() implementation to Class.java, and checks within the JVM that is_identity_class() doesn't check the access flags for an ArrayKlass, since AccessFlags aren't initialized in ArrayKlasses. The AccessFlags should be moved from Klass.hpp to InstanceKlass.cpp in mainline but that's a more complicated change and has several pieces.
Added a test.
Tested with tier1 locally.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/valhalla.git pull/1514/head:pull/1514
$ git checkout pull/1514
Update a local copy of the PR:
$ git checkout pull/1514
$ git pull https://git.openjdk.org/valhalla.git pull/1514/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 1514
View PR using the GUI difftool:
$ git pr show -t 1514
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/valhalla/pull/1514.diff
Using Webrev
Link to Webrev Comment