mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-05-30 06:16:36 +00:00
AS3 test methods separated to classes, Fixed AS3: get/set slot for global scope
This commit is contained in:
@@ -724,6 +724,7 @@ public class Graph {
|
||||
lastUsage.get(labelName).labelName = null;
|
||||
}
|
||||
}
|
||||
expandGotos(ret);
|
||||
processIfs(ret);
|
||||
finalProcessStack(stack, ret, path);
|
||||
finalProcessAll(ret, 0, new FinalProcessLocalData(loops), path);
|
||||
@@ -1203,16 +1204,6 @@ public class Graph {
|
||||
}
|
||||
|
||||
protected void finalProcessAfter(List<GraphTargetItem> list, int level, FinalProcessLocalData localData, String path) {
|
||||
if (!list.isEmpty() && (list.get(list.size() - 1) instanceof GotoItem)) {
|
||||
GotoItem gi = (GotoItem) list.get(list.size() - 1);
|
||||
if (gi.targetCommands != null) {
|
||||
list.remove(gi);
|
||||
if (gi.labelName != null) {
|
||||
list.add(new LabelItem(null, gi.lineStartItem, gi.labelName));
|
||||
}
|
||||
list.addAll(gi.targetCommands);
|
||||
}
|
||||
}
|
||||
if (list.size() >= 2) {
|
||||
if (list.get(list.size() - 1) instanceof ExitItem) {
|
||||
ExitItem e = (ExitItem) list.get(list.size() - 1);
|
||||
@@ -1306,6 +1297,28 @@ public class Graph {
|
||||
}
|
||||
}
|
||||
|
||||
private void expandGotos(List<GraphTargetItem> list) {
|
||||
if (!list.isEmpty() && (list.get(list.size() - 1) instanceof GotoItem)) {
|
||||
GotoItem gi = (GotoItem) list.get(list.size() - 1);
|
||||
if (gi.targetCommands != null) {
|
||||
list.remove(gi);
|
||||
if (gi.labelName != null) {
|
||||
list.add(new LabelItem(null, gi.lineStartItem, gi.labelName));
|
||||
}
|
||||
list.addAll(gi.targetCommands);
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
GraphTargetItem item = list.get(i);
|
||||
if (item instanceof Block) {
|
||||
List<List<GraphTargetItem>> subs = ((Block) item).getSubs();
|
||||
for (List<GraphTargetItem> sub : subs) {
|
||||
expandGotos(sub);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void processIfs(List<GraphTargetItem> list) {
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
GraphTargetItem item = list.get(i);
|
||||
|
||||
Reference in New Issue
Block a user