Mercurial > hg > graal-compiler
comparison graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/nodes/ArrayEqualsNode.java @ 19403:7e2c87dae93e
Create static final NodeClass field named TYPE in Node subclasses.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Mon, 16 Feb 2015 15:43:03 +0100 |
parents | ec0733b5a90a |
children | 61d3cb8e1280 |
comparison
equal
deleted
inserted
replaced
19402:a306749d3e86 | 19403:7e2c87dae93e |
---|---|
36 * Compares two arrays with the same length. | 36 * Compares two arrays with the same length. |
37 */ | 37 */ |
38 @NodeInfo | 38 @NodeInfo |
39 public final class ArrayEqualsNode extends FixedWithNextNode implements LIRLowerable, Canonicalizable, Virtualizable, MemoryAccess { | 39 public final class ArrayEqualsNode extends FixedWithNextNode implements LIRLowerable, Canonicalizable, Virtualizable, MemoryAccess { |
40 | 40 |
41 public static final NodeClass TYPE = NodeClass.get(ArrayEqualsNode.class); | |
41 /** {@link Kind} of the arrays to compare. */ | 42 /** {@link Kind} of the arrays to compare. */ |
42 protected final Kind kind; | 43 protected final Kind kind; |
43 | 44 |
44 /** One array to be tested for equality. */ | 45 /** One array to be tested for equality. */ |
45 @Input ValueNode array1; | 46 @Input ValueNode array1; |
49 | 50 |
50 /** Length of both arrays. */ | 51 /** Length of both arrays. */ |
51 @Input ValueNode length; | 52 @Input ValueNode length; |
52 | 53 |
53 public ArrayEqualsNode(ValueNode array1, ValueNode array2, ValueNode length) { | 54 public ArrayEqualsNode(ValueNode array1, ValueNode array2, ValueNode length) { |
54 super(StampFactory.forKind(Kind.Boolean)); | 55 super(TYPE, StampFactory.forKind(Kind.Boolean)); |
55 assert array1.stamp().equals(array2.stamp()); | 56 assert array1.stamp().equals(array2.stamp()); |
56 ObjectStamp array1Stamp = (ObjectStamp) array1.stamp(); | 57 ObjectStamp array1Stamp = (ObjectStamp) array1.stamp(); |
57 ResolvedJavaType componentType = array1Stamp.type().getComponentType(); | 58 ResolvedJavaType componentType = array1Stamp.type().getComponentType(); |
58 this.kind = componentType.getKind(); | 59 this.kind = componentType.getKind(); |
59 this.array1 = array1; | 60 this.array1 = array1; |