public class DynamicNewArrayNode extends AbstractNewArrayNode implements Canonicalizable
DynamicNewArrayNode is used for allocation of arrays when the type is not a
compile-time constant.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>ArrayLengthProvider.FindLengthModeDeoptimizingNode.DeoptAfter, DeoptimizingNode.DeoptBefore, DeoptimizingNode.DeoptDuring| Modifier and Type | Field and Description |
|---|---|
protected JavaKind |
knownElementKind
A non-null value indicating the worst case element type.
|
static NodeClass<DynamicNewArrayNode> |
TYPE |
lengthemitMemoryBarrier, fillContentsstateBeforenextEMPTY_ARRAY, stampNODE_LIST, NOT_ITERABLE, TRACK_CREATION_POSITION, WithAllEdges, WithNoEdges, WithOnlyInputEdges, WithOnlySucessorEdges| Modifier | Constructor and Description |
|---|---|
|
DynamicNewArrayNode(MetaAccessProvider metaAccess,
ValueNode elementType,
ValueNode length,
boolean fillContents,
JavaKind knownElementKind) |
protected |
DynamicNewArrayNode(NodeClass<? extends DynamicNewArrayNode> c,
ValueNode elementType,
ValueNode length,
boolean fillContents,
JavaKind knownElementKind,
FrameState stateBefore,
MetaAccessProvider metaAccess) |
|
DynamicNewArrayNode(ValueNode elementType,
ValueNode length,
boolean fillContents) |
| Modifier and Type | Method and Description |
|---|---|
Node |
canonical(CanonicalizerTool tool)
Implementations of this method can provide local optimizations like constant folding and
strength reduction.
|
protected NewArrayNode |
createNewArrayNode(ResolvedJavaType type)
Hook for subclasses to instantiate a subclass of
NewArrayNode. |
ValueNode |
getElementType() |
JavaKind |
getKnownElementKind() |
ValueNode |
getVoidClass() |
static Object |
newArray(Class<?> componentType,
int length) |
static Object |
newArray(Class<?> componentType,
int length,
JavaKind knownElementKind) |
static Object |
newUninitializedArray(Class<?> componentType,
int length,
JavaKind knownElementKind) |
void |
setVoidClass(ValueNode newVoidClass) |
static boolean |
throwsIllegalArgumentException(Class<?> elementType,
Class<?> voidClass) |
static boolean |
throwsIllegalArgumentException(ResolvedJavaType elementType) |
asNewArrayNode, dimension, dimensionCount, findLength, lengthcanDeoptimize, clearEmitMemoryBarrier, emitMemoryBarrier, fillContents, setFillContentssetStateBefore, stateBeforeasFixedWithNextNode, next, setNextasFixedNode, verifyasConstant, asJavaConstant, asNode, asSerializableConstant, checkReplaceAtUsagesInvariants, getStackKind, graph, hasUsagesOtherThan, inferStamp, 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, verifyEdges, verifyInputs, verifySourcePosition, withNodeSourcePositionclone, equals, getClass, notify, notifyAll, wait, wait, waitasFixedWithNextNodeasFixedNodeasNodecanUseAsStateDuringstatespublic static final NodeClass<DynamicNewArrayNode> TYPE
protected final JavaKind knownElementKind
public DynamicNewArrayNode(ValueNode elementType, ValueNode length, boolean fillContents)
public DynamicNewArrayNode(MetaAccessProvider metaAccess,
ValueNode elementType,
ValueNode length,
boolean fillContents,
JavaKind knownElementKind)
protected DynamicNewArrayNode(NodeClass<? extends DynamicNewArrayNode> c, ValueNode elementType, ValueNode length, boolean fillContents, JavaKind knownElementKind, FrameState stateBefore, MetaAccessProvider metaAccess)
public ValueNode getElementType()
public JavaKind getKnownElementKind()
public 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 Canonicalizabletool - provides access to runtime interfaces like MetaAccessProviderprotected NewArrayNode createNewArrayNode(ResolvedJavaType type)
NewArrayNode.public static boolean throwsIllegalArgumentException(Class<?> elementType, Class<?> voidClass)
public static boolean throwsIllegalArgumentException(ResolvedJavaType elementType)
public static Object newArray(Class<?> componentType, int length, JavaKind knownElementKind)
public static Object newUninitializedArray(Class<?> componentType, int length, JavaKind knownElementKind)
public ValueNode getVoidClass()
public void setVoidClass(ValueNode newVoidClass)