public final class ArrayEqualsNode extends FixedWithNextNode implements LIRLowerable, Canonicalizable, Virtualizable, MemoryAccess
Node.ConstantNodeParameter, Node.InjectedNodeParameter, Node.Input, Node.NodeIntrinsic, Node.OptionalInput, Node.Successor, Node.ValueNumberable
Canonicalizable.Binary<T extends Node>, Canonicalizable.BinaryCommutative<T extends Node>, Canonicalizable.Unary<T extends Node>
Modifier and Type | Field and Description |
---|---|
(package private) ValueNode |
array1
One array to be tested for equality.
|
(package private) ValueNode |
array2
The other array to be tested for equality.
|
protected Kind |
kind
Kind of the arrays to compare. |
(package private) MemoryNode |
lastLocationAccess |
(package private) ValueNode |
length
Length of both arrays.
|
static NodeClass<ArrayEqualsNode> |
TYPE |
next
NODE_LIST, NOT_ITERABLE, USE_UNSAFE_TO_CLONE, WithAllEdges, WithNoEdges, WithOnlyInputEdges, WithOnlySucessorEdges
Constructor and Description |
---|
ArrayEqualsNode(ValueNode array1,
ValueNode array2,
ValueNode length,
Kind kind) |
Modifier and Type | Method and Description |
---|---|
Node |
canonical(CanonicalizerTool tool)
Implementations of this method can provide local optimizations like constant folding and
strength reduction.
|
static boolean |
equals(boolean[] array1,
boolean[] array2,
int length) |
static boolean |
equals(byte[] array1,
byte[] array2,
int length) |
static boolean |
equals(char[] array1,
char[] array2,
int length) |
static boolean |
equals(double[] array1,
double[] array2,
int length) |
static boolean |
equals(float[] array1,
float[] array2,
int length) |
static boolean |
equals(int[] array1,
int[] array2,
int length) |
static boolean |
equals(long[] array1,
long[] array2,
int length) |
static boolean |
equals(Object array1,
Object array2,
int length,
Kind kind) |
static boolean |
equals(short[] array1,
short[] array2,
int length) |
void |
generate(NodeLIRBuilderTool gen) |
MemoryNode |
getLastLocationAccess() |
LocationIdentity |
getLocationIdentity() |
void |
setLastLocationAccess(MemoryNode lla) |
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, setNext
asConstant, asJavaConstant, getKind, graph, inferStamp, isAllowedUsageType, isConstant, isConstantPredicate, isNullConstant, setStamp, stamp, updateStamp
acceptInputs, acceptSuccessors, afterClone, assertFalse, assertTrue, cfgPredecessors, cfgSuccessors, clearInputs, clearSuccessors, copyWithInputs, copyWithInputs, equals, fail, formatTo, getDebugProperties, getDebugProperties, getId, getNodeClass, getUsageAt, getUsageCount, hashCode, hasNoUsages, hasUsages, inputs, isAlive, isDeleted, markDeleted, modCount, newIdentityMap, newIdentityMap, newIdentityMap, newMap, newMap, newMap, newSet, newSet, predecessor, pushInputs, removeUsage, replaceAndDelete, replaceAtMatchingUsages, replaceAtPredecessor, replaceAtUsages, replaceAtUsages, replaceAtUsages, replaceFirstInput, replaceFirstSuccessor, safeDelete, simplify, successors, toString, toString, updatePredecessor, updateUsages, updateUsagesInterface, usages, valueEquals, verifyEdges, verifyInputs
public static final NodeClass<ArrayEqualsNode> TYPE
MemoryNode lastLocationAccess
public ArrayEqualsNode(ValueNode array1, ValueNode array2, ValueNode length, Kind kind)
public Node canonical(CanonicalizerTool tool)
Canonicalizable
null
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 Canonicalizable
tool
- provides access to runtime interfaces like MetaAccessProvider
public void virtualize(VirtualizerTool tool)
Virtualizable
virtualize
in interface Virtualizable
tool
- the tool used to describe the effects of this nodepublic static boolean equals(boolean[] array1, boolean[] array2, int length)
public static boolean equals(byte[] array1, byte[] array2, int length)
public static boolean equals(char[] array1, char[] array2, int length)
public static boolean equals(short[] array1, short[] array2, int length)
public static boolean equals(int[] array1, int[] array2, int length)
public static boolean equals(long[] array1, long[] array2, int length)
public static boolean equals(float[] array1, float[] array2, int length)
public static boolean equals(double[] array1, double[] array2, int length)
public void generate(NodeLIRBuilderTool gen)
generate
in interface LIRLowerable
public LocationIdentity getLocationIdentity()
getLocationIdentity
in interface MemoryAccess
public MemoryNode getLastLocationAccess()
getLastLocationAccess
in interface MemoryAccess
public void setLastLocationAccess(MemoryNode lla)
setLastLocationAccess
in interface MemoryAccess
lla
- the MemoryNode
that represents the last kill of the location