mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-05-27 13:54:49 +00:00
feat!: redesigned loop detector (#2542)
Instead of walking code structures to get loops, the loops are populated by new faster algorithm. Also, we do not join adjacent GraphParts anymore in non-obfuscated code. For proper switch handling, the code is decompiled in two passes everytime (Previously, the second pass was used only sometimes). In first pass we do not process ifs as it may break switch detection. Second pass is executed after we know the switches position. Fixes #2542
This commit is contained in:
@@ -3953,7 +3953,7 @@ public final class SWF implements SWFContainerItem, Timelined, Openable {
|
||||
* @throws InterruptedException On interrupt
|
||||
*/
|
||||
private static void getVariables(SWF swf, boolean insideDoInitAction, List<MyEntry<DirectValueActionItem, ConstantPool>> variables, List<GraphSourceItem> functions, HashMap<DirectValueActionItem, ConstantPool> strings, HashMap<DirectValueActionItem, String> usageTypes, ActionGraphSource code, long addr, String path) throws InterruptedException {
|
||||
ActionLocalData localData = new ActionLocalData(null, insideDoInitAction, new HashMap<>() /*??*/, new LinkedHashSet<>());
|
||||
ActionLocalData localData = new ActionLocalData(null, insideDoInitAction, new HashMap<>() /*??*/, new LinkedHashSet<>(), new ArrayList<>(), new ArrayList<>());
|
||||
getVariables(swf, null, localData, new TranslateStack(path), new ArrayList<>(), code, code.adr2pos(addr), variables, functions, strings, new ArrayList<>(), usageTypes, path);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user