mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8285633: Take better advantage of generic MethodType cache
Reviewed-by: jvernee
This commit is contained in:
parent
5b42747ba1
commit
6c79671e50
8 changed files with 118 additions and 23 deletions
|
@ -393,7 +393,7 @@ class MethodHandleNatives {
|
|||
* The JVM wants a pointer to a MethodType. Oblige it by finding or creating one.
|
||||
*/
|
||||
static MethodType findMethodHandleType(Class<?> rtype, Class<?>[] ptypes) {
|
||||
return MethodType.makeImpl(rtype, ptypes, true);
|
||||
return MethodType.methodType(rtype, ptypes, true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -561,7 +561,7 @@ class MethodHandleNatives {
|
|||
}
|
||||
// Access descriptor at end
|
||||
guardParams[guardParams.length - 1] = VarHandle.AccessDescriptor.class;
|
||||
MethodType guardType = MethodType.makeImpl(guardReturnType, guardParams, true);
|
||||
MethodType guardType = MethodType.methodType(guardReturnType, guardParams, true);
|
||||
|
||||
MemberName linker = new MemberName(
|
||||
VarHandleGuards.class, getVarHandleGuardMethodName(guardType),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue