mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8332457: Examine startup overheads from JDK-8294961
8229959: Convert proxy class to use constant dynamic Reviewed-by: liach, redestad
This commit is contained in:
parent
326dbb1b13
commit
d85b0ca5cd
9 changed files with 304 additions and 327 deletions
|
@ -24,6 +24,7 @@
|
|||
*/
|
||||
package java.lang.constant;
|
||||
|
||||
import jdk.internal.constant.MethodTypeDescImpl;
|
||||
import jdk.internal.constant.PrimitiveClassDescImpl;
|
||||
import jdk.internal.constant.ReferenceClassDescImpl;
|
||||
|
||||
|
@ -349,8 +350,11 @@ public final class ConstantDescs {
|
|||
String name,
|
||||
ClassDesc returnType,
|
||||
ClassDesc... paramTypes) {
|
||||
return MethodHandleDesc.ofMethod(STATIC, owner, name, MethodTypeDesc.of(returnType, paramTypes)
|
||||
.insertParameterTypes(0, INDY_BOOTSTRAP_ARGS));
|
||||
int prefixLen = INDY_BOOTSTRAP_ARGS.length;
|
||||
ClassDesc[] fullParamTypes = new ClassDesc[paramTypes.length + prefixLen];
|
||||
System.arraycopy(INDY_BOOTSTRAP_ARGS, 0, fullParamTypes, 0, prefixLen);
|
||||
System.arraycopy(paramTypes, 0, fullParamTypes, prefixLen, paramTypes.length);
|
||||
return MethodHandleDesc.ofMethod(STATIC, owner, name, MethodTypeDescImpl.ofTrusted(returnType, fullParamTypes));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -370,7 +374,10 @@ public final class ConstantDescs {
|
|||
String name,
|
||||
ClassDesc returnType,
|
||||
ClassDesc... paramTypes) {
|
||||
return MethodHandleDesc.ofMethod(STATIC, owner, name, MethodTypeDesc.of(returnType, paramTypes)
|
||||
.insertParameterTypes(0, CONDY_BOOTSTRAP_ARGS));
|
||||
int prefixLen = CONDY_BOOTSTRAP_ARGS.length;
|
||||
ClassDesc[] fullParamTypes = new ClassDesc[paramTypes.length + prefixLen];
|
||||
System.arraycopy(CONDY_BOOTSTRAP_ARGS, 0, fullParamTypes, 0, prefixLen);
|
||||
System.arraycopy(paramTypes, 0, fullParamTypes, prefixLen, paramTypes.length);
|
||||
return MethodHandleDesc.ofMethod(STATIC, owner, name, MethodTypeDescImpl.ofTrusted(returnType, fullParamTypes));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue