public class HotSpotMetaAccessProvider extends Object implements MetaAccessProvider, HotSpotProxified
MetaAccessProvider.| Modifier and Type | Field and Description |
|---|---|
private Field |
reflectionConstructorSlot
Field object of Constructor.slot. |
private Field |
reflectionMethodSlot
Field object of Method.slot. |
protected HotSpotJVMCIRuntimeProvider |
runtime |
| Constructor and Description |
|---|
HotSpotMetaAccessProvider(HotSpotJVMCIRuntimeProvider runtime) |
| Modifier and Type | Method and Description |
|---|---|
static int |
computeArrayAllocationSize(int length,
int alignment,
int headerSize,
int log2ElementSize)
Computes the size of the memory chunk allocated for an array.
|
int |
convertDeoptAction(DeoptimizationAction action) |
DeoptimizationAction |
convertDeoptAction(int action) |
int |
convertDeoptReason(DeoptimizationReason reason) |
DeoptimizationReason |
convertDeoptReason(int reason) |
int |
decodeDebugId(JavaConstant constant) |
DeoptimizationAction |
decodeDeoptAction(JavaConstant constant) |
DeoptimizationReason |
decodeDeoptReason(JavaConstant constant) |
JavaConstant |
encodeDeoptActionAndReason(DeoptimizationAction action,
DeoptimizationReason reason,
int debugId)
Encodes a deoptimization action and a deoptimization reason in an integer value.
|
long |
getMemorySize(JavaConstant constant)
Returns the number of bytes occupied by this constant value or constant object.
|
private static Field |
getReflectionSlotField(Class<?> reflectionClass) |
private static int |
intMaskRight(int n) |
ResolvedJavaField |
lookupJavaField(Field reflectionField)
Provides the
ResolvedJavaField for a Field obtained via reflection. |
ResolvedJavaMethod |
lookupJavaMethod(Executable reflectionMethod)
|
ResolvedJavaType |
lookupJavaType(Class<?> clazz)
Returns the resolved Java type representing a given Java class.
|
HotSpotResolvedObjectType |
lookupJavaType(JavaConstant constant)
Returns the resolved Java type of the given
JavaConstant object. |
Signature |
parseMethodDescriptor(String signature)
Parses a method
descriptor into a
Signature. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitlookupJavaTypesprotected final HotSpotJVMCIRuntimeProvider runtime
private Field reflectionMethodSlot
Field object of Method.slot.private Field reflectionConstructorSlot
Field object of Constructor.slot.public HotSpotMetaAccessProvider(HotSpotJVMCIRuntimeProvider runtime)
public ResolvedJavaType lookupJavaType(Class<?> clazz)
MetaAccessProviderlookupJavaType in interface MetaAccessProviderclazz - the Java class objectpublic HotSpotResolvedObjectType lookupJavaType(JavaConstant constant)
MetaAccessProviderJavaConstant object.lookupJavaType in interface MetaAccessProvidernull if constant.isNull() || !constant.kind.isObject()public Signature parseMethodDescriptor(String signature)
MetaAccessProviderSignature. The behavior of this method is undefined if the
method descriptor is not well formed.parseMethodDescriptor in interface MetaAccessProviderprivate static Field getReflectionSlotField(Class<?> reflectionClass)
public ResolvedJavaMethod lookupJavaMethod(Executable reflectionMethod)
MetaAccessProviderlookupJavaMethod in interface MetaAccessProviderpublic ResolvedJavaField lookupJavaField(Field reflectionField)
MetaAccessProviderResolvedJavaField for a Field obtained via reflection.lookupJavaField in interface MetaAccessProviderprivate static int intMaskRight(int n)
public JavaConstant encodeDeoptActionAndReason(DeoptimizationAction action, DeoptimizationReason reason, int debugId)
MetaAccessProviderencodeDeoptActionAndReason in interface MetaAccessProviderdebugId - an integer that can be used to track the origin of a deoptimization at
runtime. There is no guarantee that the runtime will use this value. The runtime
may even keep fewer than 32 bits.public DeoptimizationReason decodeDeoptReason(JavaConstant constant)
decodeDeoptReason in interface MetaAccessProviderpublic DeoptimizationAction decodeDeoptAction(JavaConstant constant)
decodeDeoptAction in interface MetaAccessProviderpublic int decodeDebugId(JavaConstant constant)
decodeDebugId in interface MetaAccessProviderpublic int convertDeoptAction(DeoptimizationAction action)
public DeoptimizationAction convertDeoptAction(int action)
public int convertDeoptReason(DeoptimizationReason reason)
public DeoptimizationReason convertDeoptReason(int reason)
public long getMemorySize(JavaConstant constant)
MetaAccessProvidergetMemorySize in interface MetaAccessProviderconstant - the constant whose bytes should be measuredpublic static int computeArrayAllocationSize(int length, int alignment, int headerSize, int log2ElementSize)
length - the number of elements in the arrayalignment - the object alignment requirementheaderSize - the size of the array headerlog2ElementSize - log2 of the size of an element in the array