mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8143211: provide bytecode intrinsics for loop and try/finally executors
Reviewed-by: psandoz, redestad, vlivanov
This commit is contained in:
parent
99921c2f0e
commit
a06c5e0f57
10 changed files with 843 additions and 297 deletions
|
@ -4233,7 +4233,7 @@ assertEquals("boojum", (String) catTrace.invokeExact("boo", "jum"));
|
|||
assert Stream.of(fstep, fpred, ffini).flatMap(List::stream).map(MethodHandle::type).map(MethodType::parameterList).
|
||||
allMatch(pl -> pl.equals(commonParameterSequence));
|
||||
|
||||
return MethodHandleImpl.makeLoop(loopReturnType, commonSuffix, commonPrefix, finit, fstep, fpred, ffini);
|
||||
return MethodHandleImpl.makeLoop(loopReturnType, commonSuffix, finit, fstep, fpred, ffini);
|
||||
}
|
||||
|
||||
private static List<MethodHandle> fillParameterTypes(List<MethodHandle> hs, final List<Class<?>> targetParams) {
|
||||
|
@ -4740,10 +4740,8 @@ assertEquals("boojum", (String) catTrace.invokeExact("boo", "jum"));
|
|||
// The cleanup parameter list (minus the leading Throwable and result parameters) must be a sublist of the
|
||||
// target parameter list.
|
||||
cleanup = dropArgumentsToMatch(cleanup, (rtype == void.class ? 1 : 2), targetParamTypes, 0);
|
||||
MethodHandle aTarget = target.asSpreader(Object[].class, target.type().parameterCount());
|
||||
MethodHandle aCleanup = cleanup.asSpreader(Object[].class, targetParamTypes.size());
|
||||
|
||||
return MethodHandleImpl.makeTryFinally(aTarget, aCleanup, rtype, targetParamTypes);
|
||||
return MethodHandleImpl.makeTryFinally(target, cleanup, rtype, targetParamTypes);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue