Fixed #1894 Switches vs loops decompilation (now with two passes)

This commit is contained in:
Jindra Petřík
2022-11-30 19:05:36 +01:00
parent ad97886306
commit a41926a662
23 changed files with 365 additions and 48 deletions

View File

@@ -73,6 +73,8 @@ public class GraphPart implements Serializable {
public int finishedTime;
public int order;
public int numBlocks = Integer.MAX_VALUE;
//public List<GraphPart> throwParts = new ArrayList<>();
@@ -123,6 +125,16 @@ public class GraphPart implements Serializable {
ordered.add(this);
return time;
}
public void setNumblocks(int numBlocks) {
this.numBlocks = numBlocks;
numBlocks++;
for (GraphPart next : nextParts) {
if (next.numBlocks > numBlocks) {
next.setNumblocks(numBlocks);
}
}
}
private boolean leadsTo(BaseLocalData localData, Graph gr, GraphSource code, GraphPart prev, GraphPart part, HashSet<GraphPart> visited, List<Loop> loops, List<ThrowState> throwStates, boolean useThrow) throws InterruptedException {
if (Thread.currentThread().isInterrupted()) {