public class HotSpotMemoryAccessProviderImpl extends Object implements HotSpotMemoryAccessProvider, HotSpotProxified
MemoryAccessProvider
.Modifier and Type | Field and Description |
---|---|
protected HotSpotJVMCIRuntimeProvider |
runtime |
Constructor and Description |
---|
HotSpotMemoryAccessProviderImpl(HotSpotJVMCIRuntimeProvider runtime) |
Modifier and Type | Method and Description |
---|---|
private static Object |
asObject(Constant base) |
private static long |
asRawPointer(Constant base) |
private boolean |
isValidObjectFieldDisplacement(Constant base,
long displacement) |
Constant |
readKlassPointerConstant(Constant base,
long displacement) |
Constant |
readMethodPointerConstant(Constant base,
long displacement) |
Constant |
readNarrowKlassPointerConstant(Constant base,
long displacement,
HotSpotVMConfig.CompressEncoding encoding) |
JavaConstant |
readNarrowOopConstant(Constant base,
long displacement,
HotSpotVMConfig.CompressEncoding encoding) |
JavaConstant |
readObjectConstant(Constant base,
long displacement)
Reads a Java
Object value using a base address and a displacement. |
JavaConstant |
readPrimitiveConstant(Kind kind,
Constant baseConstant,
long initialDisplacement,
int bits)
Reads a primitive value using a base address and a displacement.
|
private Object |
readRawObject(Constant baseConstant,
long initialDisplacement,
boolean compressed) |
private static long |
readRawValue(Constant baseConstant,
long displacement,
int bits) |
JavaConstant |
readUnsafeConstant(Kind kind,
JavaConstant baseConstant,
long displacement)
Reads a value of this kind using a base address and a displacement.
|
private boolean |
verifyReadRawObject(Object expected,
Constant base,
long displacement,
boolean compressed) |
protected final HotSpotJVMCIRuntimeProvider runtime
public HotSpotMemoryAccessProviderImpl(HotSpotJVMCIRuntimeProvider runtime)
private boolean isValidObjectFieldDisplacement(Constant base, long displacement)
private static long asRawPointer(Constant base)
private static long readRawValue(Constant baseConstant, long displacement, int bits)
private boolean verifyReadRawObject(Object expected, Constant base, long displacement, boolean compressed)
private Object readRawObject(Constant baseConstant, long initialDisplacement, boolean compressed)
public JavaConstant readUnsafeConstant(Kind kind, JavaConstant baseConstant, long displacement)
MemoryAccessProvider
null
if the value is not available at this point.readUnsafeConstant
in interface MemoryAccessProvider
baseConstant
- the base address from which the value is read.displacement
- the displacement within the object in bytesJavaConstant
object, or null
if the
value cannot be read.public JavaConstant readPrimitiveConstant(Kind kind, Constant baseConstant, long initialDisplacement, int bits)
MemoryAccessProvider
readPrimitiveConstant
in interface MemoryAccessProvider
kind
- the Kind
of the returned JavaConstant
objectbaseConstant
- the base address from which the value is readinitialDisplacement
- the displacement within the object in bytesbits
- the number of bits to read from memoryJavaConstant
object of Kind
kindpublic JavaConstant readObjectConstant(Constant base, long displacement)
MemoryAccessProvider
Object
value using a base address and a displacement.readObjectConstant
in interface MemoryAccessProvider
base
- the base address from which the value is readdisplacement
- the displacement within the object in bytesConstant
objectpublic JavaConstant readNarrowOopConstant(Constant base, long displacement, HotSpotVMConfig.CompressEncoding encoding)
readNarrowOopConstant
in interface HotSpotMemoryAccessProvider
public Constant readKlassPointerConstant(Constant base, long displacement)
readKlassPointerConstant
in interface HotSpotMemoryAccessProvider
public Constant readNarrowKlassPointerConstant(Constant base, long displacement, HotSpotVMConfig.CompressEncoding encoding)
readNarrowKlassPointerConstant
in interface HotSpotMemoryAccessProvider
public Constant readMethodPointerConstant(Constant base, long displacement)
readMethodPointerConstant
in interface HotSpotMemoryAccessProvider