RFR: 8336856: Optimize String Concat

Chen Liang liach at openjdk.org
Tue Jul 23 13:42:36 UTC 2024


On Tue, 23 Jul 2024 09:02:48 GMT, Shaojin Wen <duke at 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


More information about the core-libs-dev mailing list