summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>2012-06-05 14:53:58 +0000
committerchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>2012-06-05 14:53:58 +0000
commit4ef16d3ab2ab50a9d04623018187d716f6cb434e (patch)
treefb02ca185f4739d929ace09586fcf12b1e37d509 /src/main
parentd32c3a0ac0504e420d54aab03df72efd2b9861d2 (diff)
downloadjavassist-4ef16d3ab2ab50a9d04623018187d716f6cb434e.tar.gz
javassist-4ef16d3ab2ab50a9d04623018187d716f6cb434e.zip
fixed JASSIST-168
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@631 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
Diffstat (limited to 'src/main')
-rw-r--r--src/main/javassist/bytecode/analysis/ControlFlow.java20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/main/javassist/bytecode/analysis/ControlFlow.java b/src/main/javassist/bytecode/analysis/ControlFlow.java
index 38b59130..0560be6b 100644
--- a/src/main/javassist/bytecode/analysis/ControlFlow.java
+++ b/src/main/javassist/bytecode/analysis/ControlFlow.java
@@ -149,12 +149,10 @@ public class ControlFlow {
BasicBlock[] entrances(Node n) { return n.block.entrances; }
};
nodes[0].makeDepth1stTree(null, visited, 0, distance, access);
- for (int i = 0; i < size; i++)
- visited[i] = false;
-
- while (nodes[0].makeDominatorTree(visited, distance, access))
- ;
-
+ do {
+ for (int i = 0; i < size; i++)
+ visited[i] = false;
+ } while (nodes[0].makeDominatorTree(visited, distance, access));
Node.setChildren(nodes);
return nodes;
}
@@ -202,11 +200,11 @@ public class ControlFlow {
if (nodes[i].block.exits() == 0)
counter = nodes[i].makeDepth1stTree(null, visited, counter, distance, access);
- for (int i = 0; i < size; i++)
- visited[i] = false;
-
boolean changed;
do {
+ for (int i = 0; i < size; i++)
+ visited[i] = false;
+
changed = false;
for (int i = 0; i < size; i++)
if (nodes[i].block.exits() == 0)
@@ -245,7 +243,7 @@ public class ControlFlow {
protected void toString2(StringBuffer sbuf) {
super.toString2(sbuf);
- sbuf.append(", incomping{");
+ sbuf.append(", incoming{");
for (int i = 0; i < entrances.length; i++)
sbuf.append(entrances[i].position).append(", ");
@@ -280,7 +278,7 @@ public class ControlFlow {
public int incomings() { return incoming; }
/**
- * Returns the blocks that the control may jump into this block from.
+ * Returns the block that the control may jump into this block from.
*/
public Block incoming(int n) {
return entrances[n];