mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8264288: Performance issue with MethodHandle.asCollector
Reviewed-by: jrose, vlivanov
This commit is contained in:
parent
920189918e
commit
b7baca7f32
10 changed files with 197 additions and 358 deletions
|
@ -5731,14 +5731,7 @@ assertEquals("[top, [[up, down, strange], charm], bottom]",
|
|||
MethodType newType = collectArgumentsChecks(target, pos, filter);
|
||||
MethodType collectorType = filter.type();
|
||||
BoundMethodHandle result = target.rebind();
|
||||
LambdaForm lform;
|
||||
if (collectorType.returnType().isArray() && filter.intrinsicName() == Intrinsic.NEW_ARRAY) {
|
||||
lform = result.editor().collectArgumentArrayForm(1 + pos, filter);
|
||||
if (lform != null) {
|
||||
return result.copyWith(newType, lform);
|
||||
}
|
||||
}
|
||||
lform = result.editor().collectArgumentsForm(1 + pos, collectorType.basicType());
|
||||
LambdaForm lform = result.editor().collectArgumentsForm(1 + pos, collectorType.basicType());
|
||||
return result.copyWithExtendL(newType, lform, filter);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue