-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8306697: Add method to obtain String for CONSTANT_Class_info in ClassDesc #13598
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -55,6 +55,11 @@ final class ReferenceClassDescImpl implements ClassDesc { | |
| this.descriptor = descriptor; | ||
| } | ||
|
|
||
| @Override | ||
| public String internalName() { | ||
| return isArray() ? descriptorString() : descriptorString().substring(1, descriptorString().length() - 1); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I suggest to cache the internal name to avoid repeated substring-ing with each call. |
||
| } | ||
|
|
||
| @Override | ||
| public String descriptorString() { | ||
| return descriptor; | ||
|
|
||
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.
This should have
@revised, as array descriptors are not allowed as input to this method in JDK 20.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 no guideline on using revised. Also, I don't think we will declare it revised if it starts accepting Valhalla Q-types.