# HG changeset patch # User Christian Wimmer # Date 1369435095 25200 # Node ID 138798dfe8dc5d09e832f3af97197cfbbaf5623b # Parent e723f9031785551473a58ea46936b4e2f11411aa Do not call kind() for deleted nodes, since it can cause an exception diff -r e723f9031785 -r 138798dfe8dc graal/com.oracle.graal.java/src/com/oracle/graal/java/FrameStateBuilder.java --- a/graal/com.oracle.graal.java/src/com/oracle/graal/java/FrameStateBuilder.java Fri May 24 10:37:27 2013 -0400 +++ b/graal/com.oracle.graal.java/src/com/oracle/graal/java/FrameStateBuilder.java Fri May 24 15:38:15 2013 -0700 @@ -144,7 +144,7 @@ for (int i = 0; i < stackSize(); i++) { ValueNode x = stackAt(i); ValueNode y = other.stackAt(i); - if (x != y && ValueNodeUtil.typeMismatch(x, y)) { + if (x != y && (x == null || x.isDeleted() || y == null || y.isDeleted() || x.kind() != y.kind())) { return false; } } @@ -171,11 +171,11 @@ } private ValueNode merge(ValueNode currentValue, ValueNode otherValue, MergeNode block) { - if (currentValue == null) { + if (currentValue == null || currentValue.isDeleted()) { return null; } else if (block.isPhiAtMerge(currentValue)) { - if (otherValue == null || currentValue.kind() != otherValue.kind()) { + if (otherValue == null || otherValue.isDeleted() || currentValue.kind() != otherValue.kind()) { propagateDelete((PhiNode) currentValue); return null; } @@ -184,7 +184,7 @@ } else if (currentValue != otherValue) { assert !(block instanceof LoopBeginNode) : "Phi functions for loop headers are create eagerly for all locals and stack slots"; - if (otherValue == null || currentValue.kind() != otherValue.kind()) { + if (otherValue == null || otherValue.isDeleted() || currentValue.kind() != otherValue.kind()) { return null; } diff -r e723f9031785 -r 138798dfe8dc graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/ValueNodeUtil.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/ValueNodeUtil.java Fri May 24 10:37:27 2013 -0400 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/ValueNodeUtil.java Fri May 24 15:38:15 2013 -0700 @@ -72,10 +72,6 @@ assert x == null; } - public static boolean typeMismatch(ValueNode x, ValueNode y) { - return y == null || x == null || x.kind() != y.kind(); - } - @SuppressWarnings("unchecked") public static Collection filter(Iterable nodes, Class clazz) { ArrayList phis = new ArrayList<>();