-
Notifications
You must be signed in to change notification settings - Fork 776
Fix J9ClassHasIdentity flag assignment #23008
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?
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 |
|---|---|---|
|
|
@@ -2406,8 +2406,8 @@ internalCreateRAMClassDone(J9VMThread *vmThread, J9ClassLoader *classLoader, J9C | |
| } | ||
| #endif /* defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES) */ | ||
| #endif /* defined(J9VM_OPT_VALHALLA_VALUE_TYPES) */ | ||
| } else if (!(J9_IS_CLASSFILE_OR_ROMCLASS_VALUETYPE_VERSION(romClass) && J9ROMCLASS_IS_INTERFACE(romClass))) { | ||
| /* All classes before value type version are identity. */ | ||
| } else if (!J9ROMCLASS_IS_VALUE(romClass) && !J9ROMCLASS_IS_INTERFACE(romClass)) { | ||
|
Contributor
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. In the original code, if Valhalla JDK is running on an older version of class file (e.g. Java 21), Have you checked the return value of |
||
| /* All classes which are not value classes and are not interfaces are identity. */ | ||
| classFlags |= J9ClassHasIdentity; | ||
| } | ||
| #if defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES) | ||
|
|
||
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 think you can remove the interface check here. J9ROMCLASS_IS_VALUE is only true when an interface flag is not set.
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.
J9ROMCLASS_IS_VALUEis false for interfaces. If I remove the interface check,J9ROMCLASS_IS_VALUEwill return false for interfaces and enters theelse ifblock and setsJ9ClassHasIdentityflag for interfaces too.