mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-28 09:26:16 +00:00
Merge ABCs on compile
TODO: reorder correctly
This commit is contained in:
@@ -507,6 +507,7 @@ public class AVM2Instruction implements Cloneable, GraphSourceItem {
|
||||
if (byteDelta != 0) {
|
||||
code.updateInstructionByteCountByAddr(address, byteDelta, body);
|
||||
}
|
||||
body.setModified();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -525,6 +526,7 @@ public class AVM2Instruction implements Cloneable, GraphSourceItem {
|
||||
if (byteDelta != 0) {
|
||||
code.updateInstructionByteCountByAddr(address, byteDelta, body);
|
||||
}
|
||||
body.setModified();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -158,16 +158,11 @@ public class As3ScriptReplacer extends MxmlcRunner {
|
||||
} else {
|
||||
//NOO
|
||||
}
|
||||
int oldTagIndex = swf.getTags().indexOf((Tag) oldPack.abc.parentTag);
|
||||
oldPack.abc.pack(); // removes old classes/methods/scripts
|
||||
if (oldPack.abc.script_info.isEmpty()) {
|
||||
swf.removeTag(oldTagIndex);
|
||||
}
|
||||
ABCContainerTag lastTag = newTags.get(newTags.size() - 1);
|
||||
((Tag) lastTag).setSwf(swf);
|
||||
swf.addTag(oldTagIndex + 1, (Tag) lastTag);
|
||||
//TODO: looks like ABCs need to be merged. Parent class needs to be defined earlier than used :-(
|
||||
((Tag) lastTag).setModified(true);
|
||||
ABCContainerTag newTagsLast = newTags.get(newTags.size() - 1);
|
||||
ABC newLastAbc = newTagsLast.getABC();
|
||||
oldPack.abc.mergeABC(newLastAbc);
|
||||
//TODO: reorder classes
|
||||
((Tag) oldPack.abc.parentTag).setModified(true);
|
||||
}
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user