8287442: Reduce list to array conversions in java.lang.invoke.MethodHandles

Reviewed-by: jvernee
This commit is contained in:
Claes Redestad 2022-06-08 07:18:29 +00:00
parent 5c39a36641
commit ecf00785f2
3 changed files with 43 additions and 40 deletions

View file

@ -509,7 +509,7 @@ public final class StringConcatFactory {
// assembled bottom-up, which makes the code arguably hard to read.
// Drop all remaining parameter types, leave only helper arguments:
MethodHandle mh = MethodHandles.dropArguments(newString(), 2, ptypes);
MethodHandle mh = MethodHandles.dropArgumentsTrusted(newString(), 2, ptypes);
// Calculate the initialLengthCoder value by looking at all constant values and summing up
// their lengths and adjusting the encoded coder bit if needed