# HG changeset patch # User Lukas Stadler # Date 1367852303 -7200 # Node ID c064c48b93878a888b8f61fae0cae4bd060f75ca # Parent d6bf345d58c137e6b7ffe2ce44fca79a13322d53 fix virtualization of ObjectEqualsNode diff -r d6bf345d58c1 -r c064c48b9387 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/ObjectEqualsNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/ObjectEqualsNode.java Mon May 06 15:25:33 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/ObjectEqualsNode.java Mon May 06 16:58:23 2013 +0200 @@ -77,9 +77,16 @@ boolean xVirtual = stateX != null && stateX.getState() == EscapeState.Virtual; boolean yVirtual = stateY != null && stateY.getState() == EscapeState.Virtual; - if (xVirtual ^ yVirtual) { - // one of them is virtual: they can never be the same objects - tool.replaceWithValue(LogicConstantNode.contradiction(graph())); + if (xVirtual && !yVirtual) { + if (stateX.getVirtualObject().hasIdentity()) { + // one of them is virtual: they can never be the same objects + tool.replaceWithValue(LogicConstantNode.contradiction(graph())); + } + } else if (!xVirtual && yVirtual) { + if (stateY.getVirtualObject().hasIdentity()) { + // one of them is virtual: they can never be the same objects + tool.replaceWithValue(LogicConstantNode.contradiction(graph())); + } } else if (xVirtual && yVirtual) { boolean xIdentity = stateX.getVirtualObject().hasIdentity(); boolean yIdentity = stateY.getVirtualObject().hasIdentity();