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
JDK-8274848: LambdaMetaFactory::metafactory on REF_invokeSpecial impl method has incorrect behavior #5901
Conversation
… method has incorrect behavior
|
Webrevs
|
/label remove jdk |
@AlanBateman |
Source changes look good. The test seems like way too much overhead for this small thing. Looks like a lot of the ASM code is just to verify that javac generates the test case you expect? I'd suggest invoking the LMF API directly instead, testing both private and non-private (I don't just mean this as a stylistic comment. I think it's important to decouple LMF testing from various javac behaviors for different javac versions and flags, because that's going to change. LMF has its own spec that can be tested independently.) |
That's a good idea. I updated the test and see what you think. |
|
@mlchung This change now passes all automated pre-integration checks. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 51 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.
|
Ahhh, much nicer. Thanks for updating the test. |
@dansmithcode Unknown command |
/integrate |
Going to push as commit 21da218.
Your commit was automatically rebased without conflicts. |
Classes compiled prior to the nestmate support will generate
REF_invokeSpecial
if the implementation method is a private instance method. Since a lambda proxy class is a hidden class, a nestmate of the host class, it can invoke the private implementation method but it has to useREF_invokeVirtual
orREF_invokeInterface
. In order to support the old classes running on the new runtime, LMF implementation adjusts the reference kind fromREF_invokeSpecial
toREF_invokeVirtual/REF_invokeInterface
.This PR fixes the check properly to ensure the adjustment is only made if the implementation method is private method in the host class.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/5901/head:pull/5901
$ git checkout pull/5901
Update a local copy of the PR:
$ git checkout pull/5901
$ git pull https://git.openjdk.java.net/jdk pull/5901/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 5901
View PR using the GUI difftool:
$ git pr show -t 5901
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/5901.diff