diff graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/phases/LoopPhase.java @ 3060:f08a810b8449

Graph.getNodes() is Iterable<Node>, doesn't return null nodes and doesn't throw ConcurrentModificationException
author Lukas Stadler <lukas.stadler@jku.at>
date Tue, 21 Jun 2011 14:32:12 +0200
parents fe7145755a91
children 848dd57066ad
line wrap: on
line diff
--- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/phases/LoopPhase.java	Tue Jun 21 12:15:38 2011 +0200
+++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/phases/LoopPhase.java	Tue Jun 21 14:32:12 2011 +0200
@@ -35,8 +35,7 @@
 
     @Override
     protected void run(Graph graph) {
-        List<Node> nodes = new ArrayList<Node>(graph.getNodes());
-        for (Node n : nodes) {
+        for (Node n : graph.getNodes()) {
             if (n instanceof LoopBegin) {
                 doLoop((LoopBegin) n);
             }