private final class HotSpotConstantPool.Cache extends Object
ConstantPoolCache
. The cache needs to be lazy since the constant pool
cache is created when the methods of this class are rewritten and rewriting happens when the
class is linked.Modifier and Type | Class and Description |
---|---|
private class |
HotSpotConstantPool.Cache.Entry
Represents a
ConstantPoolCacheEntry . |
Modifier and Type | Field and Description |
---|---|
private long |
address |
Constructor and Description |
---|
Cache() |
Modifier and Type | Method and Description |
---|---|
int |
constantPoolCacheIndexToConstantPoolIndex(int index)
Maps the constant pool cache index back to a constant pool index.
|
boolean |
exists()
Returns whether a constant pool cache for this constant pool exists.
|
HotSpotConstantPool.Cache.Entry |
getEntryAt(int index)
Get the constant pool cache entry at index
index . |
private void |
queryAddress()
Queries the current value of
ConstantPool::_cache if the current address is null. |
private long address
public Cache()
private void queryAddress()
ConstantPool::_cache
if the current address is null.public boolean exists()
public HotSpotConstantPool.Cache.Entry getEntryAt(int index)
index
.index
- index of entry to returnpublic int constantPoolCacheIndexToConstantPoolIndex(int index)
ConstantPool::remap_instruction_operand_from_cache
.index
- the constant pool cache index