From 8d0c412634f884fe28a032eec4a96e1f19aee335 Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Sat, 15 Mar 2014 01:06:57 +0400 Subject: [PATCH] Removes some temporary code --- .../org/teavm/model/util/InterferenceGraphBuilder.java | 9 ++++----- .../java/org/teavm/model/util/RegisterAllocator.java | 3 --- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/teavm-core/src/main/java/org/teavm/model/util/InterferenceGraphBuilder.java b/teavm-core/src/main/java/org/teavm/model/util/InterferenceGraphBuilder.java index 83deeea3a..5d473f907 100644 --- a/teavm-core/src/main/java/org/teavm/model/util/InterferenceGraphBuilder.java +++ b/teavm-core/src/main/java/org/teavm/model/util/InterferenceGraphBuilder.java @@ -96,15 +96,14 @@ class InterferenceGraphBuilder { backEdges.get(edgeSet.keys[j]).add(i); } } - } - for (int i = 0; i < edges.size(); ++i) { - IntOpenHashSet edgeSet = edges.get(i); for (int j = 0; j < edgeSet.allocated.length; ++j) { if (edgeSet.allocated[j]) { - builder.addEdge(i, edgeSet.keys[j]); + backEdges.get(i).add(edgeSet.keys[j]); } } - edgeSet = backEdges.get(i); + } + for (int i = 0; i < edges.size(); ++i) { + IntOpenHashSet edgeSet = backEdges.get(i); for (int j = 0; j < edgeSet.allocated.length; ++j) { if (edgeSet.allocated[j]) { builder.addEdge(edgeSet.keys[j], i); diff --git a/teavm-core/src/main/java/org/teavm/model/util/RegisterAllocator.java b/teavm-core/src/main/java/org/teavm/model/util/RegisterAllocator.java index 0efc3ca18..fc57a134b 100644 --- a/teavm-core/src/main/java/org/teavm/model/util/RegisterAllocator.java +++ b/teavm-core/src/main/java/org/teavm/model/util/RegisterAllocator.java @@ -210,9 +210,6 @@ public class RegisterAllocator { GraphBuilder renamedGraph = new GraphBuilder(); for (int i = 0; i < graph.size(); ++i) { for (int j : graph.outgoingEdges(i)) { - if (i >= varMap.length || j >= varMap.length) { - throw new RuntimeException(); - } renamedGraph.addEdge(varMap[i], varMap[j]); } }