public final class ArrayLengthNode extends FixedWithNextNode implements Canonicalizable.Unary<ValueNode>, Lowerable, Virtualizable
ArrayLength instruction gets the length of an array.Node.ConstantNodeParameter, Node.EdgeVisitor, Node.IndirectCanonicalization, Node.InjectedNodeParameter, Node.Input, Node.NodeInsertionStackTrace, Node.NodeIntrinsic, Node.NodeIntrinsicFactory, Node.OptionalInput, Node.Successor, Node.ValueNumberableCanonicalizable.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<ArrayLengthNode> |
TYPE |
nextNODE_LIST, NOT_ITERABLE, TRACK_CREATION_POSITION, WithAllEdges, WithNoEdges, WithOnlyInputEdges, WithOnlySucessorEdges| Constructor and Description |
|---|
ArrayLengthNode(ValueNode array) |
| Modifier and Type | Method and Description |
|---|---|
ValueNode |
array() |
static int |
arrayLength(Object array)
Returns the length of the given array.
|
ValueNode |
canonical(CanonicalizerTool tool,
ValueNode forValue)
Similar to
Canonicalizable.canonical(CanonicalizerTool), except that
implementations should act as if the current input of the node was the given one, i.e.,
they should never look at the inputs via the this pointer. |
static ValueNode |
create(ValueNode forValue,
jdk.vm.ci.meta.ConstantReflectionProvider constantReflection) |
ValueNode |
getValue()
Gets the current value of the input, so that calling
Canonicalizable.Unary.canonical(CanonicalizerTool, Node) with the value returned from this method
should behave exactly like Canonicalizable.canonical(CanonicalizerTool). |
static boolean |
intrinsify(GraphBuilderContext b,
ValueNode array) |
static ValueNode |
readArrayLength(ValueNode originalArray,
jdk.vm.ci.meta.ConstantReflectionProvider constantReflection)
Gets the length of an array if possible.
|
void |
virtualize(VirtualizerTool tool)
A node class can implement this method to convey information about what its effect would be
if some of its inputs were virtualized.
|
asNode, next, setNextasConstant, asJavaConstant, asSerializableConstant, getStackKind, graph, hasUsagesOtherThan, inferStamp, isAllowedUsageType, isConstant, isConstantPredicate, isDefaultConstant, isIllegalConstant, isJavaConstant, isNullConstant, isSerializableConstant, replaceAtAllUsages, replaceAtUsages, setStamp, stamp, updateStampafterClone, applyInputs, applySuccessors, assertFalse, assertTrue, cfgPredecessors, cfgSuccessors, clearInputs, clearNodeSourcePosition, clearSuccessors, copyWithInputs, copyWithInputs, dataFlowEquals, estimatedNodeCycles, estimatedNodeSize, fail, formatTo, getCreationPosition, getDebug, getDebugProperties, getDebugProperties, getInsertionPosition, getNodeClass, getNodeSourcePosition, getOptions, getUsageCount, hasExactlyOneUsage, hashCode, hasMoreThanOneUsage, hasNoUsages, hasOnlyUsagesOfType, hasUsages, inputPositions, inputs, isAlive, isDeleted, isUnregistered, markDeleted, maybeNotifyZeroUsages, modCount, predecessor, pushInputs, removeUsage, replaceAllInputs, replaceAndDelete, replaceAtMatchingUsages, replaceAtPredecessor, replaceAtUsages, replaceAtUsages, replaceAtUsages, replaceAtUsages, replaceAtUsagesAndDelete, replaceAtUsagesAndDelete, replaceFirstInput, replaceFirstInput, replaceFirstSuccessor, safeDelete, setCreationPosition, setInsertionPosition, setNodeSourcePosition, simplify, successorPositions, successors, toString, toString, updateNodeSourcePosition, updatePredecessor, updateUsages, updateUsagesInterface, usages, valueEquals, verifyEdges, verifyInputs, verifySourcePosition, withNodeSourcePositionclone, equals, finalize, getClass, notify, notifyAll, wait, wait, waitcanonicalasNodepublic static final NodeClass<ArrayLengthNode> TYPE
public ArrayLengthNode(ValueNode array)
public ValueNode array()
public ValueNode getValue()
Canonicalizable.UnaryCanonicalizable.Unary.canonical(CanonicalizerTool, Node) with the value returned from this method
should behave exactly like Canonicalizable.canonical(CanonicalizerTool).getValue in interface Canonicalizable.Unary<ValueNode>public static ValueNode create(ValueNode forValue, jdk.vm.ci.meta.ConstantReflectionProvider constantReflection)
public ValueNode canonical(CanonicalizerTool tool, ValueNode forValue)
Canonicalizable.UnaryCanonicalizable.canonical(CanonicalizerTool), except that
implementations should act as if the current input of the node was the given one, i.e.,
they should never look at the inputs via the this pointer.canonical in interface Canonicalizable.Unary<ValueNode>public static ValueNode readArrayLength(ValueNode originalArray, jdk.vm.ci.meta.ConstantReflectionProvider constantReflection)
array or null if it is not availablepublic static boolean intrinsify(GraphBuilderContext b, ValueNode array)
public static int arrayLength(Object array)
public void virtualize(VirtualizerTool tool)
Virtualizablevirtualize in interface Virtualizabletool - the tool used to describe the effects of this node