src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/PiArrayNode.java
equal
deleted
inserted
replaced
44 |
44 |
45 public static final NodeClass<PiArrayNode> TYPE = NodeClass.create(PiArrayNode.class); |
45 public static final NodeClass<PiArrayNode> TYPE = NodeClass.create(PiArrayNode.class); |
46 @Input ValueNode length; |
46 @Input ValueNode length; |
47 |
47 |
48 @Override |
48 @Override |
49 public ValueNode length() { |
49 public ValueNode findLength(ArrayLengthProvider.FindLengthMode mode) { |
50 return length; |
50 return length; |
51 } |
51 } |
52 |
52 |
53 public PiArrayNode(ValueNode object, ValueNode length, Stamp stamp) { |
53 public PiArrayNode(ValueNode object, ValueNode length, Stamp stamp) { |
54 super(TYPE, object, stamp, null); |
54 super(TYPE, object, stamp, null); |
55 this.length = length; |
55 this.length = length; |
56 } |
56 } |
57 |
57 |
58 @Override |
58 @Override |
59 public Node canonical(CanonicalizerTool tool) { |
59 public Node canonical(CanonicalizerTool tool) { |
60 if (GraphUtil.arrayLength(object()) != length()) { |
60 if (GraphUtil.arrayLength(object(), ArrayLengthProvider.FindLengthMode.SEARCH_ONLY) != length) { |
61 return this; |
61 return this; |
62 } |
62 } |
63 return super.canonical(tool); |
63 return super.canonical(tool); |
64 } |
64 } |
65 |
65 |