-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8372098: Move AccessFlags to InstanceKlass #28371
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
base: master
Are you sure you want to change the base?
Conversation
…ags so don't look for them there.
|
👋 Welcome back coleenp! A progress list of the required criteria for merging this PR into |
|
❗ This change is not yet ready to be integrated. |
|
@coleenp The following labels will be automatically applied to this pull request:
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. |
| } | ||
|
|
||
| // Check constant pool method consistency | ||
| InstanceKlass* callee = InstanceKlass::cast(k); |
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.
I know a MethodRef can be [I, clone, ()Ljava/lang/Object; for intArray.clone() Java calls translated by javac. I wonder if this new code would break for such an array callee class.
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.
At one point, I removed is_interface() from class Klass, but then restored it because dependencies uses this a lot and has many Klass parameter types, instead of InstanceKlass. I'll revert this change, but I'm curious why none of the tests failed with this change.
Webrevs
|
| interface_index, CHECK); | ||
| if (cp->tag_at(interface_index).is_klass()) { | ||
| interf = cp->resolved_klass_at(interface_index); | ||
| interf = InstanceKlass::cast(cp->resolved_klass_at(interface_index)); |
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.
Note that a resolved CONSTANT_Class can refer to an array type, so this cast is incorrect.
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.
There are a bunch of tests that we don't have. This would be an error since Interfaces are never arrays, but that's checked later. I'll revert some of these casts (as well as try to write a test for this).
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.
I thought the cast at line 839 would have handled this. Turns out it has a !interf->is_interface() check before so this cast is problematic.
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.
There's a reason this isn't tested. The constant pool reference for JVM_CONSTANT_Class is tested to be resolved at line 814 and because it's an interface, it's not easy to be resolved by this point (unless it's a duplicate class in which case it will be an InstanceKlass). The array case goes through the else part of this and throws a ClassFormatError.
ArrayKlass doesn't set AccessFlags so don't look for them there. See CR for details.
Fixed SA and jvmci. @iwanowww Can you check that I changed C2 correctly (we talked about this in August).
Tested with tier1-4. 5-7 in progress.
Progress
Issue
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/28371/head:pull/28371$ git checkout pull/28371Update a local copy of the PR:
$ git checkout pull/28371$ git pull https://git.openjdk.org/jdk.git pull/28371/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 28371View PR using the GUI difftool:
$ git pr show -t 28371Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/28371.diff
Using Webrev
Link to Webrev Comment