public final class PiArrayNode extends PiNode implements ArrayLengthProvider
PiNode that also provides an array length in addition to a more refined stamp. A usage
that reads the array length, such as an ArrayLengthNode, can be canonicalized based on
this information.| Modifier and Type | Class and Description |
|---|---|
static class |
PiArrayNode.Placeholder
A placeholder node in a snippet that will be replaced with a
PiArrayNode when the
snippet is instantiated. |
PiNode.IntrinsifyOp, PiNode.PlaceholderStampNode.ConstantNodeParameter, Node.EdgeVisitor, Node.IndirectCanonicalization, Node.InjectedNodeParameter, Node.Input, Node.NodeInsertionStackTrace, Node.NodeIntrinsic, Node.NodeIntrinsicFactory, Node.OptionalInput, Node.Successor, Node.ValueNumberableArrayLengthProvider.FindLengthModeCanonicalizable.Binary<T extends Node>, Canonicalizable.BinaryCommutative<T extends Node>, Canonicalizable.Ternary<T extends Node>, Canonicalizable.Unary<T extends Node>| Modifier and Type | Field and Description |
|---|---|
static NodeClass<PiArrayNode> |
TYPE |
guardEMPTY_ARRAY, stampNODE_LIST, NOT_ITERABLE, TRACK_CREATION_POSITION, WithAllEdges, WithNoEdges, WithOnlyInputEdges, WithOnlySucessorEdges| Constructor and Description |
|---|
PiArrayNode(ValueNode object,
ValueNode length,
Stamp stamp) |
| Modifier and Type | Method and Description |
|---|---|
Node |
canonical(CanonicalizerTool tool)
Implementations of this method can provide local optimizations like constant folding and
strength reduction.
|
ValueNode |
findLength(ArrayLengthProvider.FindLengthMode mode,
ConstantReflectionProvider constantReflection)
Returns the length of the array described by this node, or null if it is not available.
|
static Object |
piArrayCastToSnippetReplaceeStamp(Object object,
int length)
Changes the stamp of an object inside a snippet to be the stamp of the node replaced by the
snippet.
|
asNonNullClass, asNonNullObject, canonical, create, create, create, generate, getOriginalNode, inferStamp, intrinsify, intrinsify, object, piCast, piCastNonNull, piCastNonNull, piCastNonNullClass, piCastNonZero, piCastNonZero, piCastPositive, piCastToSnippetReplaceeStamp, piStamp, setOriginalNode, strengthenPiStamp, virtualizegetGuard, setGuardasConstant, asJavaConstant, asNode, asSerializableConstant, checkReplaceAtUsagesInvariants, getStackKind, graph, hasUsagesOtherThan, isAllowedUsageType, isConstant, isConstantPredicate, isDefaultConstant, isIllegalConstant, isJavaConstant, isNullConstant, isSerializableConstant, recursivelyDataFlowEqualsUpTo, setStamp, stamp, updateStamp, updateUsagesInterfaceafterClone, applyInputs, 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, toString, updateNodeSourcePosition, updatePredecessor, updateUsages, usages, valueEquals, verify, verifyEdges, verifyInputs, verifySourcePosition, withNodeSourcePositionclone, equals, getClass, notify, notifyAll, wait, wait, waitgetGuardasNodepublic static final NodeClass<PiArrayNode> TYPE
public 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 Node canonical(CanonicalizerTool tool)
Canonicalizablenull will delete the current node and replace it with null at
all usages. Note that it is not necessary to delete floating nodes that have no more usages
this way - they will be deleted automatically.canonical in interface Canonicalizablecanonical in class PiNodetool - provides access to runtime interfaces like MetaAccessProvider