On Tue, 23 Jul 2024 09:02:48 GMT, Shaojin Wen <d...@openjdk.org> wrote:

> The ClassData of LambdaMetafactory has only one MethodHandle, but multiple 
> MethodHandles are needed here.

In these cases, we pass a `List.of(methodHandles)`, and call extra 
`.constantInstruction(index).invokeinterface(CD_List, "get", MTD_Object_int)` 
to retrieve them. Note that you can also replace the dynamic constant 
`BSM_CLASS_DATA` with `BSM_CLASS_DATA_AT`, but `classDataAt` uses unnecessary 
constant pool entries and is really only recommended for passing to boostrap 
method arguments.

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

PR Comment: https://git.openjdk.org/jdk/pull/20273#issuecomment-2245288491

Reply via email to