Mercurial > hg > graal-compiler
changeset 9586:c064c48b9387
fix virtualization of ObjectEqualsNode
author | Lukas Stadler <lukas.stadler@jku.at> |
---|---|
date | Mon, 06 May 2013 16:58:23 +0200 |
parents | d6bf345d58c1 |
children | c84eb4661fe9 |
files | graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/ObjectEqualsNode.java |
diffstat | 1 files changed, 10 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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();