mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8287442: Reduce list to array conversions in java.lang.invoke.MethodHandles
Reviewed-by: jvernee
This commit is contained in:
parent
5c39a36641
commit
ecf00785f2
3 changed files with 43 additions and 40 deletions
|
@ -973,7 +973,7 @@ abstract class MethodHandleImpl {
|
|||
int arity = type.parameterCount();
|
||||
if (arity > 1) {
|
||||
MethodHandle mh = throwException(type.dropParameterTypes(1, arity));
|
||||
mh = MethodHandles.dropArguments(mh, 1, Arrays.copyOfRange(type.parameterArray(), 1, arity));
|
||||
mh = MethodHandles.dropArgumentsTrusted(mh, 1, Arrays.copyOfRange(type.ptypes(), 1, arity));
|
||||
return mh;
|
||||
}
|
||||
return makePairwiseConvert(getFunction(NF_throwException).resolvedHandle(), type, false, true);
|
||||
|
@ -1941,7 +1941,7 @@ abstract class MethodHandleImpl {
|
|||
*
|
||||
* @return a handle on the constructed {@code try-finally} block.
|
||||
*/
|
||||
static MethodHandle makeTryFinally(MethodHandle target, MethodHandle cleanup, Class<?> rtype, List<Class<?>> argTypes) {
|
||||
static MethodHandle makeTryFinally(MethodHandle target, MethodHandle cleanup, Class<?> rtype, Class<?>[] argTypes) {
|
||||
MethodType type = MethodType.methodType(rtype, argTypes);
|
||||
LambdaForm form = makeTryFinallyForm(type.basicType());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue