diff graal/com.oracle.graal.graph/src/com/oracle/graal/graph/Node.java @ 19541:c66037cb9cd1

Make Node#replaceAndDelete not accept null as an argument.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Sun, 22 Feb 2015 22:39:26 +0100
parents 55d0b9ec7587
children f98e2f0c35d8
line wrap: on
line diff
--- a/graal/com.oracle.graal.graph/src/com/oracle/graal/graph/Node.java	Sun Feb 22 19:31:57 2015 +0100
+++ b/graal/com.oracle.graal.graph/src/com/oracle/graal/graph/Node.java	Sun Feb 22 22:39:26 2015 +0100
@@ -617,11 +617,11 @@
 
     public void replaceAndDelete(Node other) {
         assert checkReplaceWith(other);
-        if (other != null) {
-            clearSuccessors();
-            replaceAtUsages(other);
-            replaceAtPredecessor(other);
-        }
+        assert other != null;
+        clearInputs();
+        clearSuccessors();
+        replaceAtUsages(other);
+        replaceAtPredecessor(other);
         safeDelete();
     }