RFR: 8277634: Incorrect method name in invokedynamic

Jan Lahoda jlahoda at openjdk.java.net
Mon Dec 6 10:45:37 UTC 2021


An indy invocation (`CONSTANT_InvokeDynamic_info`) has a `NameAndType` entry. If several indy calls would be generated with the same bootstrap method and the same type, but with different names (which AFAIK does not happen currently, but it may in the future), javac won't generate different `NameAndType` entries for different invocations, because it does not take the name into account. As a consequence, the invocations will incorrectly share the same name.

The proposed with here ensures the name is taken into account when generating the `NameAndType`, while still ensuring that e.g. the bootstrap method entries are still properly de-duplicated.

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

Commit messages:
 - Fixing test.
 - Removing unnecessary empty line.
 - Fixing test.
 - 8277634: Incorrect method name in invokedynamic

Changes: https://git.openjdk.java.net/jdk/pull/6719/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6719&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8277634
  Stats: 296 lines in 3 files changed: 295 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/6719.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/6719/head:pull/6719

PR: https://git.openjdk.java.net/jdk/pull/6719


More information about the compiler-dev mailing list