diff graal/com.oracle.graal.phases/src/com/oracle/graal/phases/util/GraphOrder.java @ 13783:73f0f4755aa3

better assertion message in GraphOrder
author Lukas Stadler <lukas.stadler@jku.at>
date Tue, 28 Jan 2014 14:46:17 +0100
parents 9a6faa08bffe
children ccf090d3be47
line wrap: on
line diff
--- a/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/util/GraphOrder.java	Tue Jan 28 14:45:56 2014 +0100
+++ b/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/util/GraphOrder.java	Tue Jan 28 14:46:17 2014 +0100
@@ -55,7 +55,7 @@
                         if (input instanceof FrameState && node instanceof StateSplit && input == ((StateSplit) node).stateAfter()) {
                             // nothing to do - after frame states are known, allowed cycles
                         } else {
-                            assert false : "cycle detected: " + node + " -> " + input;
+                            assert false : "unexpected cycle detected at input " + node + " -> " + input;
                         }
                     }
                 }
@@ -81,7 +81,7 @@
 
     private static void visitForward(ArrayList<Node> nodes, NodeBitMap visited, Node node, boolean floatingOnly) {
         if (node != null && !visited.isMarked(node)) {
-            assert !floatingOnly || !(node instanceof FixedNode) : "unexpected reference to fixed node: " + node;
+            assert !floatingOnly || !(node instanceof FixedNode) : "unexpected reference to fixed node: " + node + " (this indicates an unexpected cycle)";
             visited.mark(node);
             FrameState stateAfter = null;
             if (node instanceof StateSplit) {