for (TryCatchFinally block : blocks) {
for (Catch catchBlock : block.catches) {
Set<Node> recorder = new HashSet();
recorder.add(catchBlock.node);
Deque<Node> queue = new ArrayDeque();
queue.add(catchBlock.node);
while (!queue.isEmpty()) {
Node node = queue.pollFirst();
for (Node out : node.outgoing) {
if (out.hasDominator(catchBlock.node)) {
if (recorder.add(out)) {
// test next node
queue.add(out);
}
} else {
if (!out.backedges.isEmpty()) {
// purge the catch block from the loop structure
node.disconnect(out);