RFR: JDK-8274848: LambdaMetaFactory::metafactory on REF_invokeSpecial impl method has incorrect behavior [v2]

Mandy Chung mchung at openjdk.java.net
Tue Oct 12 16:21:33 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 incrementally with one additional commit since the last revision:

  remove filelist which was added accidentally

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/5901/files
  - new: https://git.openjdk.java.net/jdk/pull/5901/files/1358214d..cfdd036e

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5901&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5901&range=00-01

  Stats: 1 line in 1 file changed: 0 ins; 1 del; 0 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