public class HotSpotMethodHandleAccessProvider extends Object implements MethodHandleAccessProvider, HotSpotProxified
Modifier and Type | Class and Description |
---|---|
(package private) static class |
HotSpotMethodHandleAccessProvider.LazyInitialization
Lazy initialization to break class initialization cycle.
|
MethodHandleAccessProvider.IntrinsicMethod
Modifier and Type | Field and Description |
---|---|
private ConstantReflectionProvider |
constantReflection |
Constructor and Description |
---|
HotSpotMethodHandleAccessProvider(ConstantReflectionProvider constantReflection) |
Modifier and Type | Method and Description |
---|---|
static MethodHandleAccessProvider.IntrinsicMethod |
getMethodHandleIntrinsic(int intrinsicId) |
private ResolvedJavaMethod |
getTargetMethod(JavaConstant memberName)
Returns the
ResolvedJavaMethod for the vmtarget of a java.lang.invoke.MemberName. |
MethodHandleAccessProvider.IntrinsicMethod |
lookupMethodHandleIntrinsic(ResolvedJavaMethod method)
Returns the method handle method intrinsic identifier for the provided method, or
null if the method is not an intrinsic processed by this interface. |
ResolvedJavaMethod |
resolveInvokeBasicTarget(JavaConstant methodHandle,
boolean forceBytecodeGeneration)
Resolves the invocation target for an invocation of
MethodHandle.invokeBasic with the given constant receiver MethodHandle . |
ResolvedJavaMethod |
resolveLinkToTarget(JavaConstant memberName)
Resolves the invocation target for an invocation of a
MethodHandle.linkTo* method
with the given constant member name. |
private final ConstantReflectionProvider constantReflection
public HotSpotMethodHandleAccessProvider(ConstantReflectionProvider constantReflection)
public MethodHandleAccessProvider.IntrinsicMethod lookupMethodHandleIntrinsic(ResolvedJavaMethod method)
MethodHandleAccessProvider
null
if the method is not an intrinsic processed by this interface.lookupMethodHandleIntrinsic
in interface MethodHandleAccessProvider
public static MethodHandleAccessProvider.IntrinsicMethod getMethodHandleIntrinsic(int intrinsicId)
public ResolvedJavaMethod resolveInvokeBasicTarget(JavaConstant methodHandle, boolean forceBytecodeGeneration)
MethodHandleAccessProvider
MethodHandle.invokeBasic
with the given constant receiver MethodHandle
. Returns
null
if the invocation target is not available at this time.
The first invocations of a method handle can use an interpreter to lookup the actual invoked method; frequently executed method handles can use Java bytecode generation to avoid the interpreter overhead. If the parameter forceBytecodeGeneration is set to true, the VM should try to generate bytecodes before this method returns.
resolveInvokeBasicTarget
in interface MethodHandleAccessProvider
public ResolvedJavaMethod resolveLinkToTarget(JavaConstant memberName)
MethodHandleAccessProvider
MethodHandle.linkTo*
method
with the given constant member name. The member name is the last parameter of the
linkTo*
method. Returns null
if the invocation target is not available at
this time.resolveLinkToTarget
in interface MethodHandleAccessProvider
private ResolvedJavaMethod getTargetMethod(JavaConstant memberName)
ResolvedJavaMethod
for the vmtarget of a java.lang.invoke.MemberName.