public interface VirtualizerTool
Virtualizable.| Modifier and Type | Method and Description |
|---|---|
void |
addLock(VirtualObjectNode virtualObject,
MonitorIdNode monitorId) |
void |
addNode(ValueNode node)
Adds the given node to the graph.This action will only be performed when, and if, the changes
are committed.
|
void |
createVirtualObject(VirtualObjectNode virtualObject,
ValueNode[] entryState,
List<MonitorIdNode> locks,
boolean ensureVirtualized)
Introduces a new virtual object to the current state.
|
void |
delete()
Deletes the current node.
|
ValueNode |
getAlias(ValueNode value)
Returns a VirtualObjectNode if the given value is aliased with a virtual object that is still
virtual, the materialized value of the given value is aliased with a virtual object that was
materialized, the replacement if the give value was replaced, otherwise the given value.
|
ConstantReflectionProvider |
getConstantReflectionProvider() |
boolean |
getEnsureVirtualized(VirtualObjectNode virtualObject) |
ValueNode |
getEntry(VirtualObjectNode virtualObject,
int index) |
int |
getMaximumEntryCount()
This method should be used to query the maximum size of virtualized objects before attempting
virtualization.
|
MetaAccessProvider |
getMetaAccessProvider() |
MonitorIdNode |
removeLock(VirtualObjectNode virtualObject) |
void |
replaceFirstInput(Node oldInput,
Node replacement)
Replaces an input of the current node.
|
void |
replaceWith(ValueNode value)
This method performs either
replaceWithValue(ValueNode) or
replaceWithVirtual(VirtualObjectNode), depending on the given value. |
void |
replaceWithValue(ValueNode replacement)
Deletes the current node and replaces it with the given value.
|
void |
replaceWithVirtual(VirtualObjectNode virtualObject)
Deletes the current node and replaces it with the given virtualized object.
|
void |
setEnsureVirtualized(VirtualObjectNode virtualObject,
boolean ensureVirtualized) |
void |
setVirtualEntry(VirtualObjectNode virtualObject,
int index,
ValueNode value,
boolean unsafe)
Sets the entry (field or array element) with the given index in the virtualized object.
|
MetaAccessProvider getMetaAccessProvider()
MetaAccessProvider associated with the current compilation.ConstantReflectionProvider getConstantReflectionProvider()
ConstantReflectionProvider associated with the current compilation, which
can be used to access JavaConstants.int getMaximumEntryCount()
void createVirtualObject(VirtualObjectNode virtualObject, ValueNode[] entryState, List<MonitorIdNode> locks, boolean ensureVirtualized)
virtualObject - the new virtual object.entryState - the initial state of the virtual object's fields.locks - the initial locking depths.ensureVirtualized - true if this object needs to stay virtualValueNode getAlias(ValueNode value)
replaceWithValue(ValueNode) are not immediately committed. This
method can be used to determine if a value was replaced by another one (e.g., a load field by
the loaded value).void setVirtualEntry(VirtualObjectNode virtualObject, int index, ValueNode value, boolean unsafe)
index - the index to be set.value - the new value for the given index.unsafe - if true, then mismatching value Kinds will be accepted.ValueNode getEntry(VirtualObjectNode virtualObject, int index)
void addLock(VirtualObjectNode virtualObject, MonitorIdNode monitorId)
MonitorIdNode removeLock(VirtualObjectNode virtualObject)
void setEnsureVirtualized(VirtualObjectNode virtualObject, boolean ensureVirtualized)
boolean getEnsureVirtualized(VirtualObjectNode virtualObject)
void replaceWithVirtual(VirtualObjectNode virtualObject)
virtualObject - the virtualized object that should replace the current node.void replaceWithValue(ValueNode replacement)
replacement - the value that should replace the current node.void delete()
void replaceFirstInput(Node oldInput, Node replacement)
oldInput - the old input value.replacement - the new input value.void addNode(ValueNode node)
node - the node to add.void replaceWith(ValueNode value)
replaceWithValue(ValueNode) or
replaceWithVirtual(VirtualObjectNode), depending on the given value.value - the replacement value