RFR: 8277634: Incorrect method name in invokedynamic

Jim Laskey jlaskey at openjdk.java.net
Mon Dec 6 10:52:17 UTC 2021


On Mon, 6 Dec 2021 10:36:39 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:

> 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.

Marked as reviewed by jlaskey (Reviewer).

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

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


More information about the compiler-dev mailing list