-
Notifications
You must be signed in to change notification settings - Fork 738
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
Update resolveConstantDynamic Error wrapping #2984
Conversation
@JasonFengJ9 can you please take a look? |
This change affects all |
This only affects Java 11 as cp entries that call |
Added an
Run against latest
This shows that modification to |
@JasonFengJ9 this PR is modifying |
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.
Sorry, I mis-read a bit.
But, since j.l.i.MethodHandle.resolveConstantDynamic()
is for Java 11
only, it should not present in Java 8
, created #2986 .
This PR looks good.
@DanHeidinga please take a look, thanks |
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.
Invokedynamic resolution needs the same change in JDK11.
This is a change in behaviour for indy pre-jdk11.
staticArgs[staticArgIndex] = cpEntry; | ||
} | ||
|
||
try { |
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.
Can you add a comment to this try block that references the appropriate part of the JVMS so that we can double check this behaviour in the future? It makes it much easier to figure out than trying to discern the subtle difference from the code
ce6bf12
to
e54816c
Compare
updated with reference to JVMS, also added a check so exception instance of Error class is not wrapped by extra layer of BootstrapMethodError.
|
e54816c
to
09e9cc1
Compare
jcl/src/java.base/share/classes/java/lang/invoke/MethodHandle.java
Outdated
Show resolved
Hide resolved
09e9cc1
to
07aacfc
Compare
- only wrap bootstrapMethod invoke & validation with try/catch - wrap non-Error exception with BootstrapMethodError Signed-off-by: Jack Lu <Jack.S.Lu@ibm.com>
07aacfc
to
7cac939
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 as the indy update will be covered under a separate issue
Jenkins test sanity xlinux jdk11 |
This is required by JVMS JDK11 Section 5.4.3.6 'Dynamically-Computed Constant and Call Site Resolution'
Signed-off-by: Jack Lu Jack.S.Lu@ibm.com