# HG changeset patch # User Lukas Stadler # Date 1367857551 -7200 # Node ID c84eb4661fe97a7d6ec4ba031bceb5d37e20e916 # Parent c064c48b93878a888b8f61fae0cae4bd060f75ca# Parent ff153f4ae48b6797e6b7f472395366ee83b656a4 Merge diff -r ff153f4ae48b -r c84eb4661fe9 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 16:59:44 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/ObjectEqualsNode.java Mon May 06 18:25:51 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();