Mercurial > hg > graal-compiler
changeset 9403:ca4d71edadcd
Change input parameter type
author | Christos Kotselidis <christos.kotselidis@oracle.com> |
---|---|
date | Sun, 28 Apr 2013 19:43:32 +0200 |
parents | 8c21cec0301b |
children | 365ca8db15a0 |
files | graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/phases/WriteBarrierVerificationPhase.java |
diffstat | 1 files changed, 5 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/phases/WriteBarrierVerificationPhase.java Sun Apr 28 19:33:35 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/phases/WriteBarrierVerificationPhase.java Sun Apr 28 19:43:32 2013 +0200 @@ -68,14 +68,14 @@ while (!frontier.isEmpty()) { Node currentNode = frontier.removeFirst(); assert !isSafepoint(currentNode) : "Write barrier must be present"; - if (!(currentNode instanceof SerialWriteBarrier) || ((currentNode instanceof SerialWriteBarrier) && !validateBarrier(write, currentNode))) { + if (!(currentNode instanceof SerialWriteBarrier) || ((currentNode instanceof SerialWriteBarrier) && !validateBarrier(write, (SerialWriteBarrier) currentNode))) { expandFrontier(frontier, currentNode); } } } private static boolean hasAttachedBarrier(Node node) { - return (((FixedWithNextNode) node).next() instanceof SerialWriteBarrier) && validateBarrier(node, ((FixedWithNextNode) node).next()); + return (((FixedWithNextNode) node).next() instanceof SerialWriteBarrier) && validateBarrier(node, (SerialWriteBarrier) ((FixedWithNextNode) node).next()); } private static boolean isObjectWrite(Node node) { @@ -102,17 +102,16 @@ return ((node instanceof DeoptimizingNode) && ((DeoptimizingNode) node).canDeoptimize()) || (node instanceof LoopBeginNode); } - private static boolean validateBarrier(Node write, Node barrier) { - SerialWriteBarrier barrierNode = (SerialWriteBarrier) barrier; + private static boolean validateBarrier(Node write, SerialWriteBarrier barrier) { if (write instanceof WriteNode) { WriteNode writeNode = (WriteNode) write; - if ((barrierNode.getObject() == writeNode.object()) && (!barrierNode.usePrecise() || (barrierNode.usePrecise() && barrierNode.getLocation() == writeNode.location()))) { + if ((barrier.getObject() == writeNode.object()) && (!barrier.usePrecise() || (barrier.usePrecise() && barrier.getLocation() == writeNode.location()))) { return true; } return false; } else if (write instanceof CompareAndSwapNode) { CompareAndSwapNode casNode = (CompareAndSwapNode) write; - if ((barrierNode.getObject() == casNode.object()) && (!barrierNode.usePrecise() || (barrierNode.usePrecise() && barrierNode.getLocation() == casNode.getLocation()))) { + if ((barrier.getObject() == casNode.object()) && (!barrier.usePrecise() || (barrier.usePrecise() && barrier.getLocation() == casNode.getLocation()))) { return true; } return false;