Mercurial > hg > graal-compiler
changeset 2584:06b2eac2f5d3
changed Instruction.isAppended to boolean flag (instead of next == this logic)
author | Lukas Stadler <lukas.stadler@jku.at> |
---|---|
date | Thu, 05 May 2011 14:02:34 +0200 |
parents | 36597ecaf81b |
children | 3e0e65161345 |
files | graal/GraalCompiler/src/com/sun/c1x/ir/Instruction.java graal/GraalGraph/src/com/oracle/graal/graph/Node.java |
diffstat | 2 files changed, 8 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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<ExceptionHandler> 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; }
--- 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) {