use of org.candle.decompiler.intermediate.code.loop.ContinuousWhileIntermediate in project candle-decompiler by bradsdavis.
the class ContinuousLoop method process.
@Override
public void process(InstructionHandle ih) {
List<InstructionHandle> preds = Graphs.predecessorListOf(igc.getGraph(), ih);
//only more than one predecessor.
if (preds.size() < 2) {
return;
}
for (InstructionHandle pred : preds) {
IntermediateEdge ie = igc.getGraph().getEdge(pred, ih);
if (ie.getType() == EdgeType.BACK) {
if (!igc.hasIntermediate(ih)) {
//this is probably a while(true);
ContinuousWhileIntermediate cwi = new ContinuousWhileIntermediate(ih);
igc.addIntermediate(ih, cwi);
break;
}
}
}
}
Aggregations