-
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
Support for OpenJDK LambdaForm #9496
Conversation
af4d324
to
daa2992
Compare
@fengxue-IS ...
|
@DanHeidinga I have drafted these changes so that they can be merged. Ultimately, all the new code introduced in this pull request can be removed/disabled once the OpenJDK MethodHandles are adopted. |
A new JCL flag, OPENJDK_METHODHANDLES, is introduced to enable/disable support for OpenJDK MethodHandles. Currently, it is declared in an unused set so that it stays disabled. Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
Supporting OpenJDK LambdaForm is the next step in adopting OpenJDK MethodHandles. In this commit, few OpenJ9 classes are disabled. This enables the OpenJDK variant of those classes. The newly enabled OpenJDK classes are used to support OpenJDK LambdaForm. Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
Note: OpenJ9 VarHandle will be replaced with OpenJDK VarHandle once OpenJDK MethodHandles are adopted by OpenJ9. Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
7f3ac88
to
716b35a
Compare
@DanHeidinga Conflicts have been resolved, and IF defs have been re-added. This PR is ready to be reviewed/merged. I had removed the IF defs to adopt all the OpenJDK VarHandles across Java11+ using the OpenJ9 VarHandle class. I wanted to extend the JEP370 work, where we added support for MemoryAddressViewVarHandles, to all OpenJDK VarHandles. This will allow us to get rid of the OpenJ9 VarHandles. Some work/issues are still pending to achieve this goal. I will remove the IF defs once we are ready to consume all OpenJDK VarHandles. This work is low priority, and won't be pursued until OpenJDK MethodHandles are adopted. |
- VarHandle(VarForm ...) supported without version restriction - OpenJDK VarForm always enabled - VarHandle(VarForm ...) supported with OpenJ9 and OpenJDK MemberName - Key methods implemented in OpenJ9 MemberName to support VarHandle Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
MethodType.dropFirstParameterType not available in OpenJDK MethodType. Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
@babsingh is this still relevant? |
yes, i am waiting for someone to merge these changes. |
@gacholio can you please review these changes? these changes are for adopting OpenJDK MethodHandles. |
Why are these changes necessary? Are we not replacing the entire MH hierarchy in which case just ifdef out all of our classes. |
We still keep OpenJ9 VarHandles. Some of these changes allow OpenJ9 VarHandles to work with OpenJDK MemberName. This work was done incrementally. So, this PR was created (2 months ago) after the LambdaForm checkpoint was reached. The remaining MH hierarchy is disabled here: #10094, which was created 2 weeks ago. After this PR is merged, I will be rebasing #10094 along with a request for it to be merged. |
jenkins test sanity,extended zlinux jdk11 |
@babsingh Can you see what's wrong here? |
Only one failure was seen in Test_openjdk11_j9_extended.functional_s390x_linux_Personal:
@gacholio This failure is unrelated to my changes since it is also happening elsewhere, #10189. |
1. Add new JCL flag: OPENJDK_METHODHANDLES
A new JCL flag, OPENJDK_METHODHANDLES, is introduced to enable/disable
support for OpenJDK MethodHandles. Currently, it is declared in an
unused set so that it stays disabled.
2. Enable OpenJDK LambdaForm
Supporting OpenJDK LambdaForm is the next step in adopting OpenJDK
MethodHandles.
Few OpenJ9 classes are disabled. This enables the OpenJDK variant of
those classes. The newly enabled OpenJDK classes are used to support
OpenJDK LambdaForm.
3. Add field/method stubs to support the compilation of OpenJDK LambdaForm
4. Update enum VarHandle.AccessType to work with OpenJDK LambdaForm
Note: OpenJ9 VarHandle will be replaced with OpenJDK VarHandle once
OpenJDK MethodHandles are adopted by OpenJ9.
5. Support VarHandle(VarForm ...) constructor with OpenJDK MemberName
6. Support VarHandle with OpenJDK and OpenJ9 MethodType
MethodType.dropFirstParameterType not available in OpenJDK MethodType.
Related: #7352, #9456
Co-authored-by: Jack Lu Jack.S.Lu@ibm.com
Signed-off-by: Babneet Singh sbabneet@ca.ibm.com