changeset 19054:e971180d16d9

Small changes in edges iterator.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Sat, 31 Jan 2015 23:43:30 +0100
parents fa4e9a76a5ed
children 1ceffe3a92c7
files graal/com.oracle.graal.graph/src/com/oracle/graal/graph/Edges.java
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.graph/src/com/oracle/graal/graph/Edges.java	Sat Jan 31 21:33:01 2015 +0100
+++ b/graal/com.oracle.graal.graph/src/com/oracle/graal/graph/Edges.java	Sat Jan 31 23:43:30 2015 +0100
@@ -331,7 +331,13 @@
             } else {
                 subIndex++;
             }
-            while (index < edges.getCount()) {
+            if (index < edges.getCount()) {
+                forwardNodeList();
+            }
+        }
+
+        private void forwardNodeList() {
+            do {
                 if (subIndex == 0) {
                     list = edges.getNodeList(node, index);
                 }
@@ -346,7 +352,7 @@
                 }
                 subIndex = 0;
                 index++;
-            }
+            } while (index < edges.getCount());
         }
 
         private Node nextElement() {