mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-05-25 09:47:05 +00:00
Fixed: Try..catch.finally vs loops
This commit is contained in:
@@ -12,7 +12,8 @@
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library.
|
||||
* License along with this library.
|
||||
*/
|
||||
package com.jpexs.decompiler.graph;
|
||||
|
||||
import com.jpexs.decompiler.flash.BaseLocalData;
|
||||
@@ -123,7 +124,7 @@ public class GraphPart implements Serializable {
|
||||
return time;
|
||||
}
|
||||
|
||||
|
||||
private boolean leadsTo(BaseLocalData localData, Graph gr, GraphSource code, GraphPart prev, GraphPart part, HashSet<GraphPart> visited, List<Loop> loops, boolean useThrow) throws InterruptedException {
|
||||
if (Thread.currentThread().isInterrupted()) {
|
||||
throw new InterruptedException();
|
||||
}
|
||||
@@ -133,7 +134,7 @@ public class GraphPart implements Serializable {
|
||||
return false;
|
||||
}
|
||||
if (tpart != this) {
|
||||
if (tpart != this) {
|
||||
return tpart.leadsTo(localData, gr, code, null, part, visited, loops, useThrow);
|
||||
}
|
||||
Loop currentLoop = null;
|
||||
for (Loop l : loops) {
|
||||
@@ -170,25 +171,27 @@ public class GraphPart implements Serializable {
|
||||
for (GraphPart p : nextParts) {
|
||||
if (p == part) {
|
||||
return true;
|
||||
return true;
|
||||
} else if (p.leadsTo(localData, gr, code, this, part, visited, loops, useThrow)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (GraphPart p : throwParts) {
|
||||
if (p == part) {
|
||||
return true;
|
||||
} else if (p.leadsTo(localData, gr, code, this, part, visited, loops)) {
|
||||
if (useThrow) {
|
||||
for (GraphPart p : throwParts) {
|
||||
if (p == part) {
|
||||
return true;
|
||||
} else if (p.leadsTo(localData, gr, code, this, part, visited, loops, useThrow)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public boolean leadsTo(BaseLocalData localData, Graph gr, GraphSource code, GraphPart part, List<Loop> loops, boolean useThrow) throws InterruptedException {
|
||||
for (Loop l : loops) {
|
||||
l.leadsToMark = 0;
|
||||
}
|
||||
}
|
||||
return leadsTo(localData, gr, code, null /*???*/, part, new HashSet<>(), loops, useThrow);
|
||||
}
|
||||
|
||||
public GraphPart(int start, int end) {
|
||||
|
||||
Reference in New Issue
Block a user