Top Description Fields Constructors Methods
jdk.vm.ci.hotspot

public Class HotSpotMetaAccessProvider

extends Object
implements MetaAccessProvider
Class Inheritance
All Implemented Interfaces
jdk.vm.ci.meta.MetaAccessProvider
Imports
java.lang.reflect.Executable, .Field, .Modifier, java.util.Objects, jdk.vm.ci.code.CodeUtil, jdk.vm.ci.common.JVMCIError, jdk.vm.ci.meta.DeoptimizationAction, .DeoptimizationReason, .JavaConstant, .JavaKind, .MetaAccessProvider, .ResolvedJavaField, .ResolvedJavaMethod, .ResolvedJavaType, .Signature, .SpeculationLog, .SpeculationLog.NoSpeculationReason, .SpeculationLog.Speculation

HotSpot implementation of MetaAccessProvider.

Field Summary

Modifier and TypeField and Description
protected final HotSpotJVMCIRuntime

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the size of the memory chunk
computeArrayAllocationSize
(int
the number of elements in the array
length
,
int
the size of the array header
headerSize
,
int
log2 of the size of an element in the array
log2ElementSize
)

Computes the size of the memory chunk allocated for an array.

public int
public DeoptimizationAction
convertDeoptAction(int action)

public int
public DeoptimizationReason
convertDeoptReason(int reason)

public int
public DeoptimizationAction
public DeoptimizationReason
public SpeculationLog.Speculation
decodeSpeculation(JavaConstant constant, SpeculationLog speculationLog)

Implements jdk.vm.ci.meta.MetaAccessProvider.decodeSpeculation.

Decodes constant back to a Speculation object.

public JavaConstant
encodeDeoptActionAndReason(DeoptimizationAction action, DeoptimizationReason reason, int
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.
debugId
)

Implements jdk.vm.ci.meta.MetaAccessProvider.encodeDeoptActionAndReason.

Encodes a deoptimization action and a deoptimization reason in an integer value.

public JavaConstant
encodeSpeculation(SpeculationLog.Speculation speculation)

Implements jdk.vm.ci.meta.MetaAccessProvider.encodeSpeculation.

Gets a constant that denotes speculation.

public int
public int
public long
getMemorySize(JavaConstant
the constant whose bytes should be measured
constant
)

Implements jdk.vm.ci.meta.MetaAccessProvider.getMemorySize.

Returns the number of bytes occupied by this constant value or constant object.

private static int
intMaskRight(int n)

public ResolvedJavaField
lookupJavaField(Field reflectionField)

Implements jdk.vm.ci.meta.MetaAccessProvider.lookupJavaField.

Provides the ResolvedJavaField for a Field obtained via reflection.

public ResolvedJavaMethod
lookupJavaMethod(Executable reflectionMethod)

Implements jdk.vm.ci.meta.MetaAccessProvider.lookupJavaMethod.

Provides the ResolvedJavaMethod for a Method or Constructor obtained via reflection.

public ResolvedJavaType
lookupJavaType(Class<?>
the Java class object
clazz
)

Implements jdk.vm.ci.meta.MetaAccessProvider.lookupJavaType.

Returns the resolved Java type representing a given Java class.

public HotSpotResolvedObjectType
lookupJavaType(JavaConstant constant)

Implements jdk.vm.ci.meta.MetaAccessProvider.lookupJavaType.

Returns the resolved Java type of the given JavaConstant object.

public Signature
parseMethodDescriptor(String signature)

Implements jdk.vm.ci.meta.MetaAccessProvider.parseMethodDescriptor.

Parses a method descriptor (4.3.3) into a Signature.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

runtimeback to summary
protected final HotSpotJVMCIRuntime runtime

Constructor Detail

HotSpotMetaAccessProviderback to summary
public HotSpotMetaAccessProvider(HotSpotJVMCIRuntime runtime)

Method Detail

computeArrayAllocationSizeback to summary
public int computeArrayAllocationSize(int length, int headerSize, int log2ElementSize)

Computes the size of the memory chunk allocated for an array. This size accounts for the array header size, body size and any padding after the last element to satisfy object alignment requirements.

Parameters
length:int

the number of elements in the array

headerSize:int

the size of the array header

log2ElementSize:int

log2 of the size of an element in the array

Returns:int

the size of the memory chunk

convertDeoptActionback to summary
public int convertDeoptAction(DeoptimizationAction action)
convertDeoptActionback to summary
public DeoptimizationAction convertDeoptAction(int action)
convertDeoptReasonback to summary
public int convertDeoptReason(DeoptimizationReason reason)
convertDeoptReasonback to summary
public DeoptimizationReason convertDeoptReason(int reason)
decodeDebugIdback to summary
public int decodeDebugId(JavaConstant constant)

Implements jdk.vm.ci.meta.MetaAccessProvider.decodeDebugId.

Annotations
@Override
decodeDeoptActionback to summary
public DeoptimizationAction decodeDeoptAction(JavaConstant constant)

Implements jdk.vm.ci.meta.MetaAccessProvider.decodeDeoptAction.

Annotations
@Override
decodeDeoptReasonback to summary
public DeoptimizationReason decodeDeoptReason(JavaConstant constant)

Implements jdk.vm.ci.meta.MetaAccessProvider.decodeDeoptReason.

Annotations
@Override
decodeSpeculationback to summary
public SpeculationLog.Speculation decodeSpeculation(JavaConstant constant, SpeculationLog speculationLog)

Implements jdk.vm.ci.meta.MetaAccessProvider.decodeSpeculation.

Doc from jdk.vm.ci.meta.MetaAccessProvider.decodeSpeculation.

Decodes constant back to a Speculation object.

Annotations
@Override
encodeDeoptActionAndReasonback to summary
public JavaConstant encodeDeoptActionAndReason(DeoptimizationAction action, DeoptimizationReason reason, int debugId)

Implements jdk.vm.ci.meta.MetaAccessProvider.encodeDeoptActionAndReason.

Doc from jdk.vm.ci.meta.MetaAccessProvider.encodeDeoptActionAndReason.

Encodes a deoptimization action and a deoptimization reason in an integer value.

Parameters
debugId:int

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.

Returns:JavaConstant

the encoded value as an integer

Annotations
@Override
encodeSpeculationback to summary
public JavaConstant encodeSpeculation(SpeculationLog.Speculation speculation)

Implements jdk.vm.ci.meta.MetaAccessProvider.encodeSpeculation.

Doc from jdk.vm.ci.meta.MetaAccessProvider.encodeSpeculation.

Gets a constant that denotes speculation. The constant can passed to the deoptimization handler (e.g., through a thread local) to indicate a failed speculation.

Annotations
@Override
getArrayBaseOffsetback to summary
public int getArrayBaseOffset(JavaKind kind)

Implements jdk.vm.ci.meta.MetaAccessProvider.getArrayBaseOffset.

Annotations
@Override
getArrayIndexScaleback to summary
public int getArrayIndexScale(JavaKind kind)

Implements jdk.vm.ci.meta.MetaAccessProvider.getArrayIndexScale.

Annotations
@Override
getMemorySizeback to summary
public long getMemorySize(JavaConstant constant)

Implements jdk.vm.ci.meta.MetaAccessProvider.getMemorySize.

Doc from jdk.vm.ci.meta.MetaAccessProvider.getMemorySize.

Returns the number of bytes occupied by this constant value or constant object.

Parameters
constant:JavaConstant

the constant whose bytes should be measured

Returns:long

the number of bytes occupied by this constant

Annotations
@Override
intMaskRightback to summary
private static int intMaskRight(int n)
lookupJavaFieldback to summary
public ResolvedJavaField lookupJavaField(Field reflectionField)

Implements jdk.vm.ci.meta.MetaAccessProvider.lookupJavaField.

Doc from jdk.vm.ci.meta.MetaAccessProvider.lookupJavaField.

Provides the ResolvedJavaField for a Field obtained via reflection.

Annotations
@Override
lookupJavaMethodback to summary
public ResolvedJavaMethod lookupJavaMethod(Executable reflectionMethod)

Implements jdk.vm.ci.meta.MetaAccessProvider.lookupJavaMethod.

Doc from jdk.vm.ci.meta.MetaAccessProvider.lookupJavaMethod.

Provides the ResolvedJavaMethod for a Method or Constructor obtained via reflection.

Annotations
@Override
lookupJavaTypeback to summary
public ResolvedJavaType lookupJavaType(Class<?> clazz)

Implements jdk.vm.ci.meta.MetaAccessProvider.lookupJavaType.

Doc from jdk.vm.ci.meta.MetaAccessProvider.lookupJavaType.

Returns the resolved Java type representing a given Java class.

Parameters
clazz:Class<?>

the Java class object

Returns:ResolvedJavaType

the resolved Java type object

Annotations
@Override
lookupJavaTypeback to summary
public HotSpotResolvedObjectType lookupJavaType(JavaConstant constant)

Implements jdk.vm.ci.meta.MetaAccessProvider.lookupJavaType.

Doc from jdk.vm.ci.meta.MetaAccessProvider.lookupJavaType.

Returns the resolved Java type of the given JavaConstant object.

Returns:HotSpotResolvedObjectType

null if constant.isNull() || !constant.kind.isObject()

Annotations
@Override
parseMethodDescriptorback to summary
public Signature parseMethodDescriptor(String signature)

Implements jdk.vm.ci.meta.MetaAccessProvider.parseMethodDescriptor.

Doc from jdk.vm.ci.meta.MetaAccessProvider.parseMethodDescriptor.

Parses a method descriptor (4.3.3) into a Signature.

Annotations
@Override