public interface VirtualizerTool extends CoreProviders
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.
|
boolean |
canVirtualizeLargeByteArrayUnsafeAccess()
Returns whether deoptimization can recover from virtualizing large unsafe accesses to a byte
array.
|
void |
createVirtualObject(VirtualObjectNode virtualObject,
ValueNode[] entryState,
List<MonitorIdNode> locks,
NodeSourcePosition sourcePosition,
boolean ensureVirtualized)
Introduces a new virtual object to the current state.
|
void |
delete()
Deletes the current node.
|
boolean |
ensureMaterialized(VirtualObjectNode virtualObject)
If state is virtual, materialization is performed for the given state.
|
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.
|
DebugContext |
getDebug() |
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.
|
OptionValues |
getOptions() |
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
VirtualizerTool.replaceWithValue(ValueNode) or
VirtualizerTool.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) |
default void |
setVirtualEntry(VirtualObjectNode virtualObject,
int index,
ValueNode value) |
boolean |
setVirtualEntry(VirtualObjectNode virtualObject,
int index,
ValueNode value,
JavaKind accessKind,
long offset)
Sets the entry (field or array element) with the given index in the virtualized object.
|
getConstantFieldProvider, getConstantReflection, getForeignCalls, getLoopsDataProvider, getLowerer, getMetaAccess, getMetaAccessExtensionProvider, getPlatformConfigurationProvider, getReplacements, getStampProvider, getWordVerificationint getMaximumEntryCount()
void createVirtualObject(VirtualObjectNode virtualObject, ValueNode[] entryState, List<MonitorIdNode> locks, NodeSourcePosition sourcePosition, boolean ensureVirtualized)
virtualObject - the new virtual object.entryState - the initial state of the virtual object's fields.locks - the initial locking depths.sourcePosition - a source position for the new node or null if none is availableensureVirtualized - true if this object needs to stay virtualValueNode getAlias(ValueNode value)
VirtualizerTool.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).boolean setVirtualEntry(VirtualObjectNode virtualObject, int index, ValueNode value, JavaKind accessKind, long offset)
index - the index to be set.value - the new value for the given index.accessKind - the kind of the store which might be different than
VirtualObjectNode.entryKind(org.graalvm.compiler.core.common.spi.MetaAccessExtensionProvider, int).default void setVirtualEntry(VirtualObjectNode virtualObject, int index, ValueNode value)
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)
WithExceptionNode, kills the exception edge.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()
WithExceptionNode, kills the
exception edge.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)
VirtualizerTool.replaceWithValue(ValueNode) or
VirtualizerTool.replaceWithVirtual(VirtualObjectNode), depending on the given value.value - the replacement valueboolean ensureMaterialized(VirtualObjectNode virtualObject)
boolean canVirtualizeLargeByteArrayUnsafeAccess()
OptionValues getOptions()
DebugContext getDebug()