-
Notifications
You must be signed in to change notification settings - Fork 721
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
Add API getDefaultValueSlotAddress #15118
Add API getDefaultValueSlotAddress #15118
Conversation
This change depends on |
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.
Could you please update the MINOR_NUMBER as well in CommunicationStream.hpp ?
Also, is the value returned by vm->internalVMFunctions->getDefaultValueSlotAddress(j9class)
immutable for a class? If it cannot change, we can cache it per class.
Just so we're clear: OMR 6530 can merge on its own, can't it? Or do you require a coordinated merge? |
It's immutable. I'll cache it per class |
eclipse-omr/omr#6530 should be merged first on its own. No coordinated merge is required |
There are two more dependencies for this PR |
@mpirvu Sorry while I'm updating the code to cache the value, I realized that caching might not work because flattenedClassCache->defaultValue is not initialized until the class is initialized. When |
There is at least one other place in the code where we have a similar issue. I'll try to find that example. |
The example I was referring to above is: |
I see that the code in |
Thanks @mpirvu! I'll update the code to retrieve When class info is cached, the class might not have been initialized and the
|
b6a7e3a
to
8e025a6
Compare
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.
LGTM
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, Annabelle. I think this looks good overall. Just one question about whether setCanCGandReturn
should be getting set on the default value symbol reference.
8e025a6
to
4a3eb12
Compare
Change the status to |
@hzongaro @mpirvu Just a heads up. I'm planning to use this PR to only submit the first commit "Add API getDefaultValueSlotAddress". The reason is that I have found that the other two commits require more factoring and AOT implementation which will require OMR change as well. I'll put them in another PR when it's ready. I'll clean up the branch used in this PR and push another commit shortly. |
`getDefaultValueSlotAddress()` returns the reference to the address of the default value instance for a value class. Signed-off-by: Annabelle Huo <Annabelle.Huo@ibm.com>
4a3eb12
to
bf552d6
Compare
@hzongaro @mpirvu As mentioned on the above, I've cleaned up this branch to include only the first commit that adds the classEnv API |
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 the changes look good. Thanks!
Marius @mpirvu, I just thought I'd follow up - do you have any further comments? |
I see that the JITServer related files have not been modified since my last review, so I ok with the changes |
Jenkins test sanity all jdk17 |
Jenkins test sanity xlinuxval jdknext |
getDefaultValueSlotAddress()
returns the reference to the address of the default value instance for a value class.[edited]
If the class is initialized, devalue value instance for the class is allocated. When generatingaconst_init
, we can load from the default value slot.- [x] Depends on eclipse-omr/omr#6530