public class VirtualArrayNode extends VirtualObjectNode implements ArrayLengthProvider
Node.ConstantNodeParameter, Node.EdgeVisitor, Node.IndirectCanonicalization, Node.InjectedNodeParameter, Node.Input, Node.NodeInsertionStackTrace, Node.NodeIntrinsic, Node.NodeIntrinsicFactory, Node.OptionalInput, Node.Successor, Node.ValueNumberableArrayLengthProvider.FindLengthMode| Modifier and Type | Field and Description |
|---|---|
protected ResolvedJavaType |
componentType |
protected int |
length |
static NodeClass<VirtualArrayNode> |
TYPE |
hasIdentityEMPTY_ARRAY, stampNODE_LIST, NOT_ITERABLE, TRACK_CREATION_POSITION, WithAllEdges, WithNoEdges, WithOnlyInputEdges, WithOnlySucessorEdges| Modifier | Constructor and Description |
|---|---|
protected |
VirtualArrayNode(NodeClass<? extends VirtualObjectNode> c,
ResolvedJavaType componentType,
int length) |
|
VirtualArrayNode(ResolvedJavaType componentType,
int length) |
| Modifier and Type | Method and Description |
|---|---|
int |
byteArrayEntryByteCount(int index,
VirtualizerTool tool)
Returns the number of bytes that the entry at a given index actually occupies.
|
ResolvedJavaType |
componentType() |
VirtualArrayNode |
duplicate()
Returns an exact duplicate of this virtual object node, which has not been added to the graph
yet.
|
int |
entryCount()
The number of entries this virtual object has.
|
int |
entryIndexForOffset(MetaAccessProvider metaAccess,
long constantOffset,
JavaKind expectedEntryKind)
If the given index denotes an entry in this virtual object, the index of this entry is
returned.
|
static int |
entryIndexForOffset(MetaAccessProvider metaAccess,
long constantOffset,
JavaKind expectedEntryKind,
ResolvedJavaType componentType,
int length) |
JavaKind |
entryKind(MetaAccessExtensionProvider metaAccessExtensionProvider,
int index)
Returns the
JavaKind of the entry at the given index. |
String |
entryName(int index)
Returns the name of the entry at the given index.
|
ValueNode |
findLength(ArrayLengthProvider.FindLengthMode mode,
ConstantReflectionProvider constantReflection)
Returns the length of the array described by this node, or null if it is not available.
|
void |
generate(NodeLIRBuilderTool gen) |
ValueNode |
getMaterializedRepresentation(FixedNode fixed,
ValueNode[] entries,
LockState locks)
Returns a node that can be used to materialize this virtual object.
|
String |
toString(Verbosity verbosity)
Creates a String representation for
this with a given Verbosity. |
ResolvedJavaType |
type()
The type of object described by this
VirtualObjectNode. |
static ValueNode |
virtualizeByteArrayRead(ValueNode entry,
JavaKind accessKind,
Stamp targetStamp)
Performs some sanity checks.
|
afterClone, canVirtualizeLargeByteArrayUnsafeRead, getObjectId, hasIdentity, isVirtualByteArray, isVirtualByteArrayAccess, resetObjectId, setIdentity, setObjectIdasConstant, asJavaConstant, asNode, asSerializableConstant, checkReplaceAtUsagesInvariants, getStackKind, graph, hasUsagesOtherThan, inferStamp, isAllowedUsageType, isConstant, isConstantPredicate, isDefaultConstant, isIllegalConstant, isJavaConstant, isNullConstant, isSerializableConstant, recursivelyDataFlowEqualsUpTo, setStamp, stamp, updateStamp, updateUsagesInterfaceapplyInputs, applySuccessors, assertFalse, assertTrue, cfgPredecessors, cfgSuccessors, clearInputs, clearNodeSourcePosition, clearSuccessors, copyWithInputs, copyWithInputs, dataFlowEquals, dynamicNodeSizeEstimate, estimatedNodeCycles, estimatedNodeSize, fail, formatTo, getCreationPosition, getDebug, getDebugProperties, getDebugProperties, getInsertionPosition, getNodeClass, getNodeSourcePosition, getOptions, getUsageCount, hasExactlyOneUsage, hashCode, hasMoreThanOneUsage, hasNoUsages, hasOnlyUsagesOfType, hasUsages, hasUsagesOfType, inputPositions, inputs, isAlive, isDeleted, isUnregistered, markDeleted, maybeNotifyZeroUsages, modCount, predecessor, pushInputs, removeUsage, replaceAllInputs, replaceAndDelete, replaceAtAllUsages, replaceAtMatchingUsages, replaceAtPredecessor, replaceAtUsages, replaceAtUsages, replaceAtUsages, replaceAtUsages, replaceAtUsages, replaceAtUsagesAndDelete, replaceAtUsagesAndDelete, replaceFirstInput, replaceFirstSuccessor, safeDelete, setCreationPosition, setInsertionPosition, setNodeSourcePosition, singleUsage, successorPositions, successors, toString, updateNodeSourcePosition, updatePredecessor, updateUsages, usages, valueEquals, verify, verifyEdges, verifyInputs, verifySourcePosition, withNodeSourcePositionpublic static final NodeClass<VirtualArrayNode> TYPE
protected final ResolvedJavaType componentType
protected final int length
public VirtualArrayNode(ResolvedJavaType componentType,
int length)
protected VirtualArrayNode(NodeClass<? extends VirtualObjectNode> c, ResolvedJavaType componentType, int length)
public ResolvedJavaType type()
VirtualObjectNodeVirtualObjectNode. In case of arrays, this is
the array type (and not the component type).type in class VirtualObjectNodepublic ResolvedJavaType componentType()
public int entryCount()
VirtualObjectNodeentryCount in class VirtualObjectNodepublic void generate(NodeLIRBuilderTool gen)
generate in interface LIRLowerablegenerate in class VirtualObjectNodepublic String toString(Verbosity verbosity)
Nodethis with a given Verbosity.public String entryName(int index)
VirtualObjectNodeentryName in class VirtualObjectNodepublic int entryIndexForOffset(MetaAccessProvider metaAccess,
long constantOffset,
JavaKind expectedEntryKind)
VirtualObjectNodeentryIndexForOffset in class VirtualObjectNodeconstantOffset - offset, where the value is placed.expectedEntryKind - Specifies which type is expected at this offset (Is important whenpublic static int entryIndexForOffset(MetaAccessProvider metaAccess,
long constantOffset,
JavaKind expectedEntryKind,
ResolvedJavaType componentType,
int length)
public JavaKind entryKind(MetaAccessExtensionProvider metaAccessExtensionProvider, int index)
VirtualObjectNodeJavaKind of the entry at the given index.entryKind in class VirtualObjectNodepublic VirtualArrayNode duplicate()
VirtualObjectNodeduplicate in class VirtualObjectNodepublic ValueNode getMaterializedRepresentation(FixedNode fixed, ValueNode[] entries, LockState locks)
VirtualObjectNodeAllocatedObjectNode then this node will be attached to a CommitAllocationNode
, otherwise the node will just be added to the graph.getMaterializedRepresentation in class VirtualObjectNodepublic ValueNode findLength(ArrayLengthProvider.FindLengthMode mode, ConstantReflectionProvider constantReflection)
ArrayLengthProviderArrayLengthProvider.FindLengthMode.
This method should not be called directly. Use GraphUtil.arrayLength(org.graalvm.compiler.nodes.ValueNode, org.graalvm.compiler.nodes.spi.ArrayLengthProvider.FindLengthMode, ConstantReflectionProvider) instead.findLength in interface ArrayLengthProviderpublic int byteArrayEntryByteCount(int index,
VirtualizerTool tool)