RFR: JDK-8274848: LambdaMetaFactory::metafactory on REF_invokeSpecial impl method has incorrect behavior [v3]
Mandy Chung
mchung at openjdk.java.net
Wed Oct 27 23:34:44 UTC 2021
> 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 use `REF_invokeVirtual` or `REF_invokeInterface`. In order to support the old classes running on the new runtime, LMF implementation adjusts the reference kind from `REF_invokeSpecial` to `REF_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.
Mandy Chung has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains five additional commits since the last revision:
- Update test to test LMF with no dependency on javac behavior
- Merge branch 'master' of https://github.com/openjdk/jdk into invokespecial
- Merge branch 'invokespecial' of https://github.com/mlchung/jdk into invokespecial
- remove filelist which was added accidentally
- JDK-8274848: LambdaMetaFactory::metafactory on REF_invokeSpecial impl method has incorrect behavior
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/5901/files
- new: https://git.openjdk.java.net/jdk/pull/5901/files/cfdd036e..c44a5910
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5901&range=02
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5901&range=01-02
Stats: 29565 lines in 721 files changed: 21974 ins; 5102 del; 2489 mod
Patch: https://git.openjdk.java.net/jdk/pull/5901.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/5901/head:pull/5901
PR: https://git.openjdk.java.net/jdk/pull/5901
More information about the core-libs-dev
mailing list