mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-27 02:30:06 +00:00
8143142: AssertionError in MethodHandleImpl
Reviewed-by: psandoz, vlivanov
This commit is contained in:
parent
ff9d178e96
commit
42e4e0c06f
@ -781,7 +781,7 @@ class InvokerBytecodeGenerator {
|
||||
|
||||
static boolean isStaticallyInvocable(NamedFunction[] functions) {
|
||||
for (NamedFunction nf : functions) {
|
||||
if (!isStaticallyInvocable(nf.member)) {
|
||||
if (!isStaticallyInvocable(nf.member())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1605,19 +1605,15 @@ import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
|
||||
|
||||
static {
|
||||
try {
|
||||
NamedFunction nfs[] = {
|
||||
NF_checkSpreadArgument = new NamedFunction(MethodHandleImpl.class
|
||||
.getDeclaredMethod("checkSpreadArgument", Object.class, int.class)),
|
||||
NF_guardWithCatch = new NamedFunction(MethodHandleImpl.class
|
||||
.getDeclaredMethod("guardWithCatch", MethodHandle.class, Class.class,
|
||||
MethodHandle.class, Object[].class)),
|
||||
NF_throwException = new NamedFunction(MethodHandleImpl.class
|
||||
.getDeclaredMethod("throwException", Throwable.class)),
|
||||
NF_profileBoolean = new NamedFunction(MethodHandleImpl.class
|
||||
.getDeclaredMethod("profileBoolean", boolean.class, int[].class))
|
||||
};
|
||||
// Each nf must be statically invocable or we get tied up in our bootstraps.
|
||||
assert(InvokerBytecodeGenerator.isStaticallyInvocable(nfs));
|
||||
NF_checkSpreadArgument = new NamedFunction(MethodHandleImpl.class
|
||||
.getDeclaredMethod("checkSpreadArgument", Object.class, int.class));
|
||||
NF_guardWithCatch = new NamedFunction(MethodHandleImpl.class
|
||||
.getDeclaredMethod("guardWithCatch", MethodHandle.class, Class.class,
|
||||
MethodHandle.class, Object[].class));
|
||||
NF_throwException = new NamedFunction(MethodHandleImpl.class
|
||||
.getDeclaredMethod("throwException", Throwable.class));
|
||||
NF_profileBoolean = new NamedFunction(MethodHandleImpl.class
|
||||
.getDeclaredMethod("profileBoolean", boolean.class, int[].class));
|
||||
} catch (ReflectiveOperationException ex) {
|
||||
throw newInternalError(ex);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user