# HG changeset patch # User Lukas Stadler # Date 1395133060 -3600 # Node ID 532d9b78c7d49d7f7eac37fc687993b66041d46d # Parent 00d1f5391b2e43697df31b044e36dd153ee3f2f4 assert that only live ValueNodes are added as inputs and successors diff -r 00d1f5391b2e -r 532d9b78c7d4 graal/com.oracle.graal.graph/src/com/oracle/graal/graph/Node.java --- a/graal/com.oracle.graal.graph/src/com/oracle/graal/graph/Node.java Tue Mar 18 09:56:42 2014 +0100 +++ b/graal/com.oracle.graal.graph/src/com/oracle/graal/graph/Node.java Tue Mar 18 09:57:40 2014 +0100 @@ -458,6 +458,7 @@ * newInput: removes this node from oldInput's usages and adds this node to newInput's usages. */ protected void updateUsages(Node oldInput, Node newInput) { + assert isAlive() && (newInput == null || newInput.isAlive()) : "adding " + newInput + " to " + this + " instead of " + oldInput; if (oldInput != newInput) { if (oldInput != null) { if (oldInput.recordsUsages()) { @@ -482,6 +483,7 @@ * this node to newSuccessor's predecessors. */ protected void updatePredecessor(Node oldSuccessor, Node newSuccessor) { + assert isAlive() && (newSuccessor == null || newSuccessor.isAlive()) : "adding " + newSuccessor + " to " + this + " instead of " + oldSuccessor; assert graph == null || !graph.isFrozen(); if (oldSuccessor != newSuccessor) { if (oldSuccessor != null) {