mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8195650: Method references to VarHandle accessors
Reviewed-by: jrose
This commit is contained in:
parent
f44956330d
commit
14651d9e02
6 changed files with 190 additions and 13 deletions
|
@ -2452,12 +2452,18 @@ return mh1;
|
|||
checkSymbolicClass(defc);
|
||||
return mh;
|
||||
}
|
||||
// Treat MethodHandle.invoke and invokeExact specially.
|
||||
if (defc == MethodHandle.class && refKind == REF_invokeVirtual) {
|
||||
// Treat MethodHandle.invoke and invokeExact specially.
|
||||
mh = findVirtualForMH(member.getName(), member.getMethodType());
|
||||
if (mh != null) {
|
||||
return mh;
|
||||
}
|
||||
} else if (defc == VarHandle.class && refKind == REF_invokeVirtual) {
|
||||
// Treat signature-polymorphic methods on VarHandle specially.
|
||||
mh = findVirtualForVH(member.getName(), member.getMethodType());
|
||||
if (mh != null) {
|
||||
return mh;
|
||||
}
|
||||
}
|
||||
MemberName resolved = resolveOrFail(refKind, member);
|
||||
mh = getDirectMethodForConstant(refKind, defc, resolved);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue