-
Notifications
You must be signed in to change notification settings - Fork 722
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
Use the right symbol for constant string placeholder #11092
Conversation
@liqunl my understanding was that other values besides MHs can be stored in these "string" constants as the Unsafe.defineAnonymousClass allows any object to be stored there. The bytecode pattern will be something like:
We want to be careful to not rely on the resolved value only being a string or a MH. @fengxue-IS / @babsingh to confirm |
for Java 8-14 where the InvokerBytecodeGenerator uses cp patching to reference dynamic object, the constant string placeholder can contain non-MH objects. |
In JDK15+, An instance of
Sample generated bytecodes to access
|
@DanHeidinga @fengxue-IS @babsingh Thanks for pointing that out. Will change the code to load any objects. |
e62af43
to
066e81e
Compare
Depends on eclipse-omr/omr#5664 |
299e801
to
d19110c
Compare
@andrewcraik @DanHeidinga May I ask for your review? |
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 non-JITServer parts look good to me
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.
Overall LGTM,
please increment MINOR_NUMBER
in JITServer::CommunicationStream
and update message numbers.
This commit results in 2 additional messages when a string is unresolved but if the increase is significant we'll deal with it later. |
d19110c
to
68e95b2
Compare
It's 2 additional messages when the cp entry is resolved. I can fix it by checking if the symref is first created, only do the check if symref is first created. |
|
757022d
to
d16b22f
Compare
Looking at a failure in my pbuild after updating the commits, WIP the PR now. |
d16b22f
to
d0c0b2d
Compare
Fixed the pbuild failure. @dmitry-ten @andrewcraik Could you take a look again? |
Please increment the minor number here: |
Add function getObjectClassAt to get class of an object stored at an address. Signed-off-by: Liqun Liu <liqunl@ca.ibm.com>
Constant string can be used as a placeholder and be patched to other object. Set the flag on the symbol according to the actual object type. Signed-off-by: Liqun Liu <liqunl@ca.ibm.com>
d0c0b2d
to
ba1bec5
Compare
@dmitry-ten Fixed the minor number |
LGTM |
@DanHeidinga I have made changes to support any type of patched objects, could you review again? |
Design wise, this seems right to me. I'll defer to @andrewcraik's already provided review. |
LGTM |
@DanHeidinga Andrew has approved this PR, may I ask you to help launching the PR build and merge if it passes? |
Jenkins test sanity all jdk11 |
Builds have passed and given @andrewcraik's approval above, merging |
Constant string can be used as a placeholder and be patched to other
object. Set the flag on the symbol according to the actual object type.
Signed-off-by: Liqun Liu liqunl@ca.ibm.com