changeset 21988:040fcf0fd8c9

Review feedback on comments
author Tom Rodriguez <tom.rodriguez@oracle.com>
date Tue, 16 Jun 2015 17:52:01 -0700
parents a201f2778581
children f8732226922c
files graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/SwitchNode.java
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/SwitchNode.java	Tue Jun 16 17:51:58 2015 -0700
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/SwitchNode.java	Tue Jun 16 17:52:01 2015 -0700
@@ -167,16 +167,17 @@
     }
 
     /**
-     * Delete all other successors except for the one reached by {@code survivingEdge}. Deleting a
-     * branch can change the successors and the same successor might appear multiple times in the
-     * {@link #successors} list, so use node identity for the comparision and don't cache the
-     * surviving AbstractBeginNode.
+     * Delete all other successors except for the one reached by {@code survivingEdge}.
      *
      * @param tool
      * @param survivingEdge index of the edge in the {@link SwitchNode#successors} list
      */
     protected void killOtherSuccessors(SimplifierTool tool, int survivingEdge) {
         for (Node successor : successors()) {
+            /*
+             * Deleting a branch change change the successors so reload the surviving successor each
+             * time.
+             */
             if (successor != blockSuccessor(survivingEdge)) {
                 tool.deleteBranch(successor);
             }