mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-24 09:45:55 +00:00
Fixed #1894 Switches vs loops decompilation (now with two passes)
This commit is contained in:
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user