# HG changeset patch # User Lukas Stadler # Date 1304596954 -7200 # Node ID 06b2eac2f5d383f6f2e34638780dec9dbcbef8d5 # Parent 36597ecaf81ba1498475fb73b37b347bcbc07071 changed Instruction.isAppended to boolean flag (instead of next == this logic) diff -r 36597ecaf81b -r 06b2eac2f5d3 graal/GraalCompiler/src/com/sun/c1x/ir/Instruction.java --- a/graal/GraalCompiler/src/com/sun/c1x/ir/Instruction.java Thu May 05 13:47:27 2011 +0200 +++ b/graal/GraalCompiler/src/com/sun/c1x/ir/Instruction.java Thu May 05 14:02:34 2011 +0200 @@ -66,7 +66,7 @@ return (Instruction) successors().get(super.successorCount() + SUCCESSOR_NEXT); } - public Node setNext(Instruction next) { + private Node setNext(Instruction next) { return successors().set(super.successorCount() + SUCCESSOR_NEXT, next); } @@ -84,6 +84,9 @@ */ private List exceptionHandlers = ExceptionHandler.ZERO_HANDLERS; + + private boolean isAppended = false; + /** * Constructs a new instruction with the specified value type. * @param kind the value type for this instruction @@ -121,7 +124,7 @@ * @return {@code true} if this instruction has been added to the basic block containing it */ public final boolean isAppended() { - return next() != this; + return isAppended; } @@ -137,9 +140,7 @@ if (next != null) { assert !(this instanceof BlockEnd); next.setBCI(bci); - if (next.next() == next) { - next.setNext(null); - } + next.isAppended = true; } return next; } diff -r 36597ecaf81b -r 06b2eac2f5d3 graal/GraalGraph/src/com/oracle/graal/graph/Node.java --- a/graal/GraalGraph/src/com/oracle/graal/graph/Node.java Thu May 05 13:47:27 2011 +0200 +++ b/graal/GraalGraph/src/com/oracle/graal/graph/Node.java Thu May 05 14:02:34 2011 +0200 @@ -161,7 +161,8 @@ } public Node set(int index, Node node) { - assert node == Null || node.graph == self().graph; + // TODO: re-enable after Value class layout changes +// assert node == Null || node.graph == self().graph; Node old = nodes[index]; if (old != node) {