load AVM2 instuctions dynamically (much less memory usage after loading an swf, but still fast decompiling)

This commit is contained in:
honfika@gmail.com
2014-09-06 00:43:11 +02:00
parent 3c72c84cd9
commit 8ba93afa4d
11 changed files with 137 additions and 131 deletions

View File

@@ -866,17 +866,13 @@ public final class SWF implements TreeItem, Timelined {
}
public List<MyEntry<ClassPath, ScriptPack>> getAS3Packs() {
List<ABCContainerTag> abcTags = new ArrayList<>();
List<MyEntry<ClassPath, ScriptPack>> packs = new ArrayList<>();
for (Tag t : tags) {
if (t instanceof ABCContainerTag) {
abcTags.add((ABCContainerTag) t);
ABCContainerTag abcTag = (ABCContainerTag) t;
packs.addAll(abcTag.getABC().getScriptPacks());
}
}
List<MyEntry<ClassPath, ScriptPack>> packs = new ArrayList<>();
for (int i = 0; i < abcTags.size(); i++) {
ABCContainerTag t = abcTags.get(i);
packs.addAll(t.getABC().getScriptPacks());
}
return uniqueAS3Packs(packs);
}