diff --git a/trunk/src/com/jpexs/decompiler/flash/SWF.java b/trunk/src/com/jpexs/decompiler/flash/SWF.java index a8206eb30..6dcfa40c1 100644 --- a/trunk/src/com/jpexs/decompiler/flash/SWF.java +++ b/trunk/src/com/jpexs/decompiler/flash/SWF.java @@ -53,6 +53,7 @@ import com.jpexs.decompiler.flash.flv.AUDIODATA; import com.jpexs.decompiler.flash.flv.FLVOutputStream; import com.jpexs.decompiler.flash.flv.FLVTAG; import com.jpexs.decompiler.flash.flv.VIDEODATA; +import com.jpexs.decompiler.flash.graph.Graph; import com.jpexs.decompiler.flash.graph.GraphSourceItem; import com.jpexs.decompiler.flash.graph.GraphSourceItemContainer; import com.jpexs.decompiler.flash.graph.GraphTargetItem; @@ -491,7 +492,7 @@ public class SWF { } for (int i = 0; i < abcTags.size(); i++) { ABC abc = abcTags.get(i).getABC(); - ScriptPack scr = abc.findScriptTraitByPath(className); + ScriptPack scr = abc.findScriptPackByPath(className); if (scr != null) { String cnt = ""; if (abc.script_info.length > 1) { @@ -1450,7 +1451,7 @@ public class SWF { return null; } - private static void getVariables(ConstantPool constantPool, List localData, Stack stack, List output, ActionGraphSource code, int ip, List> variables, List functions, HashMap strings, List visited, HashMap usageTypes) { + private static void getVariables(ConstantPool constantPool, List localData, Stack stack, List output, ActionGraphSource code, int ip, List> variables, List functions, HashMap strings, List visited, HashMap usageTypes, String path) { boolean debugMode = false; while ((ip > -1) && ip < code.size()) { if (visited.contains(ip)) { @@ -1506,6 +1507,7 @@ public class SWF { List cntSizes = cnt.getContainerSizes(); long addr = code.pos2adr(ip + 1); ip = code.adr2pos(addr); + String cntName = cnt.getName(); for (Long size : cntSizes) { if (size == 0) { continue; @@ -1513,7 +1515,7 @@ public class SWF { ip = code.adr2pos(addr); addr += size; int nextip = code.adr2pos(addr); - getVariables(variables, functions, strings, usageTypes, new ActionGraphSource(code.getActions().subList(ip, nextip), code.version, new HashMap(), new HashMap(), new HashMap()), 0); + getVariables(variables, functions, strings, usageTypes, new ActionGraphSource(code.getActions().subList(ip, nextip), code.version, new HashMap(), new HashMap(), new HashMap()), 0, path + (cntName == null ? "" : "/" + cntName)); ip = nextip; } List> r = new ArrayList<>(); @@ -1550,9 +1552,10 @@ public class SWF { if (ins instanceof ActionConstantPool) { constantPool = new ConstantPool(((ActionConstantPool) ins).constantPool); } + int staticOperation = (Boolean) Configuration.getConfig("autoDeobfuscate", true) ? Graph.SOP_SKIP_STATIC : Graph.SOP_USE_STATIC; try { - ins.translate(localData, stack, output); + ins.translate(localData, stack, output, staticOperation, path); } catch (Exception ex) { Logger.getLogger(SWF.class.getName()).log(Level.SEVERE, "Error during getting variables", ex); } @@ -1585,7 +1588,7 @@ public class SWF { @SuppressWarnings("unchecked") Stack brStack = (Stack) stack.clone(); if (b >= 0) { - getVariables(constantPool, localData, brStack, output, code, b, variables, functions, strings, visited, usageTypes); + getVariables(constantPool, localData, brStack, output, code, b, variables, functions, strings, visited, usageTypes, path); } else { if (debugMode) { System.out.println("Negative branch:" + b); @@ -1599,20 +1602,20 @@ public class SWF { }; } - private static void getVariables(List> variables, List functions, HashMap strings, HashMap usageType, ActionGraphSource code, int addr) { + private static void getVariables(List> variables, List functions, HashMap strings, HashMap usageType, ActionGraphSource code, int addr, String path) { List localData = Helper.toList(new HashMap(), new HashMap(), new HashMap()); try { - getVariables(null, localData, new Stack(), new ArrayList(), code, code.adr2pos(addr), variables, functions, strings, new ArrayList(), usageType); + getVariables(null, localData, new Stack(), new ArrayList(), code, code.adr2pos(addr), variables, functions, strings, new ArrayList(), usageType, path); } catch (Exception ex) { Logger.getLogger(SWF.class.getName()).log(Level.SEVERE, "Getting variables error", ex); } } - private List> getVariables(List> variables, List functions, HashMap strings, HashMap usageType, ASMSource src) { + private List> getVariables(List> variables, List functions, HashMap strings, HashMap usageType, ASMSource src, String path) { List> ret = new ArrayList<>(); List actions = src.getActions(version); actionsMap.put(src, actions); - getVariables(variables, functions, strings, usageType, new ActionGraphSource(actions, version, new HashMap(), new HashMap(), new HashMap()), 0); + getVariables(variables, functions, strings, usageType, new ActionGraphSource(actions, version, new HashMap(), new HashMap(), new HashMap()), 0, path); return ret; } private HashMap> actionsMap = new HashMap<>(); @@ -1630,7 +1633,7 @@ public class SWF { } processed.add(infPath2); informListeners("getVariables", infPath2); - getVariables(allVariableNames, allFunctions, allStrings, usageTypes, (ASMSource) o); + getVariables(allVariableNames, allFunctions, allStrings, usageTypes, (ASMSource) o, path); } if (o instanceof Container) { getVariables(((Container) o).getSubItems(), path + "/" + o.toString()); @@ -1822,7 +1825,8 @@ public class SWF { classNameParts = new String[]{className}; } } - List dec = Action.actionsToTree(dia.getActions(version), version); + int staticOperation = (Boolean) Configuration.getConfig("autoDeobfuscate", true) ? Graph.SOP_SKIP_STATIC : Graph.SOP_USE_STATIC; + List dec = Action.actionsToTree(dia.getActions(version), version, staticOperation, ""/*FIXME*/); GraphTargetItem name = null; for (GraphTargetItem it : dec) { if (it instanceof ClassTreeItem) { @@ -2004,7 +2008,7 @@ public class SWF { } } for (ASMSource src : actionsMap.keySet()) { - actionsMap.put(src, Action.removeNops(0, actionsMap.get(src), version, 0)); + actionsMap.put(src, Action.removeNops(0, actionsMap.get(src), version, 0, ""/*FIXME path*/)); src.setActions(actionsMap.get(src), version); } deobfuscateInstanceNames(renameType, tags, selected); diff --git a/trunk/src/com/jpexs/decompiler/flash/SWFInputStream.java b/trunk/src/com/jpexs/decompiler/flash/SWFInputStream.java index e3b62ee8a..7aff89a5e 100644 --- a/trunk/src/com/jpexs/decompiler/flash/SWFInputStream.java +++ b/trunk/src/com/jpexs/decompiler/flash/SWFInputStream.java @@ -30,6 +30,7 @@ import com.jpexs.decompiler.flash.action.treemodel.ConstantPool; import com.jpexs.decompiler.flash.action.treemodel.DirectValueTreeItem; import com.jpexs.decompiler.flash.ecma.EcmaScript; import com.jpexs.decompiler.flash.ecma.Null; +import com.jpexs.decompiler.flash.graph.Graph; import com.jpexs.decompiler.flash.graph.GraphSourceItem; import com.jpexs.decompiler.flash.graph.GraphSourceItemContainer; import com.jpexs.decompiler.flash.graph.GraphSourceItemPos; @@ -528,17 +529,17 @@ public class SWFInputStream extends InputStream { return ret; } - public List readActionList(List listeners, long address, long containerSWFOffset) throws IOException { + public List readActionList(List listeners, long address, long containerSWFOffset, String path) throws IOException { ReReadableInputStream rri = new ReReadableInputStream(this); - return readActionList(listeners, address, containerSWFOffset, rri, version, 0, -1); + return readActionList(listeners, address, containerSWFOffset, rri, version, 0, -1, path); } - public List readActionList(List listeners, long address, long containerSWFOffset, ReReadableInputStream rri, int maxlen) throws IOException { - return readActionList(listeners, address, containerSWFOffset, rri, version, rri.getPos(), rri.getPos() + maxlen); + public List readActionList(List listeners, long address, long containerSWFOffset, ReReadableInputStream rri, int maxlen, String path) throws IOException { + return readActionList(listeners, address, containerSWFOffset, rri, version, rri.getPos(), rri.getPos() + maxlen, path); } @SuppressWarnings("unchecked") - private static void getConstantPool(List listeners, ConstantPool cpool, List localData, Stack stack, List output, ActionGraphSource code, int ip, List constantPools, List visited, int version, int endIp) { + private static void getConstantPool(List listeners, ConstantPool cpool, List localData, Stack stack, List output, ActionGraphSource code, int ip, List constantPools, List visited, int version, int endIp, String path) { boolean debugMode = false; boolean deobfuscate = (Boolean) Configuration.getConfig("autoDeobfuscate", true); while (((endIp == -1) || (endIp > ip)) && (ip > -1) && ip < code.size()) { @@ -559,6 +560,7 @@ public class SWFInputStream extends InputStream { if (ins instanceof GraphSourceItemContainer) { GraphSourceItemContainer cnt = (GraphSourceItemContainer) ins; + String cntName = cnt.getName(); if (ins instanceof Action) { List> output2s = new ArrayList<>(); long endAddr = ((Action) ins).getAddress() + cnt.getHeaderSize(); @@ -570,7 +572,7 @@ public class SWFInputStream extends InputStream { List localData2 = Helper.toList(new HashMap(), new HashMap(), new HashMap()); List output2 = new ArrayList<>(); output2s.add(output2); - getConstantPool(listeners, cpool, localData2, new Stack(), output2, code, code.adr2pos(endAddr), constantPools, visited, version, code.adr2pos(endAddr + size)); + getConstantPool(listeners, cpool, localData2, new Stack(), output2, code, code.adr2pos(endAddr), constantPools, visited, version, code.adr2pos(endAddr + size), path + (cntName == null ? "" : "/" + cntName)); endAddr += size; } if (deobfuscate) { @@ -622,7 +624,7 @@ public class SWFInputStream extends InputStream { stack.push(new DirectValueTreeItem(null, 0, new Null(), new ArrayList())); } try { - ins.translate(localData, stack, output); + ins.translate(localData, stack, output, Graph.SOP_SKIP_STATIC, null); } catch (Exception ex) { Logger.getLogger(SWFInputStream.class.getName()).log(Level.SEVERE, "Error during getting constantpool", ex); } @@ -636,7 +638,7 @@ public class SWFInputStream extends InputStream { if (deobfuscate && (ins instanceof ActionIf) && !stack.isEmpty() && (stack.peek().isCompileTime() && (!stack.peek().hasSideEffect()))) { ActionIf aif = (ActionIf) ins; if (aif.ignoreUsed && (!aif.jumpUsed)) { - ins.setIgnored(true); + ins.setIgnored(true, 0); } if ((!aif.ignoreUsed) && aif.jumpUsed) { ActionJump jmpIns = new ActionJump(aif.getJumpOffset()); @@ -647,17 +649,18 @@ public class SWFInputStream extends InputStream { if ((aif.ignoreUsed && (!aif.jumpUsed)) || ((!aif.ignoreUsed) && aif.jumpUsed)) { List needed = stack.peek().getNeededSources(); for (GraphSourceItemPos ig : needed) { - if (ig.item instanceof ActionPush) { - if (!((ActionPush) ig.item).ignoredParts.contains(ig.pos)) { - ((ActionPush) ig.item).ignoredParts.add(ig.pos); + /*if (ig.item instanceof ActionPush) { + if (!((ActionPush) ig.item).ignoredParts.contains(ig.pos)) { + ((ActionPush) ig.item).ignoredParts.add(ig.pos); - if (((ActionPush) ig.item).ignoredParts.size() == ((ActionPush) ig.item).values.size()) { - ((Action) ig.item).setIgnored(true); - } - } - } else { - ((Action) ig.item).setIgnored(true); - } + if (((ActionPush) ig.item).ignoredParts.size() == ((ActionPush) ig.item).values.size()) { + ((Action) ig.item).setIgnored(true, 0); + } + } + } else { + + }*/ + ((Action) ig.item).setIgnored(true, ig.pos); } } boolean condition = EcmaScript.toBoolean(stack.peek().getResult()); @@ -669,7 +672,7 @@ public class SWFInputStream extends InputStream { } } stack.pop(); - getConstantPool(listeners, cpool, localData, stack, output, code, condition ? (code.adr2pos(((ActionIf) ins).getAddress() + ((ActionIf) ins).getBytes(code.version).length + ((ActionIf) ins).getJumpOffset())) : ip + 1, constantPools, visited, version, endIp); + getConstantPool(listeners, cpool, localData, stack, output, code, condition ? (code.adr2pos(((ActionIf) ins).getAddress() + ((ActionIf) ins).getBytes(code.version).length + ((ActionIf) ins).getJumpOffset())) : ip + 1, constantPools, visited, version, endIp, path); } else { if (deobfuscate && ins instanceof ActionIf) { stack.pop(); @@ -680,7 +683,7 @@ public class SWFInputStream extends InputStream { @SuppressWarnings("unchecked") Stack brStack = (Stack) stack.clone(); if (b >= 0) { - getConstantPool(listeners, cpool, localData, brStack, output, code, b, constantPools, visited, version, endIp); + getConstantPool(listeners, cpool, localData, brStack, output, code, b, constantPools, visited, version, endIp, path); } else { if (debugMode) { System.out.println("Negative branch:" + b); @@ -700,11 +703,11 @@ public class SWFInputStream extends InputStream { } } - public static List getConstantPool(List listeners, ActionGraphSource code, int addr, int version) { + public static List getConstantPool(List listeners, ActionGraphSource code, int addr, int version, String path) { List ret = new ArrayList<>(); List localData = Helper.toList(new HashMap(), new HashMap(), new HashMap()); try { - getConstantPool(listeners, null, localData, new Stack(), new ArrayList(), code, code.adr2pos(addr), ret, new ArrayList(), version, -1); + getConstantPool(listeners, null, localData, new Stack(), new ArrayList(), code, code.adr2pos(addr), ret, new ArrayList(), version, -1, path); } catch (Exception ex) { log.log(Level.SEVERE, "Error during getting constantpool", ex); } @@ -722,10 +725,11 @@ public class SWFInputStream extends InputStream { * @param version * @param containerSWFOffset * @param endip + * @param path * @return List of actions * @throws IOException */ - public static List readActionList(List listeners, long address, long containerSWFOffset, ReReadableInputStream rri, int version, int ip, int endip) throws IOException { + public static List readActionList(List listeners, long address, long containerSWFOffset, ReReadableInputStream rri, int version, int ip, int endip, String path) throws IOException { List retdups = new ArrayList<>(); ConstantPool cpool = new ConstantPool(); @@ -743,7 +747,7 @@ public class SWFInputStream extends InputStream { method = 2; goesPrev = readActionListAtPos(true, localData, stack, cpool, sis, rri, ip, retdups, ip); }*/ - goesPrev = readActionListAtPos(listeners, new ArrayList(), new HashMap>(), address, containerSWFOffset, false, true, localData, stack, cpool, sis, rri, ip, retdups, ip, endip); + goesPrev = readActionListAtPos(listeners, new ArrayList(), new HashMap>(), address, containerSWFOffset, false, true, localData, stack, cpool, sis, rri, ip, retdups, ip, endip, path); if (goesPrev) { } else { @@ -782,8 +786,8 @@ public class SWFInputStream extends InputStream { br.append(((Action) ret.get(i)).getASMSource(new ArrayList(), new ArrayList(), cpool.constants, version, false)); br.append("\r\n"); } - ret = Action.removeNops(0, ret, version, 0); - pools = getConstantPool(listeners, new ActionGraphSource(ret, version, new HashMap(), new HashMap(), new HashMap()), 0, version); + ret = Action.removeNops(0, ret, version, 0, path); + pools = getConstantPool(listeners, new ActionGraphSource(ret, version, new HashMap(), new HashMap(), new HashMap()), 0, version, path); if (pools.size() == 1) { Action.setConstantPool(ret, pools.get(0)); @@ -811,7 +815,7 @@ public class SWFInputStream extends InputStream { } @SuppressWarnings("unchecked") - private static boolean readActionListAtPos(List listeners, List output, HashMap> containers, long address, long containerSWFOffset, boolean notCompileTime, boolean enableVariables, List localData, Stack stack, ConstantPool cpool, SWFInputStream sis, ReReadableInputStream rri, int ip, List ret, int startIp, int endip) throws IOException { + private static boolean readActionListAtPos(List listeners, List output, HashMap> containers, long address, long containerSWFOffset, boolean notCompileTime, boolean enableVariables, List localData, Stack stack, ConstantPool cpool, SWFInputStream sis, ReReadableInputStream rri, int ip, List ret, int startIp, int endip, String path) throws IOException { boolean debugMode = false; boolean decideBranch = false; @@ -972,7 +976,7 @@ public class SWFInputStream extends InputStream { } if (((!enableVariables) || (!top.isVariableComputed())) && (!aif.jumpUsed)) { //a = new ActionNop(); - aif.setIgnored(true); + aif.setIgnored(true, 0); //a.setAddress(aif.getAddress(), SWF.DEFAULT_VERSION); } } @@ -987,11 +991,11 @@ public class SWFInputStream extends InputStream { ((ActionPush) ig.item).ignoredParts.add(ig.pos); if (((ActionPush) ig.item).ignoredParts.size() == ((ActionPush) ig.item).values.size()) { - ((Action) ig.item).setIgnored(true); + ((Action) ig.item).setIgnored(true, 0); } } } else { - ((Action) ig.item).setIgnored(true); + ((Action) ig.item).setIgnored(true, 0); } } } @@ -1017,7 +1021,7 @@ public class SWFInputStream extends InputStream { if ((a instanceof ActionStoreRegister) && stack.isEmpty()) { stack.push(new DirectValueTreeItem(null, 0, new Null(), new ArrayList())); } - a.translate(localData, stack, output); + a.translate(localData, stack, output, Graph.SOP_SKIP_STATIC, path); } } } catch (RuntimeException ex) { @@ -1053,6 +1057,7 @@ public class SWFInputStream extends InputStream { } containers.get(endAddr).add((ActionContainer)a); */ + String cntName = cnt.getName(); List> output2s = new ArrayList<>(); for (long size : cnt.getContainerSizes()) { if (size == 0) { @@ -1061,7 +1066,7 @@ public class SWFInputStream extends InputStream { } List localData2 = Helper.toList(new HashMap(), new HashMap(), new HashMap()); List output2 = new ArrayList<>(); - readActionListAtPos(listeners, output2, containers, address, containerSWFOffset, notCompileTime, enableVariables, localData2, new Stack(), cpool, sis, rri, (int) endAddr, ret, startIp, (int) (endAddr + size)); + readActionListAtPos(listeners, output2, containers, address, containerSWFOffset, notCompileTime, enableVariables, localData2, new Stack(), cpool, sis, rri, (int) endAddr, ret, startIp, (int) (endAddr + size), path + (cntName == null ? "" : "/" + cntName)); output2s.add(output2); endAddr += size; } @@ -1096,7 +1101,7 @@ public class SWFInputStream extends InputStream { int oldPos = rri.getPos(); @SuppressWarnings("unchecked") Stack substack = (Stack) stack.clone(); - if (readActionListAtPos(listeners, output, containers, address, containerSWFOffset, true, enableVariables, localData, substack, cpool, sis, rri, rri.getPos() + aif.getJumpOffset(), ret, startIp, endip)) { + if (readActionListAtPos(listeners, output, containers, address, containerSWFOffset, true, enableVariables, localData, substack, cpool, sis, rri, rri.getPos() + aif.getJumpOffset(), ret, startIp, endip, path)) { retv = true; } rri.setPos(oldPos); diff --git a/trunk/src/com/jpexs/decompiler/flash/TagNode.java b/trunk/src/com/jpexs/decompiler/flash/TagNode.java index df0a65195..cfb27d26f 100644 --- a/trunk/src/com/jpexs/decompiler/flash/TagNode.java +++ b/trunk/src/com/jpexs/decompiler/flash/TagNode.java @@ -276,7 +276,7 @@ public class TagNode { } else { List as = asm.getActions(SWF.DEFAULT_VERSION); Action.setActionsAddresses(as, 0, SWF.DEFAULT_VERSION); - res = asm.getActionSourcePrefix() + Helper.indentRows(asm.getActionSourceIndent(), Highlighting.stripHilights(Action.actionsToSource(as, SWF.DEFAULT_VERSION)), Graph.INDENT_STRING) + asm.getActionSourceSuffix(); + res = asm.getActionSourcePrefix() + Helper.indentRows(asm.getActionSourceIndent(), Highlighting.stripHilights(Action.actionsToSource(as, SWF.DEFAULT_VERSION, ""/*FIXME*/)), Graph.INDENT_STRING) + asm.getActionSourceSuffix(); } try (FileOutputStream fos = new FileOutputStream(f)) { fos.write(res.getBytes("utf-8")); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/ABC.java b/trunk/src/com/jpexs/decompiler/flash/abc/ABC.java index 931086f13..2cd962763 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/ABC.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/ABC.java @@ -80,7 +80,7 @@ public class ABC { public int removeTraps() { int rem = 0; for (int s = 0; s < script_info.length; s++) { - rem += script_info[s].removeTraps(s, this); + rem += script_info[s].removeTraps(s, this, ""); } return rem; } @@ -1091,15 +1091,11 @@ public class ABC { return -1; } - public ScriptPack findScriptTraitByPath(String name) { - for (int c = 0; c < script_info.length; c++) { - for (int t = 0; t < script_info[c].traits.traits.length; t++) { - Trait tr = script_info[c].traits.traits[t]; - if (tr.getPath(this).equals(name)) { - List indices = new ArrayList<>(); - indices.add(t); - return new ScriptPack(this, c, indices); - } + public ScriptPack findScriptPackByPath(String name) { + List> packs = getScriptPacks(); + for (MyEntry en : packs) { + if (en.key.toString().equals(name)) { + return en.value; } } return null; diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/ScriptPack.java b/trunk/src/com/jpexs/decompiler/flash/abc/ScriptPack.java index ee437d92f..2ba0b8a52 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/ScriptPack.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/ScriptPack.java @@ -35,11 +35,17 @@ public class ScriptPack { public ABC abc; public int scriptIndex; public List traitIndices; + private ClassPath path; - public ScriptPack(ABC abc, int scriptIndex, List traitIndices) { + public ClassPath getPath() { + return path; + } + + public ScriptPack(ClassPath path, ABC abc, int scriptIndex, List traitIndices) { this.abc = abc; this.scriptIndex = scriptIndex; this.traitIndices = traitIndices; + this.path = path; } public String getPathPackage() { @@ -66,20 +72,19 @@ public class ScriptPack { return scriptName; } - public String getPath() { - String packageName = ""; - String scriptName = ""; - for (int t : traitIndices) { - Multiname name = abc.script_info[scriptIndex].traits.traits[t].getName(abc); - Namespace ns = name.getNamespace(abc.constants); - if ((ns.kind == Namespace.KIND_PACKAGE) || (ns.kind == Namespace.KIND_PACKAGE_INTERNAL)) { - packageName = ns.getName(abc.constants); - scriptName = name.getName(abc.constants, new ArrayList()); - } - } - return packageName.equals("") ? scriptName : packageName + "." + scriptName; - } - + /*public String getPath() { + String packageName = ""; + String scriptName = ""; + for (int t : traitIndices) { + Multiname name = abc.script_info[scriptIndex].traits.traits[t].getName(abc); + Namespace ns = name.getNamespace(abc.constants); + if ((ns.kind == Namespace.KIND_PACKAGE) || (ns.kind == Namespace.KIND_PACKAGE_INTERNAL)) { + packageName = ns.getName(abc.constants); + scriptName = name.getName(abc.constants, new ArrayList()); + } + } + return packageName.equals("") ? scriptName : packageName + "." + scriptName; + }*/ private static String makeDirPath(String packageName) { if (packageName.equals("")) { return ""; diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Code.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Code.java index 32dcd95dd..dfda6c23b 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Code.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Code.java @@ -58,7 +58,6 @@ import com.jpexs.decompiler.flash.ecma.EcmaScript; import com.jpexs.decompiler.flash.graph.Graph; import com.jpexs.decompiler.flash.graph.GraphPart; import com.jpexs.decompiler.flash.graph.GraphSourceItem; -import com.jpexs.decompiler.flash.graph.GraphSourceItemPos; import com.jpexs.decompiler.flash.graph.GraphTargetItem; import com.jpexs.decompiler.flash.helpers.Helper; import com.jpexs.decompiler.flash.helpers.Highlighting; @@ -775,9 +774,22 @@ public class AVM2Code implements Serializable { } } else { if (!ins.isIgnored()) { - t = ins.toStringNoAddress(constants, new ArrayList()); - if (ins.changeJumpTo > -1) { - t = ins.definition.instructionName + " ofs" + Helper.formatAddress(pos2adr(ins.changeJumpTo)); + int fixBranch = ins.getFixBranch(); + if (fixBranch > -1) { + if (ins.definition instanceof IfTypeIns) { + t = new PopIns().instructionName + "\n"; + if (fixBranch == 0) { //jump + t = new JumpIns().instructionName + " ofs" + Helper.formatAddress(ofs + ins.getBytes().length + ins.operands[0]); + } else { + //nojump, ignore + } + } + //TODO: lookupswitch ? + } else { + t = ins.toStringNoAddress(constants, new ArrayList()); + if (ins.changeJumpTo > -1) { + t = ins.definition.instructionName + " ofs" + Helper.formatAddress(pos2adr(ins.changeJumpTo)); + } } if (markOffsets) { t = Highlighting.hilighOffset("", ins.mappedOffset > -1 ? ins.mappedOffset : ofs) + t + "\n"; @@ -885,7 +897,7 @@ public class AVM2Code implements Serializable { return pos2adr(fixIPAfterDebugLine(adr2pos(addr))); } - public ConvertOutput toSourceOutput(GraphPart part, boolean processJumps, boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, Stack scopeStack, ABC abc, ConstantPool constants, MethodInfo method_info[], MethodBody body, int start, int end, HashMap localRegNames, List fullyQualifiedNames, boolean visited[]) throws ConvertException { + public ConvertOutput toSourceOutput(String path, GraphPart part, boolean processJumps, boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, Stack scopeStack, ABC abc, ConstantPool constants, MethodInfo method_info[], MethodBody body, int start, int end, HashMap localRegNames, List fullyQualifiedNames, boolean visited[]) throws ConvertException { boolean debugMode = DEBUG_MODE; if (debugMode) { System.out.println("OPEN SubSource:" + start + "-" + end + " " + code.get(start).toString() + " to " + code.get(end).toString()); @@ -992,12 +1004,12 @@ public class AVM2Code implements Serializable { AVM2Instruction insAfter = code.get(ip + 1); if ((insAfter.definition instanceof GetLocalTypeIns) && (((GetLocalTypeIns) insAfter.definition).getRegisterId(insAfter) == ((SetLocalTypeIns) ins.definition).getRegisterId(ins))) { GraphTargetItem before = stack.peek(); - ins.definition.translate(isStatic, scriptIndex, classIndex, localRegs, stack, scopeStack, constants, ins, method_info, output, body, abc, localRegNames, fullyQualifiedNames); + ins.definition.translate(isStatic, scriptIndex, classIndex, localRegs, stack, scopeStack, constants, ins, method_info, output, body, abc, localRegNames, fullyQualifiedNames, path); stack.push(before); ip += 2; continue iploop; } else { - ins.definition.translate(isStatic, scriptIndex, classIndex, localRegs, stack, scopeStack, constants, ins, method_info, output, body, abc, localRegNames, fullyQualifiedNames); + ins.definition.translate(isStatic, scriptIndex, classIndex, localRegs, stack, scopeStack, constants, ins, method_info, output, body, abc, localRegNames, fullyQualifiedNames, path); ip++; continue iploop; } @@ -1035,7 +1047,7 @@ public class AVM2Code implements Serializable { if (((GetLocalTypeIns) code.get(t).definition).getRegisterId(code.get(t)) == reg) { if (code.get(t + 1).definition instanceof KillIns) { if (code.get(t + 1).operands[0] == reg) { - ConvertOutput assignment = toSourceOutput(part, processJumps, isStatic, scriptIndex, classIndex, localRegs, stack, scopeStack, abc, constants, method_info, body, ip + 2, t - 1, localRegNames, fullyQualifiedNames, visited); + ConvertOutput assignment = toSourceOutput(path, part, processJumps, isStatic, scriptIndex, classIndex, localRegs, stack, scopeStack, abc, constants, method_info, body, ip + 2, t - 1, localRegNames, fullyQualifiedNames, visited); GraphTargetItem tar = assignment.output.remove(assignment.output.size() - 1); tar.firstPart = part; stack.push(tar); @@ -1049,6 +1061,9 @@ public class AVM2Code implements Serializable { if (!isKilled(reg, 0, end)) { for (int i = ip; i >= start; i--) { if (code.get(i).definition instanceof DupIns) { + if (stack.isEmpty()) { + break;//FIXME?o + } GraphTargetItem v = stack.pop(); stack.push(new LocalRegTreeItem(ins, reg, v)); stack.push(v); @@ -1057,21 +1072,21 @@ public class AVM2Code implements Serializable { } } } else { - ins.definition.translate(isStatic, scriptIndex, classIndex, localRegs, stack, scopeStack, constants, ins, method_info, output, body, abc, localRegNames, fullyQualifiedNames); + ins.definition.translate(isStatic, scriptIndex, classIndex, localRegs, stack, scopeStack, constants, ins, method_info, output, body, abc, localRegNames, fullyQualifiedNames, path); } ip++; break; //} } else { - ins.definition.translate(isStatic, scriptIndex, classIndex, localRegs, stack, scopeStack, constants, ins, method_info, output, body, abc, localRegNames, fullyQualifiedNames); + ins.definition.translate(isStatic, scriptIndex, classIndex, localRegs, stack, scopeStack, constants, ins, method_info, output, body, abc, localRegNames, fullyQualifiedNames, path); ip++; break; //throw new ConvertException("Unknown pattern after DUP:" + insComparsion.toString()); } } while (ins.definition instanceof DupIns); } else if ((ins.definition instanceof ReturnValueIns) || (ins.definition instanceof ReturnVoidIns) || (ins.definition instanceof ThrowIns)) { - ins.definition.translate(isStatic, scriptIndex, classIndex, localRegs, stack, scopeStack, constants, ins, method_info, output, body, abc, localRegNames, fullyQualifiedNames); + ins.definition.translate(isStatic, scriptIndex, classIndex, localRegs, stack, scopeStack, constants, ins, method_info, output, body, abc, localRegNames, fullyQualifiedNames, path); //ip = end + 1; break; } else if (ins.definition instanceof NewFunctionIns) { @@ -1107,12 +1122,12 @@ public class AVM2Code implements Serializable { } } //What to do when hasDup is false? - ins.definition.translate(isStatic, scriptIndex, classIndex, localRegs, stack, scopeStack, constants, ins, method_info, output, body, abc, localRegNames, fullyQualifiedNames); + ins.definition.translate(isStatic, scriptIndex, classIndex, localRegs, stack, scopeStack, constants, ins, method_info, output, body, abc, localRegNames, fullyQualifiedNames, path); NewFunctionTreeItem nft = (NewFunctionTreeItem) stack.peek(); nft.functionName = functionName; ip++; } else { - ins.definition.translate(isStatic, scriptIndex, classIndex, localRegs, stack, scopeStack, constants, ins, method_info, output, body, abc, localRegNames, fullyQualifiedNames); + ins.definition.translate(isStatic, scriptIndex, classIndex, localRegs, stack, scopeStack, constants, ins, method_info, output, body, abc, localRegNames, fullyQualifiedNames, path); ip++; //addr = pos2adr(ip); @@ -1139,8 +1154,8 @@ public class AVM2Code implements Serializable { return ret.toString(); } - public String toSource(String path, boolean isStatic, int scriptIndex, int classIndex, ABC abc, ConstantPool constants, MethodInfo method_info[], MethodBody body, HashMap localRegNames, Stack scopeStack, boolean isStaticInitializer, List fullyQualifiedNames, Traits initTraits) { - return toSource(path, isStatic, scriptIndex, classIndex, abc, constants, method_info, body, false, localRegNames, scopeStack, isStaticInitializer, fullyQualifiedNames, initTraits); + public String toSource(String path, boolean isStatic, int scriptIndex, int classIndex, ABC abc, ConstantPool constants, MethodInfo method_info[], MethodBody body, HashMap localRegNames, Stack scopeStack, boolean isStaticInitializer, List fullyQualifiedNames, Traits initTraits, int staticOperation) { + return toSource(path, isStatic, scriptIndex, classIndex, abc, constants, method_info, body, false, localRegNames, scopeStack, isStaticInitializer, fullyQualifiedNames, initTraits, staticOperation); } public int getRegisterCount() { @@ -1210,7 +1225,7 @@ public class AVM2Code implements Serializable { ignoredIns = new ArrayList<>(); } - public String toSource(String path, boolean isStatic, int scriptIndex, int classIndex, ABC abc, ConstantPool constants, MethodInfo method_info[], MethodBody body, boolean hilighted, HashMap localRegNames, Stack scopeStack, boolean isStaticInitializer, List fullyQualifiedNames, Traits initTraits) { + public String toSource(String path, boolean isStatic, int scriptIndex, int classIndex, ABC abc, ConstantPool constants, MethodInfo method_info[], MethodBody body, boolean hilighted, HashMap localRegNames, Stack scopeStack, boolean isStaticInitializer, List fullyQualifiedNames, Traits initTraits, int staticOperation) { initToSource(); List list; String s; @@ -1221,7 +1236,7 @@ public class AVM2Code implements Serializable { //try { try { - list = AVM2Graph.translateViaGraph(path, this, abc, body, isStatic, scriptIndex, classIndex, localRegs, scopeStack, localRegNames, fullyQualifiedNames); + list = AVM2Graph.translateViaGraph(path, this, abc, body, isStatic, scriptIndex, classIndex, localRegs, scopeStack, localRegNames, fullyQualifiedNames, staticOperation); } catch (Exception | OutOfMemoryError | StackOverflowError ex2) { Logger.getLogger(AVM2Code.class.getName()).log(Level.SEVERE, "Decompilation error in " + path, ex2); if (ex2 instanceof OutOfMemoryError) { @@ -1434,7 +1449,7 @@ public class AVM2Code implements Serializable { code.add(pos, instruction); } - public int removeTraps(ConstantPool constants, MethodBody body, ABC abc, int scriptIndex, int classIndex, boolean isStatic) { + public int removeTraps(ConstantPool constants, MethodBody body, ABC abc, int scriptIndex, int classIndex, boolean isStatic, String path) { removeDeadCode(constants, body); List localData = new ArrayList<>(); localData.add((Boolean) isStatic); //isStatic @@ -1452,7 +1467,7 @@ public class AVM2Code implements Serializable { localData.add(new ArrayList()); localData.add((Integer) (scriptIndex)); int ret = 0; - ret += removeTraps(localData, new AVM2GraphSource(this, false, -1, -1, new HashMap(), new Stack(), abc, body, new HashMap(), new ArrayList()), 0); + ret += removeTraps(localData, new AVM2GraphSource(this, false, -1, -1, new HashMap(), new Stack(), abc, body, new HashMap(), new ArrayList()), 0, path); removeIgnored(constants, body); removeDeadCode(constants, body); @@ -1557,6 +1572,9 @@ public class AVM2Code implements Serializable { private void visitCode(int ip, int lastIp, HashMap> refs) { while (ip < code.size()) { + if (!refs.containsKey(ip)) { + refs.put(ip, new ArrayList()); + } refs.get(ip).add(lastIp); lastIp = ip; if (refs.get(ip).size() > 1) { @@ -1982,7 +2000,7 @@ public class AVM2Code implements Serializable { } @SuppressWarnings("unchecked") - private static int removeTraps(boolean secondPass, boolean useVisited, List localData, Stack stack, List output, AVM2GraphSource code, int ip, HashMap visited, HashMap> visitedStates, HashMap decisions) { + private static int removeTraps(HashMap> refs, boolean secondPass, boolean useVisited, List localData, Stack stack, List output, AVM2GraphSource code, int ip, HashMap visited, HashMap> visitedStates, HashMap decisions, String path) { boolean debugMode = false; int ret = 0; iploop: @@ -2009,6 +2027,17 @@ public class AVM2Code implements Serializable { visitedStates.put(ip, (HashMap) currentState.clone()); } + + List r = refs.get(ip); + if (r != null) { + if (r.size() > 1) { + if (!stack.isEmpty()) { + GraphTargetItem it = stack.pop(); + stack.push(new NotCompileTimeTreeItem(null, it)); + } + } + } + GraphSourceItem ins = code.get(ip); if (ins instanceof AVM2Instruction) { @@ -2016,12 +2045,12 @@ public class AVM2Code implements Serializable { //Errorneous code inserted by some obfuscators if (ains.definition instanceof NewObjectIns) { if (ains.operands[0] > stack.size()) { - ains.setIgnored(true); + ains.setIgnored(true, 0); } } if (ains.definition instanceof NewArrayIns) { if (ains.operands[0] > stack.size()) { - ains.setIgnored(true); + ains.setIgnored(true, 0); } } } @@ -2034,21 +2063,21 @@ public class AVM2Code implements Serializable { System.out.println((useVisited ? "useV " : "") + (secondPass ? "secondPass " : "") + "Visit " + ip + ": " + ins + " stack:" + Highlighting.stripHilights(stack.toString())); } if (secondPass) { - if ((ins instanceof AVM2Instruction) && (((AVM2Instruction) ins).definition instanceof PopIns)) { - GraphTargetItem top = stack.peek(); - for (GraphSourceItemPos p : top.getNeededSources()) { - if (p == null) { - continue; - } - if (p.item == null) { - continue; - } - if (p.item.isIgnored()) { - ins.setIgnored(true); - break; - } - } - } + /*if ((ins instanceof AVM2Instruction) && (((AVM2Instruction) ins).definition instanceof PopIns)) { + GraphTargetItem top = stack.peek(); + for (GraphSourceItemPos p : top.getNeededSources()) { + if (p == null) { + continue; + } + if (p.item == null) { + continue; + } + if (p.item.isIgnored()) { + ins.setIgnored(true, 0); + break; + } + } + }*/ } @@ -2056,7 +2085,7 @@ public class AVM2Code implements Serializable { if ((ins instanceof AVM2Instruction) && (((AVM2Instruction) ins).definition instanceof NewFunctionIns)) { stack.push(new BooleanTreeItem(null, true)); } else { - ins.translate(localData, stack, output); + ins.translate(localData, stack, output, Graph.SOP_USE_STATIC, path); } @@ -2068,54 +2097,7 @@ public class AVM2Code implements Serializable { if (ins.isBranch() || ins.isJump()) { List branches = ins.getBranches(code); - //TODO: handle switch somehow, this way it does not work - /*if ((ins instanceof AVM2Instruction) && (((AVM2Instruction) ins).definition instanceof LookupSwitchIns) - && (!stack.isEmpty()) && (stack.peek().isCompileTime()) && (!stack.peek().hasSideEffect())) { - int c = (int) (double) EcmaScript.toNumber(stack.peek().getResult()); - Decision dec = new Decision(); - if (decisions.containsKey(ins)) { - dec = decisions.get(ins); - } else { - decisions.put(ins, dec); - } - dec.casesUsed.add(c); - GraphTargetItem tar = stack.pop(); - - int numcases = branches.size() - 1; - int selCase = -1; - if (c < 0 || c >= numcases) { - selCase = 0; - } else { - selCase = 1 + c; - } - - if (secondPass) { - if (dec.casesUsed.size() == 1) { - int sel = -1; - for (int u : dec.casesUsed) { - sel = u; - } - int selOperand = -1; - if (sel < 0 || sel >= numcases) { - selOperand = 0; - } else { - selOperand = 2 + sel; - } - AVM2Instruction ains = (AVM2Instruction) ins; - if (ains.replaceWith == null) { - ains.replaceWith = new ArrayList<>(); - } - ains.replaceWith.add(new ControlFlowTag("appendjump", code.adr2pos(code.pos2adr(ip) + ((AVM2Instruction) ins).operands[selOperand]))); - for (GraphSourceItemPos pos : tar.getNeededSources()) { - if (pos.item != ins) { - pos.item.setIgnored(true); - } - } - } - } - ip = branches.get(selCase); - continue; - } else */ if ((ins instanceof AVM2Instruction) && ((AVM2Instruction) ins).definition instanceof IfTypeIns + if ((ins instanceof AVM2Instruction) && ((AVM2Instruction) ins).definition instanceof IfTypeIns && (!(((AVM2Instruction) ins).definition instanceof JumpIns)) && (!stack.isEmpty()) && (stack.peek().isCompileTime()) && (!stack.peek().hasSideEffect())) { boolean condition = EcmaScript.toBoolean(stack.peek().getResult()); if (debugMode) { @@ -2137,30 +2119,38 @@ public class AVM2Code implements Serializable { dec.skipUsed = true; } - if (secondPass) { - if (condition && (dec.jumpUsed) && (!dec.skipUsed)) { - ((AVM2Instruction) ins).definition = new JumpIns(); - } - if ((!condition) && (!dec.jumpUsed) && (dec.skipUsed)) { - ins.setIgnored(true); + if (branches.size() > 1) { + if (secondPass) { + if (condition && (dec.jumpUsed) && (!dec.skipUsed)) { + ins.setFixBranch(0); + //((AVM2Instruction) ins).definition = new JumpIns(); + } + if ((!condition) && (!dec.jumpUsed) && (dec.skipUsed)) { + ins.setFixBranch(1); + //ins.setIgnored(true, 0); + } } } GraphTargetItem tar = stack.pop(); - if (secondPass && (dec.jumpUsed != dec.skipUsed)) { - for (GraphSourceItemPos pos : tar.getNeededSources()) { - if (pos.item instanceof AVM2Instruction) { - if (((AVM2Instruction) pos.item).definition instanceof DupIns) { - pos.item.setIgnored(true); - break; - } - } - if (pos.item != ins) { - pos.item.setIgnored(true); - } - } + /*if (secondPass && (dec.jumpUsed != dec.skipUsed)) { + for (GraphSourceItemPos pos : tar.getNeededSources()) { + if (pos.item instanceof AVM2Instruction) { + if (((AVM2Instruction) pos.item).definition instanceof DupIns) { + pos.item.setIgnored(true, 0); + break; + } + } + if (pos.item != ins) { + pos.item.setIgnored(true, 0); + } + } + }*/ + if (branches.size() == 1) { + ip = branches.get(0); + } else { + ip = condition ? branches.get(0) : branches.get(1); } - ip = condition ? branches.get(0) : branches.get(1); continue; } else { if (ins.isBranch() && (!ins.isJump())) { @@ -2179,7 +2169,7 @@ public class AVM2Code implements Serializable { for (int b : branches) { Stack brStack = (Stack) stack.clone(); if (b >= 0) { - ret += removeTraps(secondPass, useVisited || (!ins.isJump()), localData, brStack, output, code, b, visited, visitedStates, decisions); + ret += removeTraps(refs, secondPass, useVisited || (!ins.isJump()), localData, brStack, output, code, b, visited, visitedStates, decisions, path); } else { if (debugMode) { System.out.println("Negative branch:" + b); @@ -2197,10 +2187,16 @@ public class AVM2Code implements Serializable { return ret; } - public static int removeTraps(List localData, AVM2GraphSource code, int addr) { + public static int removeTraps(List localData, AVM2GraphSource code, int addr, String path) { HashMap decisions = new HashMap<>(); - removeTraps(false, false, localData, new Stack(), new ArrayList(), code, code.adr2pos(addr), new HashMap(), new HashMap>(), decisions); + HashMap> refs = new HashMap<>(); + code.getCode().visitCode(0, code.size() - 1, refs); + removeTraps(refs, false, false, localData, new Stack(), new ArrayList(), code, code.adr2pos(addr), new HashMap(), new HashMap>(), decisions, path); localData.set(2, new HashMap()); - return removeTraps(true, false, localData, new Stack(), new ArrayList(), code, code.adr2pos(addr), new HashMap(), new HashMap>(), decisions); + return removeTraps(refs, true, false, localData, new Stack(), new ArrayList(), code, code.adr2pos(addr), new HashMap(), new HashMap>(), decisions, path); } + /*public static int removeTraps(List localData, AVM2GraphSource code, int addr) { + AVM2Graph.translateViaGraph(localData, "", code, new ArrayList(), Graph.SOP_REMOVE_STATIC); + return 1; + }*/ } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2Graph.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2Graph.java index 9f3ba2930..7df3a743f 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2Graph.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2Graph.java @@ -111,7 +111,7 @@ public class AVM2Graph extends Graph { public static final int DATA_FINALLYJUMPS = 11; public static final int DATA_IGNOREDSWITCHES = 12; - public static List translateViaGraph(String path, AVM2Code code, ABC abc, MethodBody body, boolean isStatic, int scriptIndex, int classIndex, HashMap localRegs, Stack scopeStack, HashMap localRegNames, List fullyQualifiedNames) { + public static List translateViaGraph(String path, AVM2Code code, ABC abc, MethodBody body, boolean isStatic, int scriptIndex, int classIndex, HashMap localRegs, Stack scopeStack, HashMap localRegNames, List fullyQualifiedNames, int staticOperation) { AVM2Graph g = new AVM2Graph(code, abc, body, isStatic, scriptIndex, classIndex, localRegs, scopeStack, localRegNames, fullyQualifiedNames); g.init(); List allParts = new ArrayList<>(); @@ -133,7 +133,7 @@ public class AVM2Graph extends Graph { localData.add(new ArrayList()); localData.add(new ArrayList()); localData.add((Integer) scriptIndex); - return g.translate(localData); + return g.translate(localData, staticOperation, path); } @Override @@ -179,7 +179,7 @@ public class AVM2Graph extends Graph { } @Override - protected List check(GraphSource srcCode, List localData, List allParts, Stack stack, GraphPart parent, GraphPart part, List stopPart, List loops, List output, Loop currentLoop) { + protected List check(GraphSource code, List localData, List allParts, Stack stack, GraphPart parent, GraphPart part, List stopPart, List loops, List output, Loop currentLoop, int staticOperation, String path) { List ret = null; @@ -191,17 +191,17 @@ public class AVM2Graph extends Graph { @SuppressWarnings("unchecked") List ignoredSwitches = (List) localData.get(DATA_IGNOREDSWITCHES); int ip = part.start; - int addr = code.fixAddrAfterDebugLine(code.pos2adr(part.start)); + int addr = this.code.fixAddrAfterDebugLine(this.code.pos2adr(part.start)); int maxend = -1; List catchedExceptions = new ArrayList<>(); for (int e = 0; e < body.exceptions.length; e++) { - if (addr == code.fixAddrAfterDebugLine(body.exceptions[e].start)) { + if (addr == this.code.fixAddrAfterDebugLine(body.exceptions[e].start)) { if (!body.exceptions[e].isFinally()) { if (((body.exceptions[e].end) > maxend) && (!parsedExceptions.contains(body.exceptions[e]))) { catchedExceptions.clear(); - maxend = code.fixAddrAfterDebugLine(body.exceptions[e].end); + maxend = this.code.fixAddrAfterDebugLine(body.exceptions[e].end); catchedExceptions.add(body.exceptions[e]); - } else if (code.fixAddrAfterDebugLine(body.exceptions[e].end) == maxend) { + } else if (this.code.fixAddrAfterDebugLine(body.exceptions[e].end) == maxend) { catchedExceptions.add(body.exceptions[e]); } } @@ -212,18 +212,19 @@ public class AVM2Graph extends Graph { //currentLoop.phase=0; }*/ parsedExceptions.addAll(catchedExceptions); - int endpos = code.adr2pos(code.fixAddrAfterDebugLine(catchedExceptions.get(0).end)); + int endpos = code.adr2pos(this.code.fixAddrAfterDebugLine(catchedExceptions.get(0).end)); int endposStartBlock = code.adr2pos(catchedExceptions.get(0).end); List> catchedCommands = new ArrayList<>(); - if (code.code.get(endpos).definition instanceof JumpIns) { - int afterCatchAddr = code.pos2adr(endpos + 1) + code.code.get(endpos).operands[0]; - int afterCatchPos = code.adr2pos(afterCatchAddr); + if (this.code.code.get(endpos).definition instanceof JumpIns) { + int afterCatchAddr = this.code.pos2adr(endpos + 1) + this.code.code.get(endpos).operands[0]; + int afterCatchPos = this.code.adr2pos(afterCatchAddr); + final AVM2Graph t = this; Collections.sort(catchedExceptions, new Comparator() { @Override public int compare(ABCException o1, ABCException o2) { - return code.fixAddrAfterDebugLine(o1.target) - code.fixAddrAfterDebugLine(o2.target); + return t.code.fixAddrAfterDebugLine(o1.target) - t.code.fixAddrAfterDebugLine(o2.target); } }); @@ -232,11 +233,11 @@ public class AVM2Graph extends Graph { int returnPos = afterCatchPos; for (int e = 0; e < body.exceptions.length; e++) { if (body.exceptions[e].isFinally()) { - if (addr == code.fixAddrAfterDebugLine(body.exceptions[e].start)) { - if (afterCatchPos + 1 == code.adr2pos(code.fixAddrAfterDebugLine(body.exceptions[e].end))) { - AVM2Instruction jmpIns = code.code.get(code.adr2pos(code.fixAddrAfterDebugLine(body.exceptions[e].end))); + if (addr == this.code.fixAddrAfterDebugLine(body.exceptions[e].start)) { + if (afterCatchPos + 1 == code.adr2pos(this.code.fixAddrAfterDebugLine(body.exceptions[e].end))) { + AVM2Instruction jmpIns = this.code.code.get(code.adr2pos(this.code.fixAddrAfterDebugLine(body.exceptions[e].end))); if (jmpIns.definition instanceof JumpIns) { - int finStart = code.adr2pos(code.fixAddrAfterDebugLine(body.exceptions[e].end) + jmpIns.getBytes().length + jmpIns.operands[0]); + int finStart = code.adr2pos(this.code.fixAddrAfterDebugLine(body.exceptions[e].end) + jmpIns.getBytes().length + jmpIns.operands[0]); boolean switchFound = false; GraphPart fpart = null; @@ -246,9 +247,9 @@ public class AVM2Graph extends Graph { break; } } - for (int f = finStart; f < code.code.size(); f++) { - if (code.code.get(f).definition instanceof LookupSwitchIns) { - AVM2Instruction swins = code.code.get(f); + for (int f = finStart; f < this.code.code.size(); f++) { + if (this.code.code.get(f).definition instanceof LookupSwitchIns) { + AVM2Instruction swins = this.code.code.get(f); if (swins.operands.length >= 3) { if (swins.operands[0] == swins.getBytes().length) { if (code.adr2pos(code.pos2adr(f) + swins.operands[2]) < finStart) { @@ -260,11 +261,11 @@ public class AVM2Graph extends Graph { break; } } - //code.code.get(f).ignored = true; + //this.code.code.get(f).ignored = true; ignoredSwitches.add(f); List stopPart2 = new ArrayList<>(stopPart); stopPart2.add(fepart); - finallyCommands = printGraph(new ArrayList(), localData, stack, allParts, parent, fpart, stopPart2, loops); + finallyCommands = printGraph(new ArrayList(), localData, stack, allParts, parent, fpart, stopPart2, loops, staticOperation, path); returnPos = f + 1; break; } @@ -273,7 +274,7 @@ public class AVM2Graph extends Graph { } } if (!switchFound) { - finallyCommands = printGraph(new ArrayList(), localData, stack, allParts, parent, fpart, null, loops); + finallyCommands = printGraph(new ArrayList(), localData, stack, allParts, parent, fpart, null, loops, staticOperation, path); } finallyJumps.add(finStart); break; @@ -286,7 +287,7 @@ public class AVM2Graph extends Graph { for (int e = 0; e < catchedExceptions.size(); e++) { int eendpos; if (e < catchedExceptions.size() - 1) { - eendpos = code.adr2pos(code.fixAddrAfterDebugLine(catchedExceptions.get(e + 1).target)) - 2; + eendpos = code.adr2pos(this.code.fixAddrAfterDebugLine(catchedExceptions.get(e + 1).target)) - 2; } else { eendpos = afterCatchPos - 1; } @@ -314,7 +315,7 @@ public class AVM2Graph extends Graph { localData2.set(DATA_SCOPESTACK, new Stack()); List stopPart2 = new ArrayList<>(stopPart); stopPart2.add(nepart); - catchedCommands.add(printGraph(new ArrayList(), localData2, stack, allParts, parent, npart, stopPart2, loops)); + catchedCommands.add(printGraph(new ArrayList(), localData2, stack, allParts, parent, npart, stopPart2, loops, staticOperation, path)); } GraphPart nepart = null; @@ -328,7 +329,7 @@ public class AVM2Graph extends Graph { List stopPart2 = new ArrayList<>(stopPart); stopPart2.add(nepart); stopPart2.addAll(catchParts); - List tryCommands = printGraph(new ArrayList(), localData, stack, allParts, parent, part, stopPart2, loops); + List tryCommands = printGraph(new ArrayList(), localData, stack, allParts, parent, part, stopPart2, loops, staticOperation, path); output.clear(); output.add(new TryTreeItem(tryCommands, catchedExceptions, catchedCommands, finallyCommands)); @@ -352,7 +353,7 @@ public class AVM2Graph extends Graph { ret.addAll(output); GraphTargetItem lop = checkLoop(part, stopPart, loops); if (lop == null) { - ret.addAll(printGraph(new ArrayList(), localData, stack, allParts, null, part, stopPart, loops)); + ret.addAll(printGraph(new ArrayList(), localData, stack, allParts, null, part, stopPart, loops, staticOperation, path)); } else { ret.add(lop); } @@ -360,16 +361,16 @@ public class AVM2Graph extends Graph { } if (part.nextParts.isEmpty()) { - if (code.code.get(part.end).definition instanceof ReturnValueIns) { //returns in finally clause + if (this.code.code.get(part.end).definition instanceof ReturnValueIns) { //returns in finally clause if (part.getHeight() >= 3) { - if (code.code.get(part.getPosAt(part.getHeight() - 2)).definition instanceof KillIns) { - if (code.code.get(part.getPosAt(part.getHeight() - 3)).definition instanceof GetLocalTypeIns) { + if (this.code.code.get(part.getPosAt(part.getHeight() - 2)).definition instanceof KillIns) { + if (this.code.code.get(part.getPosAt(part.getHeight() - 3)).definition instanceof GetLocalTypeIns) { if (output.size() >= 2) { if (output.get(output.size() - 2) instanceof SetLocalTreeItem) { ret = new ArrayList<>(); ret.addAll(output); ret.remove(ret.size() - 1); - ret.add(new ReturnValueTreeItem(code.code.get(part.end), ((SetLocalTreeItem) output.get(output.size() - 2)).value)); + ret.add(new ReturnValueTreeItem(this.code.code.get(part.end), ((SetLocalTreeItem) output.get(output.size() - 2)).value)); return ret; } } @@ -378,7 +379,7 @@ public class AVM2Graph extends Graph { } } } - if ((code.code.get(part.end).definition instanceof LookupSwitchIns) && ignoredSwitches.contains(part.end)) { + if ((this.code.code.get(part.end).definition instanceof LookupSwitchIns) && ignoredSwitches.contains(part.end)) { ret = new ArrayList<>(); ret.addAll(output); return ret; @@ -387,14 +388,14 @@ public class AVM2Graph extends Graph { && (!stack.isEmpty()) && (stack.peek() instanceof StrictEqTreeItem) && (part.nextParts.get(0).getHeight() >= 2) - && (code.code.get(code.fixIPAfterDebugLine(part.nextParts.get(0).start)).definition instanceof PushIntegerTypeIns) - && (code.code.get(part.nextParts.get(0).nextParts.get(0).end).definition instanceof LookupSwitchIns)) + && (this.code.code.get(this.code.fixIPAfterDebugLine(part.nextParts.get(0).start)).definition instanceof PushIntegerTypeIns) + && (this.code.code.get(part.nextParts.get(0).nextParts.get(0).end).definition instanceof LookupSwitchIns)) || ((part.nextParts.size() == 2) && (!stack.isEmpty()) && (stack.peek() instanceof StrictNeqTreeItem) && (part.nextParts.get(1).getHeight() >= 2) - && (code.code.get(code.fixIPAfterDebugLine(part.nextParts.get(1).start)).definition instanceof PushIntegerTypeIns) - && (code.code.get(part.nextParts.get(1).nextParts.get(0).end).definition instanceof LookupSwitchIns))) { + && (this.code.code.get(this.code.fixIPAfterDebugLine(part.nextParts.get(1).start)).definition instanceof PushIntegerTypeIns) + && (this.code.code.get(part.nextParts.get(1).nextParts.get(0).end).definition instanceof LookupSwitchIns))) { if (stack.peek() instanceof StrictEqTreeItem) { ignoredSwitches.add(part.nextParts.get(0).nextParts.get(0).end); @@ -425,15 +426,15 @@ public class AVM2Graph extends Graph { if (tar instanceof StrictNeqTreeItem) { tar = ((StrictNeqTreeItem) tar).leftSide; } - caseValuesMap.put(code.code.get(part.nextParts.get(reversed ? 0 : 1).start).operands[0], tar); + caseValuesMap.put(this.code.code.get(part.nextParts.get(reversed ? 0 : 1).start).operands[0], tar); GraphPart switchLoc = part.nextParts.get(reversed ? 0 : 1).nextParts.get(0); - while ((code.code.get(part.nextParts.get(reversed ? 1 : 0).end).definition instanceof IfStrictNeIns) - || (code.code.get(part.nextParts.get(reversed ? 1 : 0).end).definition instanceof IfStrictEqIns)) { + while ((this.code.code.get(part.nextParts.get(reversed ? 1 : 0).end).definition instanceof IfStrictNeIns) + || (this.code.code.get(part.nextParts.get(reversed ? 1 : 0).end).definition instanceof IfStrictEqIns)) { part = part.nextParts.get(reversed ? 1 : 0); - translatePart(localData, part, stack); + translatePart(localData, part, stack, staticOperation, null); tar = stack.pop(); if (tar instanceof StrictEqTreeItem) { tar = ((StrictEqTreeItem) tar).leftSide; @@ -441,13 +442,13 @@ public class AVM2Graph extends Graph { if (tar instanceof StrictNeqTreeItem) { tar = ((StrictNeqTreeItem) tar).leftSide; } - if (code.code.get(part.end).definition instanceof IfStrictNeIns) { + if (this.code.code.get(part.end).definition instanceof IfStrictNeIns) { reversed = false; } else { reversed = true; } - caseValuesMap.put(code.code.get(code.fixIPAfterDebugLine(part.nextParts.get(reversed ? 0 : 1).start)).operands[0], tar); - while (code.code.get(part.nextParts.get(reversed ? 1 : 0).start).definition instanceof JumpIns) { + caseValuesMap.put(this.code.code.get(this.code.fixIPAfterDebugLine(part.nextParts.get(reversed ? 0 : 1).start)).operands[0], tar); + while (this.code.code.get(part.nextParts.get(reversed ? 1 : 0).start).definition instanceof JumpIns) { reversed = false; part = part.nextParts.get(reversed ? 1 : 0); if (part instanceof GraphPartMulti) { @@ -457,13 +458,13 @@ public class AVM2Graph extends Graph { } boolean hasDefault = false; GraphPart dp = part.nextParts.get(reversed ? 1 : 0); - while (code.code.get(dp.start).definition instanceof JumpIns) { + while (this.code.code.get(dp.start).definition instanceof JumpIns) { if (dp instanceof GraphPartMulti) { dp = ((GraphPartMulti) dp).parts.get(0); } dp = dp.nextParts.get(0); } - if (code.code.get(dp.start).definition instanceof PushIntegerTypeIns) { + if (this.code.code.get(dp.start).definition instanceof PushIntegerTypeIns) { hasDefault = true; } List caseValues = new ArrayList<>(); @@ -506,7 +507,7 @@ public class AVM2Graph extends Graph { defaultPart = switchLoc.nextParts.get(switchLoc.nextParts.size() - 1); List stopPart2 = new ArrayList<>(stopPart); stopPart2.add(next); - defaultCommands = printGraph(new ArrayList(), localData, stack, allParts, switchLoc, defaultPart, stopPart2, loops); + defaultCommands = printGraph(new ArrayList(), localData, stack, allParts, switchLoc, defaultPart, stopPart2, loops, staticOperation, path); if (!defaultCommands.isEmpty()) { if (defaultCommands.get(defaultCommands.size() - 1) instanceof BreakItem) { if (((BreakItem) defaultCommands.get(defaultCommands.size() - 1)).loopId == currentLoop.id) { @@ -523,26 +524,17 @@ public class AVM2Graph extends Graph { for (int i = 0; i < caseBodies.size(); i++) { List cc = new ArrayList<>(); - GraphPart nextCase = null; - nextCase = next; - if (next != null) { - if (i < caseBodies.size() - 1) { - if (!caseBodies.get(i).leadsTo(srcCode, caseBodies.get(i + 1), loops)) { - //cc.add(new BreakItem(null, currentLoop.id)); - } else { - nextCase = caseBodies.get(i + 1); - } - } else if (hasDefault) { - if (!caseBodies.get(i).leadsTo(srcCode, defaultPart, loops)) { - //cc.add(new BreakItem(null, currentLoop.id)); - } else { - nextCase = defaultPart; - } + List stopPart2 = new ArrayList<>(stopPart); + for (int j = 0; j < caseBodies.size(); j++) { + if (j != i) { + stopPart2.add(caseBodies.get(i)); } } - List stopPart2 = new ArrayList<>(stopPart); - stopPart2.add(nextCase); - cc.addAll(0, printGraph(new ArrayList(), localData, stack, allParts, switchLoc, caseBodies.get(i), stopPart2, loops)); + if (hasDefault) { + stopPart2.add(defaultPart); + } + + cc.addAll(0, printGraph(new ArrayList(), localData, stack, allParts, switchLoc, caseBodies.get(i), stopPart2, loops, staticOperation, path)); caseCommands.add(cc); } @@ -554,7 +546,7 @@ public class AVM2Graph extends Graph { ret.add(ti); } else {*/ currentLoop.phase = 2; - ret.addAll(printGraph(new ArrayList(), localData, stack, allParts, null, next, stopPart, loops)); + ret.addAll(printGraph(new ArrayList(), localData, stack, allParts, null, next, stopPart, loops, staticOperation, path)); //} } } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2GraphSource.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2GraphSource.java index 6839efbd8..cb6fb9279 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2GraphSource.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2GraphSource.java @@ -64,11 +64,11 @@ public class AVM2GraphSource extends GraphSource { @Override @SuppressWarnings("unchecked") - public List translatePart(GraphPart part, List localData, Stack stack, int start, int end) { + public List translatePart(GraphPart part, List localData, Stack stack, int start, int end, int staticOperation, String path) { List ret = new ArrayList<>(); Object o = localData.get(AVM2Graph.DATA_SCOPESTACK); Stack newstack = (Stack) o; - ConvertOutput co = code.toSourceOutput(part, false, isStatic, scriptIndex, classIndex, localRegs, stack, newstack, abc, abc.constants, abc.method_info, body, start, end, localRegNames, fullyQualifiedNames, new boolean[size()]); + ConvertOutput co = code.toSourceOutput(path, part, false, isStatic, scriptIndex, classIndex, localRegs, stack, newstack, abc, abc.constants, abc.method_info, body, start, end, localRegNames, fullyQualifiedNames, new boolean[size()]); ret.addAll(co.output); return ret; } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/AVM2Instruction.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/AVM2Instruction.java index e988d280b..85de03747 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/AVM2Instruction.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/AVM2Instruction.java @@ -252,23 +252,26 @@ public class AVM2Instruction implements Serializable, GraphSourceItem { @Override @SuppressWarnings("unchecked") - public void translate(List localData, Stack stack, List output) { + public void translate(List localData, Stack stack, List output, int staticOperation, String path) { definition.translate((Boolean) localData.get(0), (Integer) localData.get(13), (Integer) localData.get(1), (HashMap) localData.get(2), stack, (Stack) localData.get(3), - (ConstantPool) localData.get(4), this, (MethodInfo[]) localData.get(5), output, (MethodBody) localData.get(6), (ABC) localData.get(7), (HashMap) localData.get(8), (List) localData.get(9)); + (ConstantPool) localData.get(4), this, (MethodInfo[]) localData.get(5), output, (MethodBody) localData.get(6), (ABC) localData.get(7), (HashMap) localData.get(8), (List) localData.get(9), null); } @Override public boolean isJump() { - return (definition instanceof JumpIns); + return (definition instanceof JumpIns) || (fixedBranch > -1); } @Override public boolean isBranch() { + if (fixedBranch > -1) { + return false; + } return (definition instanceof IfTypeIns) || (definition instanceof LookupSwitchIns); } @@ -286,15 +289,24 @@ public class AVM2Instruction implements Serializable, GraphSourceItem { public List getBranches(GraphSource code) { List ret = new ArrayList<>(); if (definition instanceof IfTypeIns) { - ret.add(code.adr2pos(offset + getBytes().length + operands[0])); + + if (fixedBranch == -1 || fixedBranch == 0) { + ret.add(code.adr2pos(offset + getBytes().length + operands[0])); + } if (!(definition instanceof JumpIns)) { - ret.add(code.adr2pos(offset + getBytes().length)); + if (fixedBranch == -1 || fixedBranch == 1) { + ret.add(code.adr2pos(offset + getBytes().length)); + } } } if (definition instanceof LookupSwitchIns) { - ret.add(code.adr2pos(offset + operands[0])); + if (fixedBranch == -1 || fixedBranch == 0) { + ret.add(code.adr2pos(offset + operands[0])); + } for (int k = 2; k < operands.length; k++) { - ret.add(code.adr2pos(offset + operands[k])); + if (fixedBranch == -1 || fixedBranch == k - 1) { + ret.add(code.adr2pos(offset + operands[k])); + } } } return ret; @@ -306,7 +318,18 @@ public class AVM2Instruction implements Serializable, GraphSourceItem { } @Override - public void setIgnored(boolean ignored) { + public void setIgnored(boolean ignored, int pos) { this.ignored = ignored; } + + @Override + public void setFixBranch(int pos) { + this.fixedBranch = pos; + } + private int fixedBranch = -1; + + @Override + public int getFixBranch() { + return fixedBranch; + } } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/InstructionDefinition.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/InstructionDefinition.java index 10278bf25..b96e29560 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/InstructionDefinition.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/InstructionDefinition.java @@ -75,7 +75,7 @@ public class InstructionDefinition implements Serializable { throw new UnsupportedOperationException("Instruction " + instructionName + " not implemented"); } - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { } protected FullMultinameTreeItem resolveMultiname(Stack stack, ConstantPool constants, int multinameIndex, AVM2Instruction ins) { diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/AddIIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/AddIIns.java index 2331d6aaf..c780ea0e9 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/AddIIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/AddIIns.java @@ -34,7 +34,7 @@ public class AddIIns extends AddIns { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { GraphTargetItem v2 = (GraphTargetItem) stack.pop(); GraphTargetItem v1 = (GraphTargetItem) stack.pop(); stack.push(new AddTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/AddIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/AddIns.java index 68f95bd18..b44d26d80 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/AddIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/AddIns.java @@ -57,7 +57,7 @@ public class AddIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { GraphTargetItem v2 = (GraphTargetItem) stack.pop(); GraphTargetItem v1 = (GraphTargetItem) stack.pop(); stack.push(new AddTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/DecrementIIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/DecrementIIns.java index 8bbf21f9d..650972ab3 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/DecrementIIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/DecrementIIns.java @@ -53,7 +53,7 @@ public class DecrementIIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { stack.push(new DecrementTreeItem(ins, (GraphTargetItem) stack.pop())); } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/DecrementIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/DecrementIns.java index 7cb71cf3a..3bab759b6 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/DecrementIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/DecrementIns.java @@ -53,7 +53,7 @@ public class DecrementIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { stack.push(new DecrementTreeItem(ins, (GraphTargetItem) stack.pop())); } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/DivideIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/DivideIns.java index 0630850f1..b2c5e5919 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/DivideIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/DivideIns.java @@ -56,7 +56,7 @@ public class DivideIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { GraphTargetItem v2 = (GraphTargetItem) stack.pop(); GraphTargetItem v1 = (GraphTargetItem) stack.pop(); stack.push(new DivideTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/IncrementIIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/IncrementIIns.java index f90fbf1e9..c058b4263 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/IncrementIIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/IncrementIIns.java @@ -34,7 +34,7 @@ public class IncrementIIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { stack.push(new IncrementTreeItem(ins, (GraphTargetItem) stack.pop())); } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/IncrementIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/IncrementIns.java index 2b7678ae6..657a271a4 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/IncrementIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/IncrementIns.java @@ -34,7 +34,7 @@ public class IncrementIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { stack.push(new IncrementTreeItem(ins, (GraphTargetItem) stack.pop())); } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/ModuloIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/ModuloIns.java index 23a3ab9fa..022d8945f 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/ModuloIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/ModuloIns.java @@ -48,7 +48,7 @@ public class ModuloIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { GraphTargetItem v2 = (GraphTargetItem) stack.pop(); GraphTargetItem v1 = (GraphTargetItem) stack.pop(); stack.push(new ModuloTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/MultiplyIIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/MultiplyIIns.java index 584da198d..3eb17a33a 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/MultiplyIIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/MultiplyIIns.java @@ -34,7 +34,7 @@ public class MultiplyIIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { GraphTargetItem v2 = (GraphTargetItem) stack.pop(); GraphTargetItem v1 = (GraphTargetItem) stack.pop(); stack.push(new MultiplyTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/MultiplyIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/MultiplyIns.java index d17af1a3a..70d14d46c 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/MultiplyIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/MultiplyIns.java @@ -56,7 +56,7 @@ public class MultiplyIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { GraphTargetItem v2 = (GraphTargetItem) stack.pop(); GraphTargetItem v1 = (GraphTargetItem) stack.pop(); stack.push(new MultiplyTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/NegateIIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/NegateIIns.java index 6b3588026..62b1195ff 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/NegateIIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/NegateIIns.java @@ -34,7 +34,7 @@ public class NegateIIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { GraphTargetItem v = (GraphTargetItem) stack.pop(); stack.push(new NegTreeItem(ins, v)); } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/NegateIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/NegateIns.java index e84f1ba71..f8955a749 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/NegateIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/NegateIns.java @@ -34,7 +34,7 @@ public class NegateIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { GraphTargetItem v = (GraphTargetItem) stack.pop(); stack.push(new NegTreeItem(ins, v)); } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/NotIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/NotIns.java index dd23c74f3..332bae818 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/NotIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/NotIns.java @@ -34,7 +34,7 @@ public class NotIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { GraphTargetItem v = (GraphTargetItem) stack.pop(); stack.push(new NotItem(ins, v)); } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/SubtractIIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/SubtractIIns.java index faedfd5f2..69037c389 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/SubtractIIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/SubtractIIns.java @@ -34,7 +34,7 @@ public class SubtractIIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { GraphTargetItem v2 = (GraphTargetItem) stack.pop(); GraphTargetItem v1 = (GraphTargetItem) stack.pop(); stack.push(new SubtractTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/SubtractIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/SubtractIns.java index 71994d1f7..192434170 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/SubtractIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/SubtractIns.java @@ -34,7 +34,7 @@ public class SubtractIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { GraphTargetItem v2 = (GraphTargetItem) stack.pop(); GraphTargetItem v1 = (GraphTargetItem) stack.pop(); stack.push(new SubtractTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/BitAndIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/BitAndIns.java index 99006b194..3ba0e3f4e 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/BitAndIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/BitAndIns.java @@ -43,7 +43,7 @@ public class BitAndIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { GraphTargetItem v2 = (GraphTargetItem) stack.pop(); GraphTargetItem v1 = (GraphTargetItem) stack.pop(); stack.push(new BitAndTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/BitNotIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/BitNotIns.java index f08defc61..8b91cf3ac 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/BitNotIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/BitNotIns.java @@ -42,7 +42,7 @@ public class BitNotIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { GraphTargetItem v = (GraphTargetItem) stack.pop(); stack.push(new BitNotTreeItem(ins, v)); } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/BitOrIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/BitOrIns.java index 02a0e9397..df3370fb8 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/BitOrIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/BitOrIns.java @@ -43,7 +43,7 @@ public class BitOrIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { GraphTargetItem v2 = (GraphTargetItem) stack.pop(); GraphTargetItem v1 = (GraphTargetItem) stack.pop(); stack.push(new BitOrTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/BitXorIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/BitXorIns.java index 1e1ca81f3..3ea5ca3f8 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/BitXorIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/BitXorIns.java @@ -43,7 +43,7 @@ public class BitXorIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { GraphTargetItem v2 = (GraphTargetItem) stack.pop(); GraphTargetItem v1 = (GraphTargetItem) stack.pop(); stack.push(new BitXorTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/LShiftIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/LShiftIns.java index 837cb3822..a3928274f 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/LShiftIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/LShiftIns.java @@ -34,7 +34,7 @@ public class LShiftIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { GraphTargetItem v2 = (GraphTargetItem) stack.pop(); GraphTargetItem v1 = (GraphTargetItem) stack.pop(); stack.push(new LShiftTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/RShiftIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/RShiftIns.java index 26082aba3..34cc11d60 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/RShiftIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/RShiftIns.java @@ -34,7 +34,7 @@ public class RShiftIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { GraphTargetItem v2 = (GraphTargetItem) stack.pop(); GraphTargetItem v1 = (GraphTargetItem) stack.pop(); stack.push(new RShiftTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/URShiftIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/URShiftIns.java index 11a8929fd..9dde4619c 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/URShiftIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/URShiftIns.java @@ -34,7 +34,7 @@ public class URShiftIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { GraphTargetItem v2 = (GraphTargetItem) stack.pop(); GraphTargetItem v1 = (GraphTargetItem) stack.pop(); stack.push(new URShiftTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/EqualsIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/EqualsIns.java index 81adb428f..ed76cfa52 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/EqualsIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/EqualsIns.java @@ -43,7 +43,7 @@ public class EqualsIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { GraphTargetItem v2 = (GraphTargetItem) stack.pop(); GraphTargetItem v1 = (GraphTargetItem) stack.pop(); stack.push(new EqTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/GreaterEqualsIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/GreaterEqualsIns.java index 27776098e..e1808765d 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/GreaterEqualsIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/GreaterEqualsIns.java @@ -34,7 +34,7 @@ public class GreaterEqualsIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { GraphTargetItem v2 = (GraphTargetItem) stack.pop(); GraphTargetItem v1 = (GraphTargetItem) stack.pop(); stack.push(new GeTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/GreaterThanIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/GreaterThanIns.java index 7b6cba9d0..89d30218f 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/GreaterThanIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/GreaterThanIns.java @@ -34,7 +34,7 @@ public class GreaterThanIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { GraphTargetItem v2 = (GraphTargetItem) stack.pop(); GraphTargetItem v1 = (GraphTargetItem) stack.pop(); stack.push(new GtTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/LessEqualsIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/LessEqualsIns.java index 0cc18e335..49e2b6283 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/LessEqualsIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/LessEqualsIns.java @@ -34,7 +34,7 @@ public class LessEqualsIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { GraphTargetItem v2 = (GraphTargetItem) stack.pop(); GraphTargetItem v1 = (GraphTargetItem) stack.pop(); stack.push(new LeTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/LessThanIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/LessThanIns.java index 3e8e38de1..36bdd322d 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/LessThanIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/LessThanIns.java @@ -34,7 +34,7 @@ public class LessThanIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { GraphTargetItem v2 = (GraphTargetItem) stack.pop(); GraphTargetItem v1 = (GraphTargetItem) stack.pop(); stack.push(new LtTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/StrictEqualsIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/StrictEqualsIns.java index 030c8a6a6..72b169195 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/StrictEqualsIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/StrictEqualsIns.java @@ -34,7 +34,7 @@ public class StrictEqualsIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { GraphTargetItem v2 = (GraphTargetItem) stack.pop(); GraphTargetItem v1 = (GraphTargetItem) stack.pop(); stack.push(new StrictEqTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/ConstructIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/ConstructIns.java index 3e6c1ad74..098c90924 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/ConstructIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/ConstructIns.java @@ -74,7 +74,7 @@ public class ConstructIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { int argCount = ins.operands[0]; List args = new ArrayList<>(); for (int a = 0; a < argCount; a++) { diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/ConstructPropIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/ConstructPropIns.java index 58862f2bb..f01972017 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/ConstructPropIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/ConstructPropIns.java @@ -54,7 +54,7 @@ public class ConstructPropIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { int multinameIndex = ins.operands[0]; int argCount = ins.operands[1]; List args = new ArrayList<>(); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/ConstructSuperIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/ConstructSuperIns.java index 4897cd949..de56d487b 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/ConstructSuperIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/ConstructSuperIns.java @@ -50,7 +50,7 @@ public class ConstructSuperIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { int argCount = ins.operands[0]; List args = new ArrayList<>(); for (int a = 0; a < argCount; a++) { diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewActivationIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewActivationIns.java index 5c69d7f8e..f7a9f97d8 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewActivationIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewActivationIns.java @@ -34,7 +34,7 @@ public class NewActivationIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { stack.push(new NewActivationTreeItem(ins)); } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewArrayIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewArrayIns.java index 30642caf0..df53021c2 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewArrayIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewArrayIns.java @@ -36,7 +36,7 @@ public class NewArrayIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { int argCount = ins.operands[0]; List args = new ArrayList<>(); for (int a = 0; a < argCount; a++) { diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewCatchIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewCatchIns.java index ed4f8d0f1..f0c039852 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewCatchIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewCatchIns.java @@ -35,7 +35,7 @@ public class NewCatchIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { int exInfo = ins.operands[0]; stack.push(new ExceptionTreeItem(body.exceptions[exInfo])); } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewClassIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewClassIns.java index 682bd3131..8edce7134 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewClassIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewClassIns.java @@ -36,7 +36,7 @@ public class NewClassIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { int clsIndex = ins.operands[0]; String baseType = stack.pop().toString(Helper.toList(constants, localRegNames, fullyQualifiedNames)); stack.push(new UnparsedTreeItem(ins, "new " + abc.constants.constant_multiname[abc.instance_info[clsIndex].name_index].getName(constants, fullyQualifiedNames) + ".class extends " + baseType)); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewFunctionIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewFunctionIns.java index d876f3253..6893371da 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewFunctionIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewFunctionIns.java @@ -39,14 +39,14 @@ public class NewFunctionIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { int methodIndex = ins.operands[0]; MethodBody mybody = abc.findBody(methodIndex); String bodyStr = ""; String paramStr = ""; if (mybody != null) { try { - bodyStr = Highlighting.hilighMethodEnd() + mybody.toString("", false, isStatic, scriptIndex, classIndex, abc, constants, method_info, new Stack()/*scopeStack*/, false, true, fullyQualifiedNames, null) + Highlighting.hilighMethodBegin(body.method_info); + bodyStr = Highlighting.hilighMethodEnd() + mybody.toString(path + "/inner", false, isStatic, scriptIndex, classIndex, abc, constants, method_info, new Stack()/*scopeStack*/, false, true, fullyQualifiedNames, null) + Highlighting.hilighMethodBegin(body.method_info); } catch (Exception ex) { Logger.getLogger(NewFunctionIns.class.getName()).log(Level.SEVERE, "error during newfunction", ex); } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewObjectIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewObjectIns.java index 1c2b98ee7..7df782805 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewObjectIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewObjectIns.java @@ -37,7 +37,7 @@ public class NewObjectIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { int argCount = ins.operands[0]; List args = new ArrayList<>(); for (int a = 0; a < argCount; a++) { diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallIns.java index 13d384144..294434461 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallIns.java @@ -50,7 +50,7 @@ public class CallIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { int argCount = ins.operands[0]; List args = new ArrayList<>(); for (int a = 0; a < argCount; a++) { diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallMethodIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallMethodIns.java index 63513969b..999daaa17 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallMethodIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallMethodIns.java @@ -50,7 +50,7 @@ public class CallMethodIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { int methodIndex = ins.operands[0]; int argCount = ins.operands[1]; List args = new ArrayList<>(); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallPropLexIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallPropLexIns.java index 01ac8b6cc..8c3261d24 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallPropLexIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallPropLexIns.java @@ -36,7 +36,7 @@ public class CallPropLexIns extends CallPropertyIns { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { int multinameIndex = ins.operands[0]; int argCount = ins.operands[1]; List args = new ArrayList<>(); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallPropVoidIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallPropVoidIns.java index 27b691985..f58fd00aa 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallPropVoidIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallPropVoidIns.java @@ -55,7 +55,7 @@ public class CallPropVoidIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { int multinameIndex = ins.operands[0]; int argCount = ins.operands[1]; List args = new ArrayList<>(); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallPropertyIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallPropertyIns.java index 0ecb00d55..1e4e2a234 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallPropertyIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallPropertyIns.java @@ -53,7 +53,7 @@ public class CallPropertyIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { int multinameIndex = ins.operands[0]; int argCount = ins.operands[1]; List args = new ArrayList<>(); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallStaticIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallStaticIns.java index 3d26d5658..fda14c207 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallStaticIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallStaticIns.java @@ -50,7 +50,7 @@ public class CallStaticIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { int methodIndex = ins.operands[0]; int argCount = ins.operands[1]; List args = new ArrayList<>(); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallSuperIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallSuperIns.java index b75903f80..ab276a7de 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallSuperIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallSuperIns.java @@ -53,7 +53,7 @@ public class CallSuperIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { int multinameIndex = ins.operands[0]; int argCount = ins.operands[1]; List args = new ArrayList<>(); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallSuperVoidIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallSuperVoidIns.java index b22dc41d4..de8ebc3d7 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallSuperVoidIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallSuperVoidIns.java @@ -53,7 +53,7 @@ public class CallSuperVoidIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { int multinameIndex = ins.operands[0]; int argCount = ins.operands[1]; List args = new ArrayList<>(); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfEqIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfEqIns.java index 3fe2cf904..7660a49b6 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfEqIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfEqIns.java @@ -37,7 +37,7 @@ public class IfEqIns extends InstructionDefinition implements IfTypeIns { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { GraphTargetItem v2 = (GraphTargetItem) stack.pop(); GraphTargetItem v1 = (GraphTargetItem) stack.pop(); stack.push(new EqTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfFalseIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfFalseIns.java index f85e93fb0..f8ef1b55f 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfFalseIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfFalseIns.java @@ -36,7 +36,7 @@ public class IfFalseIns extends InstructionDefinition implements IfTypeIns { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { GraphTargetItem v1 = (GraphTargetItem) stack.pop(); stack.push(new NotItem(ins, v1)); } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfGeIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfGeIns.java index add1254e9..773eb8f1a 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfGeIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfGeIns.java @@ -37,7 +37,7 @@ public class IfGeIns extends InstructionDefinition implements IfTypeIns { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { GraphTargetItem v2 = (GraphTargetItem) stack.pop(); GraphTargetItem v1 = (GraphTargetItem) stack.pop(); stack.push(new GeTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfGtIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfGtIns.java index 99d3f40d4..2f737b038 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfGtIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfGtIns.java @@ -37,7 +37,7 @@ public class IfGtIns extends InstructionDefinition implements IfTypeIns { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { GraphTargetItem v2 = (GraphTargetItem) stack.pop(); GraphTargetItem v1 = (GraphTargetItem) stack.pop(); stack.push(new GtTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfLeIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfLeIns.java index 3c3b5ceaa..2c53f9e56 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfLeIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfLeIns.java @@ -37,7 +37,7 @@ public class IfLeIns extends InstructionDefinition implements IfTypeIns { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { GraphTargetItem v2 = (GraphTargetItem) stack.pop(); GraphTargetItem v1 = (GraphTargetItem) stack.pop(); stack.push(new LeTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfLtIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfLtIns.java index 984103a9c..453fb8ee9 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfLtIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfLtIns.java @@ -37,7 +37,7 @@ public class IfLtIns extends InstructionDefinition implements IfTypeIns { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { GraphTargetItem v2 = (GraphTargetItem) stack.pop(); GraphTargetItem v1 = (GraphTargetItem) stack.pop(); stack.push(new LtTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNGeIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNGeIns.java index 3bcf3ad36..5bad91019 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNGeIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNGeIns.java @@ -37,7 +37,7 @@ public class IfNGeIns extends InstructionDefinition implements IfTypeIns { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { GraphTargetItem v2 = (GraphTargetItem) stack.pop(); GraphTargetItem v1 = (GraphTargetItem) stack.pop(); stack.push(new LtTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNGtIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNGtIns.java index 5253ff949..bb71348e9 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNGtIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNGtIns.java @@ -37,7 +37,7 @@ public class IfNGtIns extends InstructionDefinition implements IfTypeIns { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { GraphTargetItem v2 = (GraphTargetItem) stack.pop(); GraphTargetItem v1 = (GraphTargetItem) stack.pop(); stack.push(new LeTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNLeIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNLeIns.java index 3cb1f1c06..d3682c1f1 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNLeIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNLeIns.java @@ -37,7 +37,7 @@ public class IfNLeIns extends InstructionDefinition implements IfTypeIns { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { GraphTargetItem v2 = (GraphTargetItem) stack.pop(); GraphTargetItem v1 = (GraphTargetItem) stack.pop(); stack.push(new GtTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNLtIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNLtIns.java index a9321f3c0..66c76e046 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNLtIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNLtIns.java @@ -37,7 +37,7 @@ public class IfNLtIns extends InstructionDefinition implements IfTypeIns { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { GraphTargetItem v2 = (GraphTargetItem) stack.pop(); GraphTargetItem v1 = (GraphTargetItem) stack.pop(); stack.push(new GeTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNeIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNeIns.java index 3c01e97b5..121c48d4f 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNeIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNeIns.java @@ -37,7 +37,7 @@ public class IfNeIns extends InstructionDefinition implements IfTypeIns { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { GraphTargetItem v2 = (GraphTargetItem) stack.pop(); GraphTargetItem v1 = (GraphTargetItem) stack.pop(); stack.push(new NeqTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfStrictEqIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfStrictEqIns.java index a8185ddec..0ff3ef3df 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfStrictEqIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfStrictEqIns.java @@ -37,7 +37,7 @@ public class IfStrictEqIns extends InstructionDefinition implements IfTypeIns { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { GraphTargetItem v2 = (GraphTargetItem) stack.pop(); GraphTargetItem v1 = (GraphTargetItem) stack.pop(); stack.push(new StrictEqTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfStrictNeIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfStrictNeIns.java index a2fb6a1cf..90586726e 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfStrictNeIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfStrictNeIns.java @@ -37,7 +37,7 @@ public class IfStrictNeIns extends InstructionDefinition implements IfTypeIns { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { GraphTargetItem v2 = (GraphTargetItem) stack.pop(); GraphTargetItem v1 = (GraphTargetItem) stack.pop(); stack.push(new StrictNeqTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfTrueIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfTrueIns.java index 8d2e0bf46..8226a8efa 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfTrueIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfTrueIns.java @@ -36,7 +36,7 @@ public class IfTrueIns extends InstructionDefinition implements IfTypeIns { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { //String v1 = stack.pop().toString(); //stack.push("(" + v1 + ")"); } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/JumpIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/JumpIns.java index 4af6150a7..a68ce8aa9 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/JumpIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/JumpIns.java @@ -34,7 +34,7 @@ public class JumpIns extends InstructionDefinition implements IfTypeIns { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { //stack.push(new BooleanTreeItem(ins, Boolean.TRUE));// + ins.operands[0]); } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/LookupSwitchIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/LookupSwitchIns.java index 5c556e779..025fa0610 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/LookupSwitchIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/LookupSwitchIns.java @@ -34,7 +34,7 @@ public class LookupSwitchIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { //int defaultOffset = ins.operands[0]; //int caseCount = ins.operands[1]; //stack.push("switch(...)"); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/DecLocalIIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/DecLocalIIns.java index 0378988ac..b3732c057 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/DecLocalIIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/DecLocalIIns.java @@ -57,7 +57,7 @@ public class DecLocalIIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { int regIndex = ins.operands[0]; output.add(new DecLocalTreeItem(ins, regIndex)); if (localRegs.containsKey(regIndex)) { diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/DecLocalIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/DecLocalIns.java index 5a7dbbc65..2654d0c6e 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/DecLocalIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/DecLocalIns.java @@ -57,7 +57,7 @@ public class DecLocalIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { int regIndex = ins.operands[0]; output.add(new DecLocalTreeItem(ins, regIndex)); if (localRegs.containsKey(regIndex)) { diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocal0Ins.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocal0Ins.java index 1b8186e68..101427315 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocal0Ins.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocal0Ins.java @@ -40,7 +40,7 @@ public class GetLocal0Ins extends GetLocalTypeIns { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { if ((classIndex >= abc.instance_info.length) || classIndex < 0) { stack.push(new ScriptTreeItem(scriptIndex)); return; diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocalTypeIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocalTypeIns.java index 09d37858f..5ae6a83eb 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocalTypeIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocalTypeIns.java @@ -35,7 +35,7 @@ public abstract class GetLocalTypeIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { GraphTargetItem computedValue = localRegs.get(getRegisterId(ins)); if (computedValue == null) { if (!localRegNames.containsKey(getRegisterId(ins))) { diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/IncLocalIIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/IncLocalIIns.java index 68300db3f..c367edfc9 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/IncLocalIIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/IncLocalIIns.java @@ -37,7 +37,7 @@ public class IncLocalIIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { int regIndex = ins.operands[0]; output.add(new IncLocalTreeItem(ins, regIndex)); if (localRegs.containsKey(regIndex)) { diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/IncLocalIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/IncLocalIns.java index 8db74bb77..0d65bc919 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/IncLocalIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/IncLocalIns.java @@ -37,7 +37,7 @@ public class IncLocalIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { int regIndex = ins.operands[0]; output.add(new IncLocalTreeItem(ins, regIndex)); if (localRegs.containsKey(regIndex)) { diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/KillIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/KillIns.java index 8b9e70208..b9671e028 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/KillIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/KillIns.java @@ -33,7 +33,7 @@ public class KillIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { //kill local register } } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/SetLocalTypeIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/SetLocalTypeIns.java index cbddf76c1..752d8152c 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/SetLocalTypeIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/SetLocalTypeIns.java @@ -46,7 +46,7 @@ public abstract class SetLocalTypeIns extends InstructionDefinition implements S } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { int regId = getRegisterId(ins); GraphTargetItem value = (GraphTargetItem) stack.pop(); if (localRegs.containsKey(regId)) { diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/DeletePropertyIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/DeletePropertyIns.java index 94fede47d..2928681a5 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/DeletePropertyIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/DeletePropertyIns.java @@ -49,7 +49,7 @@ public class DeletePropertyIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { int multinameIndex = ins.operands[0]; FullMultinameTreeItem multiname = resolveMultiname(stack, constants, multinameIndex, ins); GraphTargetItem obj = (GraphTargetItem) stack.pop(); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/FindPropertyIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/FindPropertyIns.java index 4542e5535..83acd4492 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/FindPropertyIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/FindPropertyIns.java @@ -46,7 +46,7 @@ public class FindPropertyIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { int multinameIndex = ins.operands[0]; FullMultinameTreeItem multiname = resolveMultiname(stack, constants, multinameIndex, ins); stack.push(new FindPropertyTreeItem(ins, multiname)); //resolve right object diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/FindPropertyStrictIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/FindPropertyStrictIns.java index 9858f2527..8c9519590 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/FindPropertyStrictIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/FindPropertyStrictIns.java @@ -45,7 +45,7 @@ public class FindPropertyStrictIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { int multinameIndex = ins.operands[0]; FullMultinameTreeItem multiname = resolveMultiname(stack, constants, multinameIndex, ins); stack.push(new FindPropertyTreeItem(ins, multiname)); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetDescendantsIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetDescendantsIns.java index 4e766e634..e50a15b94 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetDescendantsIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetDescendantsIns.java @@ -46,7 +46,7 @@ public class GetDescendantsIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { int multinameIndex = ins.operands[0]; FullMultinameTreeItem multiname = resolveMultiname(stack, constants, multinameIndex, ins); GraphTargetItem obj = (GraphTargetItem) stack.pop(); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetGlobalScopeIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetGlobalScopeIns.java index f9fdaf2ad..a2dadedfc 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetGlobalScopeIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetGlobalScopeIns.java @@ -41,7 +41,7 @@ public class GetGlobalScopeIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { if (scopeStack.isEmpty()) { if (classIndex == -1) { stack.push(new ScriptTreeItem(scriptIndex)); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetGlobalSlotIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetGlobalSlotIns.java index 9a9809732..3c68d1420 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetGlobalSlotIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetGlobalSlotIns.java @@ -38,7 +38,7 @@ public class GetGlobalSlotIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { int slotIndex = ins.operands[0]; GraphTargetItem obj = (GraphTargetItem) scopeStack.get(0); //scope Multiname slotname = null; diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetLexIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetLexIns.java index 8ec60d86e..911beff98 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetLexIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetLexIns.java @@ -36,7 +36,7 @@ public class GetLexIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { int multinameIndex = ins.operands[0]; Multiname multiname = constants.constant_multiname[multinameIndex]; stack.push(new GetLexTreeItem(ins, multiname)); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetPropertyIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetPropertyIns.java index 05dbb69a2..52fff1f92 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetPropertyIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetPropertyIns.java @@ -36,7 +36,7 @@ public class GetPropertyIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { int multinameIndex = ins.operands[0]; FullMultinameTreeItem multiname = resolveMultiname(stack, constants, multinameIndex, ins); GraphTargetItem obj = (GraphTargetItem) stack.pop(); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetScopeObjectIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetScopeObjectIns.java index f3acfbfa8..16d37d525 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetScopeObjectIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetScopeObjectIns.java @@ -34,7 +34,7 @@ public class GetScopeObjectIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { int index = ins.operands[0]; stack.push(scopeStack.get(index)); } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetSlotIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetSlotIns.java index b2bc29804..d3de866ee 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetSlotIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetSlotIns.java @@ -43,7 +43,7 @@ public class GetSlotIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { int slotIndex = ins.operands[0]; GraphTargetItem obj = (GraphTargetItem) stack.pop(); //scope obj = obj.getThroughRegister(); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetSuperIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetSuperIns.java index 3451bc5e8..c831748a8 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetSuperIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetSuperIns.java @@ -36,7 +36,7 @@ public class GetSuperIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { int multinameIndex = ins.operands[0]; FullMultinameTreeItem multiname = resolveMultiname(stack, constants, multinameIndex, ins); GraphTargetItem obj = (GraphTargetItem) stack.pop(); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/HasNext2Ins.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/HasNext2Ins.java index 85cd2e99b..00ff83a19 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/HasNext2Ins.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/HasNext2Ins.java @@ -35,7 +35,7 @@ public class HasNext2Ins extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { int objectReg = ins.operands[0]; int indexReg = ins.operands[1]; //stack.push("_loc_" + objectReg + ".hasNext(cnt=_loc_" + indexReg + ")"); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/HasNextIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/HasNextIns.java index 79c2ba71c..77d47671d 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/HasNextIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/HasNextIns.java @@ -34,7 +34,7 @@ public class HasNextIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { GraphTargetItem curIndex = (GraphTargetItem) stack.pop(); GraphTargetItem obj = (GraphTargetItem) stack.pop(); stack.push(new HasNextTreeItem(ins, curIndex, obj)); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/InIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/InIns.java index 421e02963..507c0f1b1 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/InIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/InIns.java @@ -34,7 +34,7 @@ public class InIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { GraphTargetItem obj = (GraphTargetItem) stack.pop(); GraphTargetItem name = (GraphTargetItem) stack.pop(); stack.push(new InTreeItem(ins, name, obj)); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/InitPropertyIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/InitPropertyIns.java index 6d85d343f..2e4f2ba3e 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/InitPropertyIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/InitPropertyIns.java @@ -36,7 +36,7 @@ public class InitPropertyIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { int multinameIndex = ins.operands[0]; GraphTargetItem val = (GraphTargetItem) stack.pop(); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/NextNameIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/NextNameIns.java index 4f4fa6b0f..ccb108aaf 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/NextNameIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/NextNameIns.java @@ -34,7 +34,7 @@ public class NextNameIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { GraphTargetItem index = stack.pop(); GraphTargetItem obj = stack.pop(); stack.push(new NextNameTreeItem(ins, index, obj)); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/NextValueIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/NextValueIns.java index fd8ace6f2..4169b0a33 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/NextValueIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/NextValueIns.java @@ -34,7 +34,7 @@ public class NextValueIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { GraphTargetItem index = stack.pop(); GraphTargetItem obj = stack.pop(); stack.push(new NextValueTreeItem(ins, index, obj)); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/ReturnValueIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/ReturnValueIns.java index 05439f8f1..648bfe46b 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/ReturnValueIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/ReturnValueIns.java @@ -34,7 +34,7 @@ public class ReturnValueIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { output.add(new ReturnValueTreeItem(ins, (GraphTargetItem) stack.pop())); } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/ReturnVoidIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/ReturnVoidIns.java index c22f5cd13..e69e71478 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/ReturnVoidIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/ReturnVoidIns.java @@ -33,7 +33,7 @@ public class ReturnVoidIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { output.add(new ReturnVoidTreeItem(ins)); } } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetGlobalSlotIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetGlobalSlotIns.java index 89fa2c45d..ab4727c24 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetGlobalSlotIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetGlobalSlotIns.java @@ -37,7 +37,7 @@ public class SetGlobalSlotIns extends InstructionDefinition implements SetTypeIn } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { output.add(new SetGlobalSlotTreeItem(ins, ins.operands[0], (GraphTargetItem) stack.pop())); } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetPropertyIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetPropertyIns.java index 74682231e..a48b09cb7 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetPropertyIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetPropertyIns.java @@ -46,7 +46,7 @@ public class SetPropertyIns extends InstructionDefinition implements SetTypeIns } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { int multinameIndex = ins.operands[0]; GraphTargetItem value = (GraphTargetItem) stack.pop(); FullMultinameTreeItem multiname = resolveMultiname(stack, constants, multinameIndex, ins); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetSlotIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetSlotIns.java index 656e0006c..a8f3bdd2b 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetSlotIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetSlotIns.java @@ -54,7 +54,7 @@ public class SetSlotIns extends InstructionDefinition implements SetTypeIns { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { int slotIndex = ins.operands[0]; GraphTargetItem value = (GraphTargetItem) stack.pop(); GraphTargetItem obj = (GraphTargetItem) stack.pop(); //scopeId diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetSuperIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetSuperIns.java index 2e7e82dd0..c2c6160ed 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetSuperIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetSuperIns.java @@ -38,7 +38,7 @@ public class SetSuperIns extends InstructionDefinition implements SetTypeIns { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { int multinameIndex = ins.operands[0]; GraphTargetItem value = (GraphTargetItem) stack.pop(); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/ThrowIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/ThrowIns.java index cc3b36cc9..d112c6cd9 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/ThrowIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/ThrowIns.java @@ -35,7 +35,7 @@ public class ThrowIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, MethodBody body, ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, MethodBody body, ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { output.add(new ThrowTreeItem(ins, (GraphTargetItem) stack.pop())); } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/DupIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/DupIns.java index 7086ccf81..3cea9d4ba 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/DupIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/DupIns.java @@ -42,7 +42,7 @@ public class DupIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { GraphTargetItem v = stack.pop(); stack.push(v); stack.push(new DuplicateItem(ins, v)); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PopIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PopIns.java index ba40c67a4..7ad08cd9c 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PopIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PopIns.java @@ -41,7 +41,7 @@ public class PopIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { if (stack.size() > 0) { GraphTargetItem top = stack.pop(); if (top instanceof CallPropertyTreeItem) { diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PopScopeIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PopScopeIns.java index e6222721b..955a6a404 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PopScopeIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PopScopeIns.java @@ -42,7 +42,7 @@ public class PopScopeIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, MethodBody body, ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, MethodBody body, ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { GraphTargetItem scope = (GraphTargetItem) scopeStack.pop(); if (scope instanceof WithObjectTreeItem) { scope = ((WithObjectTreeItem) scope).scope; diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushByteIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushByteIns.java index be5413f0b..d1210311a 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushByteIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushByteIns.java @@ -41,7 +41,7 @@ public class PushByteIns extends InstructionDefinition implements PushIntegerTyp } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { stack.push(new IntegerValueTreeItem(ins, Long.valueOf(ins.operands[0]))); } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushDoubleIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushDoubleIns.java index 5c2eb12ba..ae595fda0 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushDoubleIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushDoubleIns.java @@ -41,7 +41,7 @@ public class PushDoubleIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { stack.push(new FloatValueTreeItem(ins, constants.constant_double[ins.operands[0]])); } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushFalseIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushFalseIns.java index bae43fb71..93358e0fd 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushFalseIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushFalseIns.java @@ -40,7 +40,7 @@ public class PushFalseIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { stack.push(new BooleanTreeItem(ins, Boolean.FALSE)); } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushIntIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushIntIns.java index c41395bd3..5984fb24d 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushIntIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushIntIns.java @@ -41,7 +41,7 @@ public class PushIntIns extends InstructionDefinition implements PushIntegerType } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { stack.push(new IntegerValueTreeItem(ins, constants.constant_int[ins.operands[0]])); } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushNamespaceIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushNamespaceIns.java index 18c29cbce..7f6f86174 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushNamespaceIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushNamespaceIns.java @@ -36,7 +36,7 @@ public class PushNamespaceIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, MethodBody body, ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, MethodBody body, ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { stack.push(new NameSpaceTreeItem(ins, ins.operands[0])); } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushNanIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushNanIns.java index 848970a02..0db3f3b42 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushNanIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushNanIns.java @@ -34,7 +34,7 @@ public class PushNanIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { stack.push(new NanTreeItem(ins)); } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushNullIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushNullIns.java index 17371b9d1..038487b6d 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushNullIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushNullIns.java @@ -34,7 +34,7 @@ public class PushNullIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { stack.push(new NullTreeItem(ins)); } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushScopeIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushScopeIns.java index 2c846fab4..88bf50f64 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushScopeIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushScopeIns.java @@ -39,7 +39,7 @@ public class PushScopeIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { scopeStack.push(stack.pop()); } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushShortIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushShortIns.java index c6bc249ec..cea21d1b4 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushShortIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushShortIns.java @@ -41,7 +41,7 @@ public class PushShortIns extends InstructionDefinition implements PushIntegerTy } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { stack.push(new IntegerValueTreeItem(ins, Long.valueOf(ins.operands[0]))); } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushStringIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushStringIns.java index 0da81ce27..bf980561a 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushStringIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushStringIns.java @@ -41,7 +41,7 @@ public class PushStringIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { stack.push(new StringTreeItem(ins, constants.constant_string[ins.operands[0]])); } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushTrueIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushTrueIns.java index e0d06eea2..4b399e693 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushTrueIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushTrueIns.java @@ -40,7 +40,7 @@ public class PushTrueIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { stack.push(new BooleanTreeItem(ins, Boolean.TRUE)); } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushUIntIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushUIntIns.java index 4f27a36f3..3352fb258 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushUIntIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushUIntIns.java @@ -41,7 +41,7 @@ public class PushUIntIns extends InstructionDefinition implements PushIntegerTyp } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { stack.push(new IntegerValueTreeItem(ins, constants.constant_uint[ins.operands[0]])); } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushUndefinedIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushUndefinedIns.java index 550d215b5..abe067542 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushUndefinedIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushUndefinedIns.java @@ -34,7 +34,7 @@ public class PushUndefinedIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { stack.push(new UndefinedTreeItem(ins)); } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushWithIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushWithIns.java index ea3c3fe46..66c4cf5d4 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushWithIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushWithIns.java @@ -36,7 +36,7 @@ public class PushWithIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, MethodBody body, ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, MethodBody body, ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { GraphTargetItem w = (GraphTargetItem) stack.pop(); WithObjectTreeItem wot = new WithObjectTreeItem(ins, w); scopeStack.push(wot); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/SwapIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/SwapIns.java index de70ac382..c1feac2db 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/SwapIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/SwapIns.java @@ -44,7 +44,7 @@ public class SwapIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, MethodBody body, ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, MethodBody body, ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { GraphTargetItem o1 = stack.pop(); GraphTargetItem o2 = stack.pop(); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ApplyTypeIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ApplyTypeIns.java index c34c7b279..00aa9a8bd 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ApplyTypeIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ApplyTypeIns.java @@ -45,7 +45,7 @@ public class ApplyTypeIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { int argCount = ins.operands[0]; List params = new ArrayList<>(); for (int i = 0; i < argCount; i++) { diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/AsTypeIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/AsTypeIns.java index 0ec2709ea..50d2b30e7 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/AsTypeIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/AsTypeIns.java @@ -47,7 +47,7 @@ public class AsTypeIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { GraphTargetItem val = (GraphTargetItem) stack.pop(); stack.push(new AsTypeTreeItem(ins, val, new FullMultinameTreeItem(ins, ins.operands[0]))); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/AsTypeLateIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/AsTypeLateIns.java index fe8649d1a..dc2267d4e 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/AsTypeLateIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/AsTypeLateIns.java @@ -44,7 +44,7 @@ public class AsTypeLateIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { GraphTargetItem cls = (GraphTargetItem) stack.pop(); GraphTargetItem val = (GraphTargetItem) stack.pop(); stack.push(new AsTypeTreeItem(ins, val, cls)); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/CoerceAIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/CoerceAIns.java index 657b0e532..ca22fac7c 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/CoerceAIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/CoerceAIns.java @@ -44,7 +44,7 @@ public class CoerceAIns extends InstructionDefinition implements CoerceOrConvert } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { stack.push(new CoerceTreeItem(ins, (GraphTargetItem) stack.pop(), getTargetType(constants, ins, fullyQualifiedNames))); } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/CoerceIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/CoerceIns.java index 3afebd85f..42930e946 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/CoerceIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/CoerceIns.java @@ -42,7 +42,7 @@ public class CoerceIns extends InstructionDefinition implements CoerceOrConvertT } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { int multinameIndex = ins.operands[0]; stack.push(new CoerceTreeItem(ins, (GraphTargetItem) stack.pop(), constants.constant_multiname[multinameIndex].getName(constants, fullyQualifiedNames))); } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/CoerceSIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/CoerceSIns.java index 18b066366..5f79510bf 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/CoerceSIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/CoerceSIns.java @@ -41,7 +41,7 @@ public class CoerceSIns extends InstructionDefinition implements CoerceOrConvert } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { stack.push(new CoerceTreeItem(ins, (GraphTargetItem) stack.pop(), getTargetType(constants, ins, fullyQualifiedNames))); } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertBIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertBIns.java index d31cb3300..b495d08d5 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertBIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertBIns.java @@ -51,7 +51,7 @@ public class ConvertBIns extends InstructionDefinition implements CoerceOrConver } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { stack.push(new ConvertTreeItem(ins, (GraphTargetItem) stack.pop(), getTargetType(constants, ins, fullyQualifiedNames))); } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertDIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertDIns.java index 4ebb1291e..b89240d40 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertDIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertDIns.java @@ -59,7 +59,7 @@ public class ConvertDIns extends InstructionDefinition implements CoerceOrConver } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { stack.push(new ConvertTreeItem(ins, (GraphTargetItem) stack.pop(), getTargetType(constants, ins, fullyQualifiedNames))); } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertIIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertIIns.java index fe28f9f06..60e24536b 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertIIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertIIns.java @@ -57,7 +57,7 @@ public class ConvertIIns extends InstructionDefinition implements CoerceOrConver } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { stack.push(new ConvertTreeItem(ins, (GraphTargetItem) stack.pop(), getTargetType(constants, ins, fullyQualifiedNames))); } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertOIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertOIns.java index 75c678bce..a7e09c812 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertOIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertOIns.java @@ -40,7 +40,7 @@ public class ConvertOIns extends InstructionDefinition implements CoerceOrConver } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { stack.push(new ConvertTreeItem(ins, (GraphTargetItem) stack.pop(), getTargetType(constants, ins, fullyQualifiedNames))); } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertSIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertSIns.java index 36cd984b8..66499319f 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertSIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertSIns.java @@ -41,7 +41,7 @@ public class ConvertSIns extends InstructionDefinition implements CoerceOrConver } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { stack.push(new ConvertTreeItem(ins, (GraphTargetItem) stack.pop(), getTargetType(constants, ins, fullyQualifiedNames))); } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertUIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertUIns.java index 2bc85efed..bdae8ce09 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertUIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertUIns.java @@ -40,7 +40,7 @@ public class ConvertUIns extends InstructionDefinition implements CoerceOrConver } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { stack.push(new ConvertTreeItem(ins, (GraphTargetItem) stack.pop(), getTargetType(constants, ins, fullyQualifiedNames))); } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/InstanceOfIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/InstanceOfIns.java index fa32f55ce..b35194fe1 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/InstanceOfIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/InstanceOfIns.java @@ -34,7 +34,7 @@ public class InstanceOfIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { GraphTargetItem type = (GraphTargetItem) stack.pop(); GraphTargetItem value = (GraphTargetItem) stack.pop(); stack.push(new InstanceOfTreeItem(ins, value, type)); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/IsTypeIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/IsTypeIns.java index 4c25caa95..7edd99429 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/IsTypeIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/IsTypeIns.java @@ -36,7 +36,7 @@ public class IsTypeIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { int multinameIndex = ins.operands[0]; GraphTargetItem value = (GraphTargetItem) stack.pop(); stack.push(new IsTypeTreeItem(ins, value, new FullMultinameTreeItem(ins, multinameIndex))); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/IsTypeLateIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/IsTypeLateIns.java index 2903121f7..12cc038cf 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/IsTypeLateIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/IsTypeLateIns.java @@ -34,7 +34,7 @@ public class IsTypeLateIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { GraphTargetItem type = (GraphTargetItem) stack.pop(); GraphTargetItem value = (GraphTargetItem) stack.pop(); stack.push(new IsTypeTreeItem(ins, value, type)); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/TypeOfIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/TypeOfIns.java index 3bd4c926d..5a9a1f0af 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/TypeOfIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/TypeOfIns.java @@ -34,7 +34,7 @@ public class TypeOfIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { stack.push(new TypeOfTreeItem(ins, (GraphTargetItem) stack.pop())); } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/CheckFilterIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/CheckFilterIns.java index be738686e..84a53d011 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/CheckFilterIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/CheckFilterIns.java @@ -40,7 +40,7 @@ public class CheckFilterIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { GraphTargetItem obj = stack.pop(); stack.push(new FilteredCheckTreeItem(ins, obj)); } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/DXNSIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/DXNSIns.java index fb849f241..90e1d040f 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/DXNSIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/DXNSIns.java @@ -46,7 +46,7 @@ public class DXNSIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, HashMap localRegs, Stack stack, Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, MethodBody body, ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, HashMap localRegs, Stack stack, Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, MethodBody body, ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { output.add(new DefaultXMLNamespace(ins, new StringTreeItem(ins, constants.constant_string[ins.operands[0]]))); } } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/DXNSLateIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/DXNSLateIns.java index 75f82dd42..96fe34b24 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/DXNSLateIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/DXNSLateIns.java @@ -41,7 +41,7 @@ public class DXNSLateIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { GraphTargetItem xmlns = stack.pop(); output.add(new DefaultXMLNamespace(ins, xmlns)); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/EscXAttrIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/EscXAttrIns.java index 878c7e662..852fb5e6e 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/EscXAttrIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/EscXAttrIns.java @@ -42,7 +42,7 @@ public class EscXAttrIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { stack.push(new EscapeXAttrTreeItem(ins, stack.pop())); } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/EscXElemIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/EscXElemIns.java index 4e7542e11..77d14db1d 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/EscXElemIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/EscXElemIns.java @@ -42,7 +42,7 @@ public class EscXElemIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, java.util.Stack scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List output, com.jpexs.decompiler.flash.abc.types.MethodBody body, com.jpexs.decompiler.flash.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path) { stack.push(new EscapeXElemTreeItem(ins, stack.pop())); } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/types/MethodBody.java b/trunk/src/com/jpexs/decompiler/flash/abc/types/MethodBody.java index 1efa8e821..414bf2269 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/types/MethodBody.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/types/MethodBody.java @@ -22,6 +22,7 @@ import com.jpexs.decompiler.flash.abc.avm2.AVM2Code; import com.jpexs.decompiler.flash.abc.avm2.CodeStats; import com.jpexs.decompiler.flash.abc.avm2.ConstantPool; import com.jpexs.decompiler.flash.abc.types.traits.Traits; +import com.jpexs.decompiler.flash.graph.Graph; import com.jpexs.decompiler.flash.graph.GraphTargetItem; import com.jpexs.decompiler.flash.helpers.Helper; import com.jpexs.decompiler.flash.helpers.Highlighting; @@ -35,7 +36,7 @@ import java.util.logging.Logger; public class MethodBody implements Cloneable, Serializable { - boolean debugMode = false; + boolean debugMode = true; public int method_info; public int max_stack; public int max_regs; @@ -72,8 +73,8 @@ public class MethodBody implements Cloneable, Serializable { code.restoreControlFlow(constants, this); } - public int removeTraps(ConstantPool constants, ABC abc, int scriptIndex, int classIndex, boolean isStatic) { - return code.removeTraps(constants, this, abc, scriptIndex, classIndex, isStatic); + public int removeTraps(ConstantPool constants, ABC abc, int scriptIndex, int classIndex, boolean isStatic, String path) { + return code.removeTraps(constants, this, abc, scriptIndex, classIndex, isStatic, path); } public HashMap getLocalRegNames(ABC abc) { @@ -106,6 +107,14 @@ public class MethodBody implements Cloneable, Serializable { if (debugMode) { System.err.println("Decompiling " + path); } + if (path.equals("")) { + Logger.getLogger(MethodBody.class.getName()).log(Level.SEVERE, "Empty", new Exception()); + System.exit(0); + } + if (path.startsWith("*.")) { + Logger.getLogger(MethodBody.class.getName()).log(Level.SEVERE, "Star", new Exception()); + //System.exit(0); + } String s = ""; if (!(Boolean) Configuration.getConfig("decompile", Boolean.TRUE)) { s = "//Decompilation skipped"; @@ -123,14 +132,14 @@ public class MethodBody implements Cloneable, Serializable { deobfuscated.markMappedOffsets(); if ((Boolean) Configuration.getConfig("autoDeobfuscate", true)) { try { - deobfuscated.removeTraps(constants, b, abc, scriptIndex, classIndex, isStatic); + deobfuscated.removeTraps(constants, b, abc, scriptIndex, classIndex, isStatic, path); } catch (Exception ex) { Logger.getLogger(MethodBody.class.getName()).log(Level.SEVERE, "Error during remove traps", ex); } } //deobfuscated.restoreControlFlow(constants, b); //try { - s += deobfuscated.toSource(path, isStatic, scriptIndex, classIndex, abc, constants, method_info, b, hilight, getLocalRegNames(abc), scopeStack, isStaticInitializer, fullyQualifiedNames, initTraits); + s += deobfuscated.toSource(path, isStatic, scriptIndex, classIndex, abc, constants, method_info, b, hilight, getLocalRegNames(abc), scopeStack, isStaticInitializer, fullyQualifiedNames, initTraits, Graph.SOP_USE_STATIC); s = s.trim(); if (hilight) { s = Highlighting.hilighMethod(s, this.method_info); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/types/ScriptInfo.java b/trunk/src/com/jpexs/decompiler/flash/abc/types/ScriptInfo.java index a3369b13a..d23eb6852 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/types/ScriptInfo.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/types/ScriptInfo.java @@ -59,14 +59,15 @@ public class ScriptInfo { traitIndices.addAll(otherTraits); } otherTraits = new ArrayList<>(); - ret.add(new MyEntry<>(new ClassPath(packageName, objectName), new ScriptPack(abc, scriptIndex, traitIndices))); + ClassPath cp = new ClassPath(packageName, objectName); + ret.add(new MyEntry<>(cp, new ScriptPack(cp, abc, scriptIndex, traitIndices))); } } return ret; } - public int removeTraps(int scriptIndex, ABC abc) { - return traits.removeTraps(scriptIndex, -1, true, abc); + public int removeTraps(int scriptIndex, ABC abc, String path) { + return traits.removeTraps(scriptIndex, -1, true, abc, path); } @Override diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/Trait.java b/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/Trait.java index e59550df2..82b5ddd80 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/Trait.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/Trait.java @@ -142,7 +142,7 @@ public abstract class Trait implements Serializable { } } - public abstract int removeTraps(int scriptIndex, int classIndex, boolean isStatic, ABC abc); + public abstract int removeTraps(int scriptIndex, int classIndex, boolean isStatic, ABC abc, String path); public String getPath(ABC abc) { Multiname name = getName(abc); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/TraitClass.java b/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/TraitClass.java index 8b963671d..23eb444c4 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/TraitClass.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/TraitClass.java @@ -444,7 +444,7 @@ public class TraitClass extends Trait implements TraitWithSlot { String bodyStr = ""; bodyIndex = abc.findBodyIndex(abc.class_info[class_info].cinit_index); if (bodyIndex != -1) { - bodyStr = abc.bodies[bodyIndex].toString(packageName + "." + abc.instance_info[class_info].getName(abc.constants).getName(abc.constants, fullyQualifiedNames) + ".staticinitializer", pcode, true, scriptIndex, class_info, abc, abc.constants, abc.method_info, new Stack(), true, highlight, fullyQualifiedNames, abc.class_info[class_info].static_traits); + bodyStr = abc.bodies[bodyIndex].toString(path +/*packageName +*/ "/" + abc.instance_info[class_info].getName(abc.constants).getName(abc.constants, fullyQualifiedNames) + ".staticinitializer", pcode, true, scriptIndex, class_info, abc, abc.constants, abc.method_info, new Stack(), true, highlight, fullyQualifiedNames, abc.class_info[class_info].static_traits); if (!highlight) { bodyStr = Highlighting.stripHilights(bodyStr); } @@ -481,7 +481,7 @@ public class TraitClass extends Trait implements TraitWithSlot { bodyStr = ""; bodyIndex = abc.findBodyIndex(abc.instance_info[class_info].iinit_index); if (bodyIndex != -1) { - bodyStr = ABC.addTabs(abc.bodies[bodyIndex].toString(packageName + "." + abc.instance_info[class_info].getName(abc.constants).getName(abc.constants, fullyQualifiedNames) + ".initializer", pcode, false, scriptIndex, class_info, abc, abc.constants, abc.method_info, new Stack(), false, highlight, fullyQualifiedNames, abc.instance_info[class_info].instance_traits), 3); + bodyStr = ABC.addTabs(abc.bodies[bodyIndex].toString(path +/*packageName +*/ "/" + abc.instance_info[class_info].getName(abc.constants).getName(abc.constants, fullyQualifiedNames) + ".initializer", pcode, false, scriptIndex, class_info, abc, abc.constants, abc.method_info, new Stack(), false, highlight, fullyQualifiedNames, abc.instance_info[class_info].instance_traits), 3); if (!highlight) { bodyStr = Highlighting.stripHilights(bodyStr); } @@ -498,9 +498,9 @@ public class TraitClass extends Trait implements TraitWithSlot { //} //static variables,constants & methods - outTraits.add(abc.class_info[class_info].static_traits.convert(packageName + "." + abc.instance_info[class_info].getName(abc.constants).getName(abc.constants, fullyQualifiedNames), abcTags, abc, true, pcode, false, scriptIndex, class_info, highlight, fullyQualifiedNames, paralel)); + outTraits.add(abc.class_info[class_info].static_traits.convert(path +/*packageName +*/ "/" + abc.instance_info[class_info].getName(abc.constants).getName(abc.constants, fullyQualifiedNames), abcTags, abc, true, pcode, false, scriptIndex, class_info, highlight, fullyQualifiedNames, paralel)); - outTraits.add(abc.instance_info[class_info].instance_traits.convert(packageName + "." + abc.instance_info[class_info].getName(abc.constants).getName(abc.constants, fullyQualifiedNames), abcTags, abc, false, pcode, false, scriptIndex, class_info, highlight, fullyQualifiedNames, paralel)); + outTraits.add(abc.instance_info[class_info].instance_traits.convert(path +/*packageName +*/ "/" + abc.instance_info[class_info].getName(abc.constants).getName(abc.constants, fullyQualifiedNames), abcTags, abc, false, pcode, false, scriptIndex, class_info, highlight, fullyQualifiedNames, paralel)); StringBuilder bui = new StringBuilder(); @@ -544,18 +544,18 @@ public class TraitClass extends Trait implements TraitWithSlot { } @Override - public int removeTraps(int scriptIndex, int classIndex, boolean isStatic, ABC abc) { + public int removeTraps(int scriptIndex, int classIndex, boolean isStatic, ABC abc, String path) { int iInitializer = abc.findBodyIndex(abc.instance_info[class_info].iinit_index); int ret = 0; if (iInitializer != -1) { - ret += abc.bodies[iInitializer].removeTraps(abc.constants, abc, scriptIndex, class_info, false); + ret += abc.bodies[iInitializer].removeTraps(abc.constants, abc, scriptIndex, class_info, false, path); } int sInitializer = abc.findBodyIndex(abc.class_info[class_info].cinit_index); if (sInitializer != -1) { - ret += abc.bodies[sInitializer].removeTraps(abc.constants, abc, scriptIndex, class_info, true); + ret += abc.bodies[sInitializer].removeTraps(abc.constants, abc, scriptIndex, class_info, true, path); } - ret += abc.instance_info[class_info].instance_traits.removeTraps(scriptIndex, class_info, false, abc); - ret += abc.class_info[class_info].static_traits.removeTraps(scriptIndex, class_info, true, abc); + ret += abc.instance_info[class_info].instance_traits.removeTraps(scriptIndex, class_info, false, abc, path); + ret += abc.class_info[class_info].static_traits.removeTraps(scriptIndex, class_info, true, abc, path); return ret; } } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/TraitFunction.java b/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/TraitFunction.java index ee189d0dc..54060b5c3 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/TraitFunction.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/TraitFunction.java @@ -62,10 +62,10 @@ public class TraitFunction extends Trait implements TraitWithSlot { } @Override - public int removeTraps(int scriptIndex, int classIndex, boolean isStatic, ABC abc) { + public int removeTraps(int scriptIndex, int classIndex, boolean isStatic, ABC abc, String path) { int bodyIndex = abc.findBodyIndex(method_info); if (bodyIndex != -1) { - return abc.bodies[bodyIndex].removeTraps(abc.constants, abc, scriptIndex, classIndex, isStatic); + return abc.bodies[bodyIndex].removeTraps(abc.constants, abc, scriptIndex, classIndex, isStatic, path); } return 0; } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/TraitMethodGetterSetter.java b/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/TraitMethodGetterSetter.java index 9cf7990d1..f729c414c 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/TraitMethodGetterSetter.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/TraitMethodGetterSetter.java @@ -65,10 +65,10 @@ public class TraitMethodGetterSetter extends Trait { } @Override - public int removeTraps(int scriptIndex, int classIndex, boolean isStatic, ABC abc) { + public int removeTraps(int scriptIndex, int classIndex, boolean isStatic, ABC abc, String path) { int bodyIndex = abc.findBodyIndex(method_info); if (bodyIndex != -1) { - return abc.bodies[bodyIndex].removeTraps(abc.constants, abc, scriptIndex, classIndex, isStatic); + return abc.bodies[bodyIndex].removeTraps(abc.constants, abc, scriptIndex, classIndex, isStatic, path); } return 0; } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/TraitSlotConst.java b/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/TraitSlotConst.java index 3e97b9e6b..f2879d13a 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/TraitSlotConst.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/TraitSlotConst.java @@ -176,7 +176,7 @@ public class TraitSlotConst extends Trait implements TraitWithSlot { } @Override - public int removeTraps(int scriptIndex, int classIndex, boolean isStatic, ABC abc) { + public int removeTraps(int scriptIndex, int classIndex, boolean isStatic, ABC abc, String path) { //do nothing return 0; } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/Traits.java b/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/Traits.java index 4c17bbd04..40b10968f 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/Traits.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/Traits.java @@ -34,10 +34,10 @@ public class Traits implements Serializable { public Trait traits[] = new Trait[0]; - public int removeTraps(int scriptIndex, int classIndex, boolean isStatic, ABC abc) { + public int removeTraps(int scriptIndex, int classIndex, boolean isStatic, ABC abc, String path) { int ret = 0; for (Trait t : traits) { - ret += t.removeTraps(scriptIndex, classIndex, isStatic, abc); + ret += t.removeTraps(scriptIndex, classIndex, isStatic, abc, path); } return ret; } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/Action.java b/trunk/src/com/jpexs/decompiler/flash/action/Action.java index 4a7d85d8b..4dae046a0 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/Action.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/Action.java @@ -16,6 +16,7 @@ */ package com.jpexs.decompiler.flash.action; +import com.jpexs.decompiler.flash.Configuration; import com.jpexs.decompiler.flash.DisassemblyListener; import com.jpexs.decompiler.flash.SWF; import com.jpexs.decompiler.flash.SWFInputStream; @@ -369,10 +370,11 @@ public class Action implements GraphSourceItem { * @param version SWF version * @param hex Add hexadecimal? * @param swfPos + * @param path * @return ASM source as String */ - public static String actionsToString(List listeners, long address, List list, List importantOffsets, int version, boolean hex, long swfPos) { - return actionsToString(listeners, address, list, importantOffsets, new ArrayList(), version, hex, swfPos); + public static String actionsToString(List listeners, long address, List list, List importantOffsets, int version, boolean hex, long swfPos, String path) { + return actionsToString(listeners, address, list, importantOffsets, new ArrayList(), version, hex, swfPos, path); } /** @@ -386,15 +388,16 @@ public class Action implements GraphSourceItem { * @param version SWF version * @param hex Add hexadecimal? * @param swfPos + * @param path * @return ASM source as String */ - public static String actionsToString(List listeners, long address, List list, List importantOffsets, List constantPool, int version, boolean hex, long swfPos) { + public static String actionsToString(List listeners, long address, List list, List importantOffsets, List constantPool, int version, boolean hex, long swfPos, String path) { long offset; if (importantOffsets == null) { //setActionsAddresses(list, 0, version); importantOffsets = getActionsAllRefs(list, version); } - List cps = SWFInputStream.getConstantPool(new ArrayList(), new ActionGraphSource(list, version, new HashMap(), new HashMap(), new HashMap()), 0, version); + List cps = SWFInputStream.getConstantPool(new ArrayList(), new ActionGraphSource(list, version, new HashMap(), new HashMap(), new HashMap()), 0, version, path); if (!cps.isEmpty()) { setConstantPool(list, cps.get(cps.size() - 1)); } @@ -506,8 +509,24 @@ public class Action implements GraphSourceItem { if (lastPush) { ret.append("\r\n"); } + + ret.append(Highlighting.hilighOffset("", offset)); - ret.append(a.getASMSourceReplaced(list, importantOffsets, constantPool, version, hex)); + + int fixBranch = a.getFixBranch(); + if (fixBranch > -1) { + if (a instanceof ActionIf) { + ret.append("pop\r\n"); + if (fixBranch == 0) { //jump + ret.append("jump ofs"); + ret.append(Helper.formatAddress(offset + ((ActionIf) a).getJumpOffset())); + } else { + //nojump, ignore + } + } + } else { + ret.append(a.getASMSourceReplaced(list, importantOffsets, constantPool, version, hex)); + } ret.append(a.ignored ? "; ignored" : ""); ret.append(add); ret.append((a instanceof ActionPush) ? "" : "\r\n"); @@ -568,8 +587,10 @@ public class Action implements GraphSourceItem { * @param regNames Register names * @param variables Variables * @param functions Functions + * @param staticOperation the value of staticOperation + * @param path the value of path */ - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { } /** @@ -638,8 +659,8 @@ public class Action implements GraphSourceItem { return -1; } - public static List actionsToTree(List actions, int version) { - return actionsToTree(new HashMap(), new HashMap(), new HashMap(), actions, version); + public static List actionsToTree(List actions, int version, int staticOperation, String path) { + return actionsToTree(new HashMap(), new HashMap(), new HashMap(), actions, version, staticOperation, path); } /** @@ -647,12 +668,15 @@ public class Action implements GraphSourceItem { * * @param actions List of actions * @param version SWF version + * @param path * @return String with Source code */ - public static String actionsToSource(List actions, int version) { + public static String actionsToSource(List actions, int version, String path) { try { //List tree = actionsToTree(new HashMap(), actions, version); - List tree = actionsToTree(new HashMap(), new HashMap(), new HashMap(), actions, version); + int staticOperation = (Boolean) Configuration.getConfig("autoDeobfuscate", true) ? Graph.SOP_SKIP_STATIC : Graph.SOP_USE_STATIC; + + List tree = actionsToTree(new HashMap(), new HashMap(), new HashMap(), actions, version, staticOperation, path); return Graph.graphToString(tree); @@ -673,18 +697,20 @@ public class Action implements GraphSourceItem { * @param functions * @param actions List of actions * @param version SWF version + * @param staticOperation + * @param path * @return List of treeItems */ - public static List actionsToTree(HashMap regNames, HashMap variables, HashMap functions, List actions, int version) { + public static List actionsToTree(HashMap regNames, HashMap variables, HashMap functions, List actions, int version, int staticOperation, String path) { //Stack stack = new Stack(); - return ActionGraph.translateViaGraph(regNames, variables, functions, actions, version); + return ActionGraph.translateViaGraph(regNames, variables, functions, actions, version, staticOperation, path); //return actionsToTree(regNames, stack, actions, 0, actions.size() - 1, version); } @Override @SuppressWarnings("unchecked") - public void translate(List localData, Stack stack, List output) { - translate(stack, output, (HashMap) localData.get(0), (HashMap) localData.get(1), (HashMap) localData.get(2)); + public void translate(List localData, Stack stack, List output, int staticOperation, String path) { + translate(stack, output, (HashMap) localData.get(0), (HashMap) localData.get(1), (HashMap) localData.get(2), staticOperation, path); } @Override @@ -718,7 +744,7 @@ public class Action implements GraphSourceItem { } @Override - public void setIgnored(boolean ignored) { + public void setIgnored(boolean ignored, int pos) { this.ignored = ignored; } @@ -744,7 +770,7 @@ public class Action implements GraphSourceItem { logger.fine(s); } - public static List actionsPartToTree(HashMap registerNames, HashMap variables, HashMap functions, Stack stack, List actions, int start, int end, int version) { + public static List actionsPartToTree(HashMap registerNames, HashMap variables, HashMap functions, Stack stack, List actions, int start, int end, int version, int staticOperation, String path) { if (start < actions.size() && (end > 0) && (start > 0)) { log("Entering " + start + "-" + end + (actions.size() > 0 ? (" (" + actions.get(start).toString() + " - " + actions.get(end == actions.size() ? end - 1 : end) + ")") : "")); } @@ -809,6 +835,7 @@ public class Action implements GraphSourceItem { GraphSourceItemContainer cnt = (GraphSourceItemContainer) action; //List out=actionsPartToTree(new HashMap(), new HashMap(),new HashMap(), new Stack(), src, ip+1,endip-1 , version); long endAddr = action.getAddress() + cnt.getHeaderSize(); + String cntName = cnt.getName(); List> outs = new ArrayList<>(); for (long size : cnt.getContainerSizes()) { if (size == 0) { @@ -817,7 +844,7 @@ public class Action implements GraphSourceItem { } List out; try { - out = ActionGraph.translateViaGraph(cnt.getRegNames(), variables, functions, actions.subList(adr2ip(actions, endAddr, version), adr2ip(actions, endAddr + size, version)), version); + out = ActionGraph.translateViaGraph(cnt.getRegNames(), variables, functions, actions.subList(adr2ip(actions, endAddr, version), adr2ip(actions, endAddr + size, version)), version, staticOperation, path + (cntName == null ? "" : "/" + cntName)); } catch (Exception | OutOfMemoryError | StackOverflowError ex2) { Logger.getLogger(Action.class.getName()).log(Level.SEVERE, "Decompilation error", ex2); if (ex2 instanceof OutOfMemoryError) { @@ -936,7 +963,7 @@ public class Action implements GraphSourceItem { } } */ else { try { - action.translate(localData, stack, output); + action.translate(localData, stack, output, staticOperation, path); } catch (EmptyStackException ese) { Logger.getLogger(Action.class.getName()).log(Level.SEVERE, null, ese); output.add(new UnsupportedTreeItem(action, "Empty stack")); @@ -1256,14 +1283,14 @@ public class Action implements GraphSourceItem { return false; } - public static List removeNops(long address, List actions, int version, long swfPos) { + public static List removeNops(long address, List actions, int version, long swfPos, String path) { List ret = actions; if (true) { //return ret; } String s = null; try { - s = Highlighting.stripHilights(Action.actionsToString(new ArrayList(), address, ret, null, version, false, swfPos)); + s = Highlighting.stripHilights(Action.actionsToString(new ArrayList(), address, ret, null, version, false, swfPos, path)); ret = ASMParser.parse(address, swfPos, true, new StringReader(s), SWF.DEFAULT_VERSION); } catch (Exception ex) { Logger.getLogger(SWFInputStream.class.getName()).log(Level.SEVERE, "parsing error", ex); @@ -1307,4 +1334,15 @@ public class Action implements GraphSourceItem { } return 0; } + + @Override + public void setFixBranch(int pos) { + this.fixedBranch = pos; + } + private int fixedBranch = -1; + + @Override + public int getFixBranch() { + return fixedBranch; + } } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/ActionGraph.java b/trunk/src/com/jpexs/decompiler/flash/action/ActionGraph.java index c5d0b2f9b..c5499ef82 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/ActionGraph.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/ActionGraph.java @@ -64,13 +64,13 @@ public class ActionGraph extends Graph { }*/ } - public static List translateViaGraph(HashMap registerNames, HashMap variables, HashMap functions, List code, int version) { + public static List translateViaGraph(HashMap registerNames, HashMap variables, HashMap functions, List code, int version, int staticOperation, String path) { ActionGraph g = new ActionGraph(code, registerNames, variables, functions, version); List localData = new ArrayList<>(); localData.add(registerNames); g.init(); - return g.translate(localData); + return g.translate(localData, staticOperation, path); } @Override @@ -183,7 +183,7 @@ public class ActionGraph extends Graph { } @Override - protected List check(GraphSource code, List localData, List allParts, Stack stack, GraphPart parent, GraphPart part, List stopPart, List loops, List output, Loop currentLoop) { + protected List check(GraphSource code, List localData, List allParts, Stack stack, GraphPart parent, GraphPart part, List stopPart, List loops, List output, Loop currentLoop, int staticOperation, String path) { if (!output.isEmpty()) { if (output.get(output.size() - 1) instanceof StoreRegisterTreeItem) { StoreRegisterTreeItem str = (StoreRegisterTreeItem) output.get(output.size() - 1); @@ -220,7 +220,7 @@ public class ActionGraph extends Graph { while (part.nextParts.size() > 1 && part.nextParts.get(1).getHeight() > 1 && code.get(part.nextParts.get(1).end >= code.size() ? code.size() - 1 : part.nextParts.get(1).end) instanceof ActionIf - && ((top = translatePartGetStack(localData, part.nextParts.get(1), stack)) instanceof StrictEqTreeItem)) { + && ((top = translatePartGetStack(localData, part.nextParts.get(1), stack, staticOperation)) instanceof StrictEqTreeItem)) { cnt++; part = part.nextParts.get(1); pos++; @@ -248,7 +248,7 @@ public class ActionGraph extends Graph { List defaultCommands = new ArrayList<>(); List stopPart2 = new ArrayList<>(stopPart); stopPart2.add(defaultPart2); - defaultCommands = printGraph(new ArrayList(), localData, stack, allParts, null, defaultPart, stopPart2, loops); + defaultCommands = printGraph(new ArrayList(), localData, stack, allParts, null, defaultPart, stopPart2, loops, staticOperation, path); List loopContinues = new ArrayList<>(); @@ -329,7 +329,7 @@ public class ActionGraph extends Graph { if ((defaultPart != null) && (defaultCommands.isEmpty())) { List stopPart2x = new ArrayList<>(stopPart); stopPart2x.add(next); - defaultCommands = printGraph(new ArrayList(), localData, stack, allParts, null, defaultPart, stopPart2x, loops); + defaultCommands = printGraph(new ArrayList(), localData, stack, allParts, null, defaultPart, stopPart2x, loops, staticOperation, path); } if (!defaultCommands.isEmpty()) { @@ -378,7 +378,7 @@ public class ActionGraph extends Graph { if (breakPart != null) { stopPart2x.add(breakPart); } - cc.addAll(0, printGraph(new ArrayList(), localData, stack, allParts, null, caseBodies.get(i), stopPart2x, loops)); + cc.addAll(0, printGraph(new ArrayList(), localData, stack, allParts, null, caseBodies.get(i), stopPart2x, loops, staticOperation, path)); if (cc.size() >= 2) { if (cc.get(cc.size() - 1) instanceof BreakItem) { if ((cc.get(cc.size() - 2) instanceof ContinueItem) || (cc.get(cc.size() - 2) instanceof BreakItem)) { @@ -397,7 +397,7 @@ public class ActionGraph extends Graph { if (ti != null) { ret.add(ti); } else { - ret.addAll(printGraph(new ArrayList(), localData, stack, allParts, null, next, stopPart, loops)); + ret.addAll(printGraph(new ArrayList(), localData, stack, allParts, null, next, stopPart, loops, staticOperation, path)); } } } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/ActionGraphSource.java b/trunk/src/com/jpexs/decompiler/flash/action/ActionGraphSource.java index 6b4051bee..75d8df75f 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/ActionGraphSource.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/ActionGraphSource.java @@ -56,8 +56,8 @@ public class ActionGraphSource extends GraphSource { } @Override - public List translatePart(GraphPart part, List localData, Stack stack, int start, int end) { - return (Action.actionsPartToTree(registerNames, variables, functions, stack, actions, start, end, version)); + public List translatePart(GraphPart part, List localData, Stack stack, int start, int end, int staticOperation, String path) { + return (Action.actionsPartToTree(registerNames, variables, functions, stack, actions, start, end, version, staticOperation, path)); } private List posCache = null; diff --git a/trunk/src/com/jpexs/decompiler/flash/action/flashlite/ActionFSCommand2.java b/trunk/src/com/jpexs/decompiler/flash/action/flashlite/ActionFSCommand2.java index 169bbe587..6573268b9 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/flashlite/ActionFSCommand2.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/flashlite/ActionFSCommand2.java @@ -36,7 +36,7 @@ public class ActionFSCommand2 extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { long numArgs = popLong(stack); GraphTargetItem command = stack.pop(); List args = new ArrayList<>(); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/flashlite/ActionStrictMode.java b/trunk/src/com/jpexs/decompiler/flash/action/flashlite/ActionStrictMode.java index a0d7f0d61..7518814db 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/flashlite/ActionStrictMode.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/flashlite/ActionStrictMode.java @@ -61,7 +61,7 @@ public class ActionStrictMode extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { output.add(new StrictModeTreeItem(this, mode)); } } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/special/ActionEnd.java b/trunk/src/com/jpexs/decompiler/flash/action/special/ActionEnd.java index fa978c5d4..be4b8ad7a 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/special/ActionEnd.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/special/ActionEnd.java @@ -26,7 +26,7 @@ public class ActionEnd extends Action { public ActionEnd() { super(0, 0); - setIgnored(true); + setIgnored(true, 0); } @Override @@ -40,7 +40,7 @@ public class ActionEnd extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { //output.add(new SimpleActionTreeItem(this, "end()")); } } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/special/ActionNop.java b/trunk/src/com/jpexs/decompiler/flash/action/special/ActionNop.java index 73335c381..8c55fb1b5 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/special/ActionNop.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/special/ActionNop.java @@ -34,7 +34,7 @@ public class ActionNop extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { //output.add(new SimpleActionTreeItem(this, "nop();")); } } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf3/ActionGetURL.java b/trunk/src/com/jpexs/decompiler/flash/action/swf3/ActionGetURL.java index 71a5bdf0d..9bcaa596e 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf3/ActionGetURL.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf3/ActionGetURL.java @@ -68,7 +68,7 @@ public class ActionGetURL extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { output.add(new GetURLTreeItem(this, urlString, targetString)); } } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf3/ActionGoToLabel.java b/trunk/src/com/jpexs/decompiler/flash/action/swf3/ActionGoToLabel.java index 813b8b229..02fb49089 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf3/ActionGoToLabel.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf3/ActionGoToLabel.java @@ -69,7 +69,7 @@ public class ActionGoToLabel extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { output.add(new GotoLabelTreeItem(this, label)); } } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf3/ActionGotoFrame.java b/trunk/src/com/jpexs/decompiler/flash/action/swf3/ActionGotoFrame.java index d073a67cf..fa3b5c26b 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf3/ActionGotoFrame.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf3/ActionGotoFrame.java @@ -66,7 +66,7 @@ public class ActionGotoFrame extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { output.add(new GotoFrameTreeItem(this, frame)); } } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf3/ActionNextFrame.java b/trunk/src/com/jpexs/decompiler/flash/action/swf3/ActionNextFrame.java index 79f9d743b..fcc80c900 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf3/ActionNextFrame.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf3/ActionNextFrame.java @@ -35,7 +35,7 @@ public class ActionNextFrame extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { output.add(new SimpleActionTreeItem(this, "nextFrame()")); } } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf3/ActionPlay.java b/trunk/src/com/jpexs/decompiler/flash/action/swf3/ActionPlay.java index ec51c63ef..55e821bb5 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf3/ActionPlay.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf3/ActionPlay.java @@ -35,7 +35,7 @@ public class ActionPlay extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { output.add(new SimpleActionTreeItem(this, "Play()")); } } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf3/ActionPrevFrame.java b/trunk/src/com/jpexs/decompiler/flash/action/swf3/ActionPrevFrame.java index 040345868..b6c9ac9b7 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf3/ActionPrevFrame.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf3/ActionPrevFrame.java @@ -35,7 +35,7 @@ public class ActionPrevFrame extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { output.add(new SimpleActionTreeItem(this, "prevFrame()")); } } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf3/ActionSetTarget.java b/trunk/src/com/jpexs/decompiler/flash/action/swf3/ActionSetTarget.java index 7eed72792..0525907f7 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf3/ActionSetTarget.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf3/ActionSetTarget.java @@ -64,7 +64,7 @@ public class ActionSetTarget extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { output.add(new SetTargetTreeItem(this, targetName)); } } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf3/ActionStop.java b/trunk/src/com/jpexs/decompiler/flash/action/swf3/ActionStop.java index 038e104dc..d4106cffd 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf3/ActionStop.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf3/ActionStop.java @@ -35,7 +35,7 @@ public class ActionStop extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { output.add(new SimpleActionTreeItem(this, "stop()")); } } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf3/ActionStopSounds.java b/trunk/src/com/jpexs/decompiler/flash/action/swf3/ActionStopSounds.java index 116ce2cc8..25c8c2b74 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf3/ActionStopSounds.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf3/ActionStopSounds.java @@ -35,7 +35,7 @@ public class ActionStopSounds extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { output.add(new SimpleActionTreeItem(this, "stopAllSounds()")); } } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf3/ActionToggleQuality.java b/trunk/src/com/jpexs/decompiler/flash/action/swf3/ActionToggleQuality.java index 6ea1f4eec..f0ff29562 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf3/ActionToggleQuality.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf3/ActionToggleQuality.java @@ -35,7 +35,7 @@ public class ActionToggleQuality extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { output.add(new SimpleActionTreeItem(this, "toggleHighQuality()")); } } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf3/ActionWaitForFrame.java b/trunk/src/com/jpexs/decompiler/flash/action/swf3/ActionWaitForFrame.java index 6f3ed3046..499ff9e69 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf3/ActionWaitForFrame.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf3/ActionWaitForFrame.java @@ -83,9 +83,9 @@ public class ActionWaitForFrame extends Action implements ActionStore { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem frameTi = new DirectValueTreeItem(null, 0, new Long(frame), new ArrayList()); - List body = ActionGraph.translateViaGraph(regNames, variables, functions, skipped, SWF.DEFAULT_VERSION); + List body = ActionGraph.translateViaGraph(regNames, variables, functions, skipped, SWF.DEFAULT_VERSION, staticOperation, path); output.add(new IfFrameLoadedTreeItem(frameTi, body, this)); } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionAdd.java b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionAdd.java index 3045c8856..7ec69ca4c 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionAdd.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionAdd.java @@ -35,7 +35,7 @@ public class ActionAdd extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); GraphTargetItem b = stack.pop(); stack.push(new AddTreeItem(this, b, a, false)); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionAnd.java b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionAnd.java index 4755a61d1..dd209bbc4 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionAnd.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionAnd.java @@ -35,7 +35,7 @@ public class ActionAnd extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); GraphTargetItem b = stack.pop(); stack.push(new AndTreeItem(this, b, a)); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionAsciiToChar.java b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionAsciiToChar.java index 0a0618eaa..942bb2f67 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionAsciiToChar.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionAsciiToChar.java @@ -35,7 +35,7 @@ public class ActionAsciiToChar extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); stack.push(new AsciiToCharTreeItem(this, a)); } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionCall.java b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionCall.java index 12804be18..ca3fae39d 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionCall.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionCall.java @@ -35,7 +35,7 @@ public class ActionCall extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { output.add(new CallTreeItem(this, stack.pop())); } } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionCharToAscii.java b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionCharToAscii.java index da5db927c..418cd0107 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionCharToAscii.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionCharToAscii.java @@ -35,7 +35,7 @@ public class ActionCharToAscii extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); stack.push(new CharToAsciiTreeItem(this, a)); } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionCloneSprite.java b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionCloneSprite.java index ed9c009d5..580c94315 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionCloneSprite.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionCloneSprite.java @@ -35,7 +35,7 @@ public class ActionCloneSprite extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem depth = stack.pop(); GraphTargetItem target = stack.pop(); GraphTargetItem source = stack.pop(); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionDivide.java b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionDivide.java index 8cd98b599..36ae82c7d 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionDivide.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionDivide.java @@ -35,7 +35,7 @@ public class ActionDivide extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); GraphTargetItem b = stack.pop(); stack.push(new DivideTreeItem(this, b, a)); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionEndDrag.java b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionEndDrag.java index 3281b0b46..b70bbb56d 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionEndDrag.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionEndDrag.java @@ -35,7 +35,7 @@ public class ActionEndDrag extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { output.add(new SimpleActionTreeItem(this, "stopDrag()")); } } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionEquals.java b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionEquals.java index 75234b78c..32b995ff2 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionEquals.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionEquals.java @@ -35,7 +35,7 @@ public class ActionEquals extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); GraphTargetItem b = stack.pop(); stack.push(new EqTreeItem(this, b, a, false)); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionGetProperty.java b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionGetProperty.java index edfd379a1..1f77a8a37 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionGetProperty.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionGetProperty.java @@ -36,7 +36,7 @@ public class ActionGetProperty extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem index = stack.pop(); GraphTargetItem target = stack.pop(); int indexInt = 0; diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionGetTime.java b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionGetTime.java index 37731c1b6..1d8cdbbfb 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionGetTime.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionGetTime.java @@ -35,7 +35,7 @@ public class ActionGetTime extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { stack.push(new GetTimeTreeItem(this)); } } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionGetURL2.java b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionGetURL2.java index 82383f3f7..26ee4e026 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionGetURL2.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionGetURL2.java @@ -80,7 +80,7 @@ public class ActionGetURL2 extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem targetString = stack.pop(); GraphTargetItem urlString = stack.pop(); output.add(new GetURL2TreeItem(this, urlString, targetString, sendVarsMethod, loadTargetFlag, loadTargetFlag)); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionGetVariable.java b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionGetVariable.java index fa0b0a05f..eb444869e 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionGetVariable.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionGetVariable.java @@ -37,7 +37,7 @@ public class ActionGetVariable extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem name = stack.pop(); GraphTargetItem computedVal = variables.get(Highlighting.stripHilights(name.toStringNoQuotes((ConstantPool) null))); GetVariableTreeItem gvt = new GetVariableTreeItem(this, name); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionGotoFrame2.java b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionGotoFrame2.java index ae686bda1..3d3b18352 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionGotoFrame2.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionGotoFrame2.java @@ -84,7 +84,7 @@ public class ActionGotoFrame2 extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem frame = stack.pop(); output.add(new GotoFrame2TreeItem(this, frame, sceneBiasFlag, playFlag, sceneBias)); } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionLess.java b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionLess.java index f77015780..ce553b1c4 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionLess.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionLess.java @@ -35,7 +35,7 @@ public class ActionLess extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); GraphTargetItem b = stack.pop(); stack.push(new LtTreeItem(this, b, a, false)); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionMBAsciiToChar.java b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionMBAsciiToChar.java index 38f7d9f06..7771aa360 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionMBAsciiToChar.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionMBAsciiToChar.java @@ -35,7 +35,7 @@ public class ActionMBAsciiToChar extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); stack.push(new MBAsciiToCharTreeItem(this, a)); } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionMBCharToAscii.java b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionMBCharToAscii.java index b46801c3f..4b78b4ecd 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionMBCharToAscii.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionMBCharToAscii.java @@ -35,7 +35,7 @@ public class ActionMBCharToAscii extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); stack.push(new MBCharToAsciiTreeItem(this, a)); } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionMBStringExtract.java b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionMBStringExtract.java index 39f510295..0f0f21a25 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionMBStringExtract.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionMBStringExtract.java @@ -35,7 +35,7 @@ public class ActionMBStringExtract extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem count = stack.pop(); GraphTargetItem index = stack.pop(); GraphTargetItem value = stack.pop(); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionMBStringLength.java b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionMBStringLength.java index 604b2261e..04ee4b90a 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionMBStringLength.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionMBStringLength.java @@ -35,7 +35,7 @@ public class ActionMBStringLength extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); stack.push(new MBStringLengthTreeItem(this, a)); } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionMultiply.java b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionMultiply.java index 6d79e7503..20f5e0c75 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionMultiply.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionMultiply.java @@ -35,7 +35,7 @@ public class ActionMultiply extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); GraphTargetItem b = stack.pop(); stack.push(new MultiplyTreeItem(this, b, a)); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionNot.java b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionNot.java index 007046fbf..7c2bcf1f9 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionNot.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionNot.java @@ -35,7 +35,7 @@ public class ActionNot extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); stack.push(new NotItem(this, a)); } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionOr.java b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionOr.java index 60152b890..8daf6a847 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionOr.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionOr.java @@ -35,7 +35,7 @@ public class ActionOr extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); GraphTargetItem b = stack.pop(); stack.push(new OrTreeItem(this, b, a)); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionPop.java b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionPop.java index e14186228..954b04ce3 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionPop.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionPop.java @@ -38,7 +38,7 @@ public class ActionPop extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { if (stack.isEmpty()) { return; } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionPush.java b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionPush.java index d0a50ac30..95e9f74ff 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionPush.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionPush.java @@ -45,6 +45,25 @@ public class ActionPush extends Action { public List constantPool; public List ignoredParts = new ArrayList<>(); + @Override + public void setIgnored(boolean ignored, int pos) { + if (ignored) { + if (!ignoredParts.contains(pos)) { + ignoredParts.add(pos); + if (ignoredParts.size() == values.size()) { + super.setIgnored(ignored, 0); + } + } + } else { + if (ignoredParts.contains(pos)) { + ignoredParts.remove(pos); + super.setIgnored(false, 0); + } + } + + + } + public ActionPush(int actionLength, SWFInputStream sis, int version) throws IOException { super(0x96, actionLength); int type; @@ -276,7 +295,7 @@ public class ActionPush extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { int pos = 0; for (Object o : values) { if (ignoredParts.contains(pos)) { diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionRandomNumber.java b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionRandomNumber.java index 93132d36a..4f4a48c1d 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionRandomNumber.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionRandomNumber.java @@ -35,7 +35,7 @@ public class ActionRandomNumber extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem maximum = stack.pop(); stack.push(new RandomNumberTreeItem(this, maximum)); } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionRemoveSprite.java b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionRemoveSprite.java index f4819d2c1..449a7bf8f 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionRemoveSprite.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionRemoveSprite.java @@ -35,7 +35,7 @@ public class ActionRemoveSprite extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem target = stack.pop(); output.add(new RemoveSpriteTreeItem(this, target)); } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionSetProperty.java b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionSetProperty.java index 0dd0e1d61..b45de6ddb 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionSetProperty.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionSetProperty.java @@ -41,7 +41,7 @@ public class ActionSetProperty extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem value = stack.pop().getThroughDuplicate(); GraphTargetItem index = stack.pop().getThroughDuplicate(); GraphTargetItem target = stack.pop().getThroughDuplicate(); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionSetTarget2.java b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionSetTarget2.java index 4dbcf13dd..0f99012cd 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionSetTarget2.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionSetTarget2.java @@ -35,7 +35,7 @@ public class ActionSetTarget2 extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem target = stack.pop(); output.add(new SetTarget2TreeItem(this, target)); } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionSetVariable.java b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionSetVariable.java index 99733cec4..bc57edcb3 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionSetVariable.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionSetVariable.java @@ -43,7 +43,7 @@ public class ActionSetVariable extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem value = stack.pop().getThroughDuplicate(); GraphTargetItem name = stack.pop(); variables.put(Highlighting.stripHilights(name.toStringNoQuotes((ConstantPool) null)), value); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionStartDrag.java b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionStartDrag.java index 127054bf7..f205f7173 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionStartDrag.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionStartDrag.java @@ -37,7 +37,7 @@ public class ActionStartDrag extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem target = stack.pop(); GraphTargetItem lockCenter = stack.pop(); GraphTargetItem constrain = stack.pop(); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionStringAdd.java b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionStringAdd.java index 7efa58ada..202d10fe3 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionStringAdd.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionStringAdd.java @@ -35,7 +35,7 @@ public class ActionStringAdd extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); GraphTargetItem b = stack.pop(); stack.push(new StringAddTreeItem(this, b, a)); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionStringEquals.java b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionStringEquals.java index bbb867dac..345acf958 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionStringEquals.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionStringEquals.java @@ -35,7 +35,7 @@ public class ActionStringEquals extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); GraphTargetItem b = stack.pop(); stack.push(new StringEqTreeItem(this, b, a)); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionStringExtract.java b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionStringExtract.java index 4ce82ba38..4d5f06617 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionStringExtract.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionStringExtract.java @@ -35,7 +35,7 @@ public class ActionStringExtract extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem count = stack.pop(); GraphTargetItem index = stack.pop(); GraphTargetItem value = stack.pop(); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionStringLength.java b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionStringLength.java index f1d5995c9..1a67a4796 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionStringLength.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionStringLength.java @@ -35,7 +35,7 @@ public class ActionStringLength extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); stack.push(new StringLengthTreeItem(this, a)); } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionStringLess.java b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionStringLess.java index 1c1e321cf..2cb482671 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionStringLess.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionStringLess.java @@ -35,7 +35,7 @@ public class ActionStringLess extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); GraphTargetItem b = stack.pop(); stack.push(new StringLtTreeItem(this, b, a)); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionSubtract.java b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionSubtract.java index 17dce8b10..82af53318 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionSubtract.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionSubtract.java @@ -35,7 +35,7 @@ public class ActionSubtract extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); GraphTargetItem b = stack.pop(); stack.push(new SubtractTreeItem(this, b, a)); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionToInteger.java b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionToInteger.java index 2a21bd936..d2281991a 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionToInteger.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionToInteger.java @@ -35,7 +35,7 @@ public class ActionToInteger extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); stack.push(new ToIntegerTreeItem(this, a)); } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionTrace.java b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionTrace.java index f8ec7093d..1b09f2140 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionTrace.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionTrace.java @@ -35,7 +35,7 @@ public class ActionTrace extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem value = stack.pop(); output.add(new TraceTreeItem(this, value)); } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionWaitForFrame2.java b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionWaitForFrame2.java index 04699da5e..4652cc5f2 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionWaitForFrame2.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionWaitForFrame2.java @@ -90,9 +90,9 @@ public class ActionWaitForFrame2 extends Action implements ActionStore { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem frame = stack.pop(); - List body = ActionGraph.translateViaGraph(regNames, variables, functions, skipped, SWF.DEFAULT_VERSION); + List body = ActionGraph.translateViaGraph(regNames, variables, functions, skipped, SWF.DEFAULT_VERSION, staticOperation, path); output.add(new IfFrameLoadedTreeItem(frame, body, this)); } } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionAdd2.java b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionAdd2.java index 70b37ea30..cb6dc9e7c 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionAdd2.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionAdd2.java @@ -35,7 +35,7 @@ public class ActionAdd2 extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); GraphTargetItem b = stack.pop(); stack.push(new AddTreeItem(this, b, a, true)); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionBitAnd.java b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionBitAnd.java index 608f9b16e..b2e6e41ce 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionBitAnd.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionBitAnd.java @@ -35,7 +35,7 @@ public class ActionBitAnd extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); GraphTargetItem b = stack.pop(); stack.push(new BitAndTreeItem(this, b, a)); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionBitLShift.java b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionBitLShift.java index b2e7b2f2c..be02090a4 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionBitLShift.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionBitLShift.java @@ -35,7 +35,7 @@ public class ActionBitLShift extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); GraphTargetItem b = stack.pop(); stack.push(new LShiftTreeItem(this, b, a)); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionBitOr.java b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionBitOr.java index 7707fb795..a33d574b9 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionBitOr.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionBitOr.java @@ -35,7 +35,7 @@ public class ActionBitOr extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); GraphTargetItem b = stack.pop(); stack.push(new BitOrTreeItem(this, b, a)); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionBitRShift.java b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionBitRShift.java index 133b72ef5..b7a18ff0d 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionBitRShift.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionBitRShift.java @@ -35,7 +35,7 @@ public class ActionBitRShift extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); GraphTargetItem b = stack.pop(); stack.push(new RShiftTreeItem(this, b, a)); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionBitURShift.java b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionBitURShift.java index 91a40f30f..e9f7b7757 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionBitURShift.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionBitURShift.java @@ -35,7 +35,7 @@ public class ActionBitURShift extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); GraphTargetItem b = stack.pop(); stack.push(new URShiftTreeItem(this, b, a)); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionBitXor.java b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionBitXor.java index 69ac74ee4..72486d648 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionBitXor.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionBitXor.java @@ -35,7 +35,7 @@ public class ActionBitXor extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); GraphTargetItem b = stack.pop(); stack.push(new BitXorTreeItem(this, b, a)); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionCallFunction.java b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionCallFunction.java index 810d4bb13..619bbcc98 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionCallFunction.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionCallFunction.java @@ -38,7 +38,7 @@ public class ActionCallFunction extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem functionName = stack.pop(); long numArgs = popLong(stack); List args = new ArrayList<>(); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionCallMethod.java b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionCallMethod.java index 8ddd9f718..4737e48bf 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionCallMethod.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionCallMethod.java @@ -36,7 +36,7 @@ public class ActionCallMethod extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem methodName = stack.pop(); GraphTargetItem scriptObject = stack.pop(); long numArgs = popLong(stack); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionConstantPool.java b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionConstantPool.java index 8447f1369..f22da39cd 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionConstantPool.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionConstantPool.java @@ -90,6 +90,6 @@ public class ActionConstantPool extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { } } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionDecrement.java b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionDecrement.java index 81f900a96..9cbd26532 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionDecrement.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionDecrement.java @@ -35,7 +35,7 @@ public class ActionDecrement extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); stack.push(new DecrementTreeItem(this, a)); } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionDefineFunction.java b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionDefineFunction.java index e818890c5..6eea8293c 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionDefineFunction.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionDefineFunction.java @@ -194,7 +194,7 @@ public class ActionDefineFunction extends Action implements GraphSourceItemConta } @Override - public void translate(Stack stack, List output, HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { } @Override @@ -232,4 +232,9 @@ public class ActionDefineFunction extends Action implements GraphSourceItemConta public String getASMSourceBetween(int pos) { return ""; } + + @Override + public String getName() { + return "function"; + } } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionDefineLocal.java b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionDefineLocal.java index 5416ac2a8..cbf013479 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionDefineLocal.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionDefineLocal.java @@ -37,7 +37,7 @@ public class ActionDefineLocal extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem value = stack.pop(); GraphTargetItem name = stack.pop(); variables.put(Highlighting.stripHilights(name.toStringNoQuotes((ConstantPool) null)), value); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionDefineLocal2.java b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionDefineLocal2.java index f80cb1d61..ef52e620e 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionDefineLocal2.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionDefineLocal2.java @@ -35,7 +35,7 @@ public class ActionDefineLocal2 extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem name = stack.pop(); output.add(new DefineLocalTreeItem(this, name, null)); } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionDelete.java b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionDelete.java index 22e5969a2..883ca4e4d 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionDelete.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionDelete.java @@ -37,7 +37,7 @@ public class ActionDelete extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem propertyName = stack.pop(); GraphTargetItem object = stack.pop(); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionDelete2.java b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionDelete2.java index 4195bbe07..4f3e9a63c 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionDelete2.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionDelete2.java @@ -37,7 +37,7 @@ public class ActionDelete2 extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem propertyName = stack.pop(); output.add(new DeleteTreeItem(this, null, propertyName)); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionEnumerate.java b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionEnumerate.java index 25093b8bb..cd43ace10 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionEnumerate.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionEnumerate.java @@ -38,7 +38,7 @@ public class ActionEnumerate extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem object = stack.pop(); stack.push(new DirectValueTreeItem(null, 0, new Null(), new ArrayList())); stack.push(new EnumerateTreeItem(this, object)); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionEquals2.java b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionEquals2.java index a07d3b653..1d5ebf568 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionEquals2.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionEquals2.java @@ -35,7 +35,7 @@ public class ActionEquals2 extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); GraphTargetItem b = stack.pop(); stack.push(new EqTreeItem(this, b, a, true)); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionGetMember.java b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionGetMember.java index 1b0fea1d4..251d55584 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionGetMember.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionGetMember.java @@ -35,7 +35,7 @@ public class ActionGetMember extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem functionName = stack.pop(); GraphTargetItem object = stack.pop(); stack.push(new GetMemberTreeItem(this, object, functionName)); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionIncrement.java b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionIncrement.java index 17b18fb97..e8ea9b5d8 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionIncrement.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionIncrement.java @@ -35,7 +35,7 @@ public class ActionIncrement extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); stack.push(new IncrementTreeItem(this, a)); } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionInitArray.java b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionInitArray.java index f22a7b7ec..1ce54685e 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionInitArray.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionInitArray.java @@ -31,7 +31,7 @@ public class ActionInitArray extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { long numArgs = popLong(stack); List args = new ArrayList<>(); for (int l = 0; l < numArgs; l++) { diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionInitObject.java b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionInitObject.java index a1d6d3bd2..2bbcb3a15 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionInitObject.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionInitObject.java @@ -36,7 +36,7 @@ public class ActionInitObject extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { long numArgs = popLong(stack); List values = new ArrayList<>(); List names = new ArrayList<>(); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionLess2.java b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionLess2.java index 15a340f89..bbbf91061 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionLess2.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionLess2.java @@ -35,7 +35,7 @@ public class ActionLess2 extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); GraphTargetItem b = stack.pop(); stack.push(new LtTreeItem(this, b, a, true)); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionModulo.java b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionModulo.java index 6b7436810..9a9aa8884 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionModulo.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionModulo.java @@ -35,7 +35,7 @@ public class ActionModulo extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); GraphTargetItem b = stack.pop(); stack.push(new ModuloTreeItem(this, b, a)); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionNewMethod.java b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionNewMethod.java index 090479a15..8fee219ef 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionNewMethod.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionNewMethod.java @@ -36,7 +36,7 @@ public class ActionNewMethod extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem methodName = stack.pop(); GraphTargetItem scriptObject = stack.pop(); long numArgs = popLong(stack); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionNewObject.java b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionNewObject.java index ef54f0876..4abd4deb3 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionNewObject.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionNewObject.java @@ -36,7 +36,7 @@ public class ActionNewObject extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem objectName = stack.pop(); long numArgs = popLong(stack); List args = new ArrayList<>(); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionPushDuplicate.java b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionPushDuplicate.java index d4d3f6637..d8944e670 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionPushDuplicate.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionPushDuplicate.java @@ -35,7 +35,7 @@ public class ActionPushDuplicate extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem value = stack.pop(); stack.push(value); stack.push(value); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionReturn.java b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionReturn.java index be2c10aa2..bce6abefe 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionReturn.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionReturn.java @@ -35,7 +35,7 @@ public class ActionReturn extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem value = stack.pop(); output.add(new ReturnTreeItem(this, value)); } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionSetMember.java b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionSetMember.java index f70742553..8415554ee 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionSetMember.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionSetMember.java @@ -41,7 +41,7 @@ public class ActionSetMember extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem value = stack.pop().getThroughDuplicate(); GraphTargetItem memberName = stack.pop(); GraphTargetItem object = stack.pop(); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionStackSwap.java b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionStackSwap.java index 35a6aed50..5e5d73a0d 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionStackSwap.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionStackSwap.java @@ -35,7 +35,7 @@ public class ActionStackSwap extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); GraphTargetItem b = stack.pop(); stack.push(a); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionStoreRegister.java b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionStoreRegister.java index 31b96aa36..3a9d3e9f4 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionStoreRegister.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionStoreRegister.java @@ -73,7 +73,7 @@ public class ActionStoreRegister extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem value = stack.pop(); RegisterNumber rn = new RegisterNumber(registerNumber); if (regNames.containsKey(registerNumber)) { diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionTargetPath.java b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionTargetPath.java index 40f8f6f2a..6390ac0af 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionTargetPath.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionTargetPath.java @@ -35,7 +35,7 @@ public class ActionTargetPath extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem object = stack.pop(); stack.push(new TargetPathTreeItem(this, object)); } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionToNumber.java b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionToNumber.java index eb307c272..f1f32a416 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionToNumber.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionToNumber.java @@ -35,7 +35,7 @@ public class ActionToNumber extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem object = stack.pop(); stack.push(new ToNumberTreeItem(this, object)); } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionToString.java b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionToString.java index 25bd970cc..6ffaacf35 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionToString.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionToString.java @@ -35,7 +35,7 @@ public class ActionToString extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem object = stack.pop(); stack.push(new ToStringTreeItem(this, object)); } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionTypeOf.java b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionTypeOf.java index 6d502ef45..b0b330aac 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionTypeOf.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionTypeOf.java @@ -35,7 +35,7 @@ public class ActionTypeOf extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem object = stack.pop(); stack.push(new TypeOfTreeItem(this, object)); } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionWith.java b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionWith.java index 33fb6e09e..7ddf648eb 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionWith.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionWith.java @@ -126,4 +126,9 @@ public class ActionWith extends Action implements GraphSourceItemContainer { public HashMap getRegNames() { return new HashMap<>(); } + + @Override + public String getName() { + return null; + } } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf6/ActionEnumerate2.java b/trunk/src/com/jpexs/decompiler/flash/action/swf6/ActionEnumerate2.java index 9b7fbcddb..ed224e2be 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf6/ActionEnumerate2.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf6/ActionEnumerate2.java @@ -38,7 +38,7 @@ public class ActionEnumerate2 extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem object = stack.pop(); stack.push(new DirectValueTreeItem(null, 0, new Null(), new ArrayList())); stack.push(new EnumerateTreeItem(this, object)); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf6/ActionGreater.java b/trunk/src/com/jpexs/decompiler/flash/action/swf6/ActionGreater.java index c83e12489..65032abcb 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf6/ActionGreater.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf6/ActionGreater.java @@ -35,7 +35,7 @@ public class ActionGreater extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); GraphTargetItem b = stack.pop(); stack.push(new GtTreeItem(this, b, a)); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf6/ActionInstanceOf.java b/trunk/src/com/jpexs/decompiler/flash/action/swf6/ActionInstanceOf.java index 9736b995e..d4ccf77dc 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf6/ActionInstanceOf.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf6/ActionInstanceOf.java @@ -35,7 +35,7 @@ public class ActionInstanceOf extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); GraphTargetItem b = stack.pop(); stack.push(new InstanceOfTreeItem(this, b, a)); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf6/ActionStrictEquals.java b/trunk/src/com/jpexs/decompiler/flash/action/swf6/ActionStrictEquals.java index 261609c14..ebde8ffb6 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf6/ActionStrictEquals.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf6/ActionStrictEquals.java @@ -35,7 +35,7 @@ public class ActionStrictEquals extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); GraphTargetItem b = stack.pop(); stack.push(new StrictEqTreeItem(this, b, a)); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf6/ActionStringGreater.java b/trunk/src/com/jpexs/decompiler/flash/action/swf6/ActionStringGreater.java index ff5180d54..7d3635d3e 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf6/ActionStringGreater.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf6/ActionStringGreater.java @@ -35,7 +35,7 @@ public class ActionStringGreater extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem a = stack.pop(); GraphTargetItem b = stack.pop(); stack.push(new GtTreeItem(this, b, a)); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf7/ActionCastOp.java b/trunk/src/com/jpexs/decompiler/flash/action/swf7/ActionCastOp.java index fa0432c52..99ee5dbbd 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf7/ActionCastOp.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf7/ActionCastOp.java @@ -35,7 +35,7 @@ public class ActionCastOp extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem object = stack.pop(); GraphTargetItem constructor = stack.pop(); stack.push(new CastOpTreeItem(this, constructor, object)); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf7/ActionDefineFunction2.java b/trunk/src/com/jpexs/decompiler/flash/action/swf7/ActionDefineFunction2.java index 7602bea46..97ca0e611 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf7/ActionDefineFunction2.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf7/ActionDefineFunction2.java @@ -299,7 +299,7 @@ public class ActionDefineFunction2 extends Action implements GraphSourceItemCont } @Override - public void translate(Stack stack, List output, HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { } @Override @@ -373,4 +373,9 @@ public class ActionDefineFunction2 extends Action implements GraphSourceItemCont public String getASMSourceBetween(int pos) { return ""; } + + @Override + public String getName() { + return "function"; + } } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf7/ActionExtends.java b/trunk/src/com/jpexs/decompiler/flash/action/swf7/ActionExtends.java index 7cf8c0a86..daaebc3f3 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf7/ActionExtends.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf7/ActionExtends.java @@ -35,7 +35,7 @@ public class ActionExtends extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem superclass = stack.pop(); GraphTargetItem subclass = stack.pop(); output.add(new ExtendsTreeItem(this, subclass, superclass)); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf7/ActionImplementsOp.java b/trunk/src/com/jpexs/decompiler/flash/action/swf7/ActionImplementsOp.java index ed185ed3b..14e96cd6f 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf7/ActionImplementsOp.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf7/ActionImplementsOp.java @@ -36,7 +36,7 @@ public class ActionImplementsOp extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem subclass = stack.pop(); long inCount = popLong(stack); List superclasses = new ArrayList<>(); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf7/ActionThrow.java b/trunk/src/com/jpexs/decompiler/flash/action/swf7/ActionThrow.java index 66a75e358..4c9d845f0 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf7/ActionThrow.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf7/ActionThrow.java @@ -35,7 +35,7 @@ public class ActionThrow extends Action { } @Override - public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions) { + public void translate(Stack stack, List output, java.util.HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) { GraphTargetItem object = stack.pop(); output.add(new ThrowTreeItem(this, object)); } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf7/ActionTry.java b/trunk/src/com/jpexs/decompiler/flash/action/swf7/ActionTry.java index 24aa84451..d1986130a 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf7/ActionTry.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf7/ActionTry.java @@ -292,4 +292,9 @@ public class ActionTry extends Action implements GraphSourceItemContainer { public HashMap getRegNames() { return new HashMap<>(); } + + @Override + public String getName() { + return null; + } } diff --git a/trunk/src/com/jpexs/decompiler/flash/graph/Graph.java b/trunk/src/com/jpexs/decompiler/flash/graph/Graph.java index 81999cd9b..244fb920d 100644 --- a/trunk/src/com/jpexs/decompiler/flash/graph/Graph.java +++ b/trunk/src/com/jpexs/decompiler/flash/graph/Graph.java @@ -17,6 +17,7 @@ package com.jpexs.decompiler.flash.graph; import com.jpexs.decompiler.flash.action.Action; +import com.jpexs.decompiler.flash.ecma.EcmaScript; import com.jpexs.decompiler.flash.helpers.Highlighting; import java.util.ArrayList; import java.util.Arrays; @@ -36,6 +37,9 @@ public class Graph { public List heads; protected GraphSource code; private List alternateEntries; + public static final int SOP_USE_STATIC = 0; + public static final int SOP_SKIP_STATIC = 1; + public static final int SOP_REMOVE_STATIC = 2; public Graph(GraphSource code, List alternateEntries) { this.code = code; @@ -528,13 +532,13 @@ public class Graph { return part; } - public static List translateViaGraph(List localData, String path, GraphSource code, List alternateEntries) { + public static List translateViaGraph(List localData, String path, GraphSource code, List alternateEntries, int staticOperation) { Graph g = new Graph(code, alternateEntries); g.init(); - return g.translate(localData); + return g.translate(localData, staticOperation, path); } - public List translate(List localData) { + public List translate(List localData, int staticOperation, String path) { List allParts = new ArrayList<>(); for (GraphPart head : heads) { populateParts(head, allParts); @@ -554,7 +558,7 @@ public class Graph { } System.err.println("");//*/ - List ret = printGraph(new ArrayList(), localData, stack, allParts, null, heads.get(0), null, loops); + List ret = printGraph(new ArrayList(), localData, stack, allParts, null, heads.get(0), null, loops, staticOperation, path); processIfs(ret); finalProcessStack(stack, ret); finalProcessAll(ret, 0); @@ -730,7 +734,7 @@ public class Graph { return false; } - protected List check(GraphSource code, List localData, List allParts, Stack stack, GraphPart parent, GraphPart part, List stopPart, List loops, List output, Loop currentLoop) { + protected List check(GraphSource code, List localData, List allParts, Stack stack, GraphPart parent, GraphPart part, List stopPart, List loops, List output, Loop currentLoop, int staticOperation, String path) { return null; } @@ -739,13 +743,13 @@ public class Graph { } @SuppressWarnings("unchecked") - protected GraphTargetItem translatePartGetStack(List localData, GraphPart part, Stack stack) { + protected GraphTargetItem translatePartGetStack(List localData, GraphPart part, Stack stack, int staticOperation) { stack = (Stack) stack.clone(); - translatePart(localData, part, stack); + translatePart(localData, part, stack, staticOperation, null); return stack.pop(); } - protected List translatePart(List localData, GraphPart part, Stack stack) { + protected List translatePart(List localData, GraphPart part, Stack stack, int staticOperation, String path) { List sub = part.getSubParts(); List ret = new ArrayList<>(); int end; @@ -760,7 +764,7 @@ public class Graph { } end = p.end; int start = p.start; - ret.addAll(code.translatePart(part, localData, stack, start, end)); + ret.addAll(code.translatePart(part, localData, stack, start, end, staticOperation, path)); } return ret; } @@ -806,8 +810,8 @@ public class Graph { list.remove(list.size() - 1); } - protected List printGraph(List visited, List localData, Stack stack, List allParts, GraphPart parent, GraphPart part, List stopPart, List loops) { - return printGraph(visited, localData, stack, allParts, parent, part, stopPart, loops, null); + protected List printGraph(List visited, List localData, Stack stack, List allParts, GraphPart parent, GraphPart part, List stopPart, List loops, int staticOperation, String path) { + return printGraph(visited, localData, stack, allParts, parent, part, stopPart, loops, null, staticOperation, path); } protected GraphTargetItem checkLoop(LoopItem loopItem, List localData, List loops) { @@ -1043,6 +1047,8 @@ public class Graph { if (el.loopContinue != part) { lastP1 = el; + } else { + lastP1 = null; } } @@ -1278,7 +1284,7 @@ public class Graph { } } - protected List printGraph(List visited, List localData, Stack stack, List allParts, GraphPart parent, GraphPart part, List stopPart, List loops, List ret) { + protected List printGraph(List visited, List localData, Stack stack, List allParts, GraphPart parent, GraphPart part, List stopPart, List loops, List ret, int staticOperation, String path) { if (stopPart == null) { stopPart = new ArrayList<>(); } @@ -1418,7 +1424,7 @@ public class Graph { int end = p.end; int start = p.start; - output.addAll(code.translatePart(p, localData, stack, start, end)); + output.addAll(code.translatePart(p, localData, stack, start, end, staticOperation, path)); if ((end >= code.size() - 1) && p.nextParts.isEmpty()) { output.add(new ScriptEndItem()); } @@ -1464,7 +1470,7 @@ public class Graph { } else { List stopPart2 = new ArrayList<>(stopPart); stopPart2.add(reversed ? sp1 : sp0); - printGraph(visited, localData, stack, allParts, parent, next, stopPart2, loops); + printGraph(visited, localData, stack, allParts, parent, next, stopPart2, loops, staticOperation, path); GraphTargetItem second = stack.pop(); GraphTargetItem first = stack.pop(); @@ -1493,7 +1499,7 @@ public class Graph { if ((ti = checkLoop(next, stopPart, loops)) != null) { currentRet.add(ti); } else { - currentRet.addAll(printGraph(visited, localData, stack, allParts, parent, next, stopPart, loops)); + currentRet.addAll(printGraph(visited, localData, stack, allParts, parent, next, stopPart, loops, staticOperation, path)); } } parseNext = false; @@ -1516,7 +1522,7 @@ public class Graph { } else { List stopPart2 = new ArrayList<>(stopPart); stopPart2.add(reversed ? sp1 : sp0); - printGraph(visited, localData, stack, allParts, parent, next, stopPart2, loops); + printGraph(visited, localData, stack, allParts, parent, next, stopPart2, loops, staticOperation, path); GraphTargetItem second = stack.pop(); GraphTargetItem first = stack.pop(); @@ -1546,7 +1552,7 @@ public class Graph { if ((ti = checkLoop(next, stopPart, loops)) != null) { currentRet.add(ti); } else { - currentRet.addAll(printGraph(visited, localData, stack, allParts, parent, next, stopPart, loops)); + currentRet.addAll(printGraph(visited, localData, stack, allParts, parent, next, stopPart, loops, staticOperation, path)); } } parseNext = false; @@ -1556,7 +1562,7 @@ public class Graph { //********************************END PART DECOMPILING if (parseNext) { - List retCheck = check(code, localData, allParts, stack, parent, part, stopPart, loops, output, currentLoop); + List retCheck = check(code, localData, allParts, stack, parent, part, stopPart, loops, output, currentLoop, staticOperation, path); if (retCheck != null) { if (!retCheck.isEmpty()) { currentRet.addAll(retCheck); @@ -1610,9 +1616,9 @@ public class Graph { } if (next != p) { if (first) { - defaultCommands = printGraph(visited, prepareBranchLocalData(localData), stack, allParts, part, p, stopPart2, loops); + defaultCommands = printGraph(visited, prepareBranchLocalData(localData), stack, allParts, part, p, stopPart2, loops, staticOperation, path); } else { - caseCommands.add(printGraph(visited, prepareBranchLocalData(localData), stack, allParts, part, p, stopPart2, loops)); + caseCommands.add(printGraph(visited, prepareBranchLocalData(localData), stack, allParts, part, p, stopPart2, loops, staticOperation, path)); } vis.add(p); } @@ -1622,82 +1628,74 @@ public class Graph { currentRet.add(sw); swLoop.phase = 2; if (next != null) { - currentRet.addAll(printGraph(visited, localData, stack, allParts, part, next, stopPart, loops)); + currentRet.addAll(printGraph(visited, localData, stack, allParts, part, next, stopPart, loops, staticOperation, path)); } - } else if (part.nextParts.size() == 2) { - //List ignore = new ArrayList<>(); - //ignore.addAll(loopContinues); - - /*for (Loop el : loops) { - if (el.loopContinue == next) { - next = null; - break; - } - if (el.loopBreak == next) { - next = null; - break; - } - }*/ - + } //else + GraphPart nextOnePart = null; + if (part.nextParts.size() == 2) { GraphTargetItem expr = stack.pop(); if (expr instanceof LogicalOpItem) { expr = ((LogicalOpItem) expr).invert(); } else { expr = new NotItem(null, expr); } - GraphPart next = getNextCommonPart(part, loops);//part.getNextPartPath(loopContinues); //loopContinues); - - @SuppressWarnings("unchecked") - Stack trueStack = (Stack) stack.clone(); - @SuppressWarnings("unchecked") - Stack falseStack = (Stack) stack.clone(); - int trueStackSizeBefore = trueStack.size(); - int falseStackSizeBefore = falseStack.size(); - List onTrue = new ArrayList<>(); - boolean isEmpty = part.nextParts.get(0) == part.nextParts.get(1); - - if (isEmpty) { - next = part.nextParts.get(0); - } - - List stopPart2 = new ArrayList<>(stopPart); - if (next != null) { - stopPart2.add(next); - } - if (!isEmpty) { - onTrue = printGraph(visited, prepareBranchLocalData(localData), trueStack, allParts, part, part.nextParts.get(1), stopPart2, loops); - } - List onFalse = new ArrayList<>(); - - if (!isEmpty) { - onFalse = printGraph(visited, prepareBranchLocalData(localData), falseStack, allParts, part, part.nextParts.get(0), stopPart2, loops); - } - if (isEmpty(onTrue) && isEmpty(onFalse) && (trueStack.size() > trueStackSizeBefore) && (falseStack.size() > falseStackSizeBefore)) { - stack.push(new TernarOpItem(null, expr, trueStack.pop(), falseStack.pop())); - } else { - currentRet.add(new IfItem(null, expr, onTrue, onFalse)); - } - if (next != null) { - printGraph(visited, localData, stack, allParts, part, next, stopPart, loops, currentRet); - //currentRet.addAll(); - } - } else if (part.nextParts.size() == 1) { - - boolean nextloop = false; - for (Loop l : loops) { - if (part.nextParts.get(0) == l.loopContinue) { - nextloop = true; - break; - } - if (part.nextParts.get(0) == l.loopPreContinue) { - nextloop = true; - break; + if (staticOperation != SOP_USE_STATIC) { + if (expr.isCompileTime()) { + boolean doJump = EcmaScript.toBoolean(expr.getResult()); + if (doJump) { + nextOnePart = part.nextParts.get(0); + } else { + nextOnePart = part.nextParts.get(1); + } + if (staticOperation == SOP_REMOVE_STATIC) { + //TODO + } } } - if (true)//if (nextloop || (part.nextParts.get(0).refs.size() == 1)) //not join node - { - printGraph(visited, localData, stack, allParts, part, part.nextParts.get(0), stopPart, loops, currentRet); + if (nextOnePart == null) { + GraphPart next = getNextCommonPart(part, loops); + + @SuppressWarnings("unchecked") + Stack trueStack = (Stack) stack.clone(); + @SuppressWarnings("unchecked") + Stack falseStack = (Stack) stack.clone(); + int trueStackSizeBefore = trueStack.size(); + int falseStackSizeBefore = falseStack.size(); + List onTrue = new ArrayList<>(); + boolean isEmpty = part.nextParts.get(0) == part.nextParts.get(1); + + if (isEmpty) { + next = part.nextParts.get(0); + } + + List stopPart2 = new ArrayList<>(stopPart); + if (next != null) { + stopPart2.add(next); + } + if (!isEmpty) { + onTrue = printGraph(visited, prepareBranchLocalData(localData), trueStack, allParts, part, part.nextParts.get(1), stopPart2, loops, staticOperation, path); + } + List onFalse = new ArrayList<>(); + + if (!isEmpty) { + onFalse = printGraph(visited, prepareBranchLocalData(localData), falseStack, allParts, part, part.nextParts.get(0), stopPart2, loops, staticOperation, path); + } + if (isEmpty(onTrue) && isEmpty(onFalse) && (trueStack.size() > trueStackSizeBefore) && (falseStack.size() > falseStackSizeBefore)) { + stack.push(new TernarOpItem(null, expr, trueStack.pop(), falseStack.pop())); + } else { + currentRet.add(new IfItem(null, expr, onTrue, onFalse)); + } + if (next != null) { + printGraph(visited, localData, stack, allParts, part, next, stopPart, loops, currentRet, staticOperation, path); + //currentRet.addAll(); + } } + } //else + if (part.nextParts.size() == 1) { + nextOnePart = part.nextParts.get(0); + } + if (nextOnePart != null) { + printGraph(visited, localData, stack, allParts, part, part.nextParts.get(0), stopPart, loops, currentRet, staticOperation, path); } } @@ -1725,7 +1723,7 @@ public class Graph { stopContPart.add(currentLoop.loopContinue); GraphPart precoBackup = currentLoop.loopPreContinue; currentLoop.loopPreContinue = null; - loopItem.commands.addAll(printGraph(visited, localData, new Stack(), allParts, null, precoBackup, stopContPart, loops)); + loopItem.commands.addAll(printGraph(visited, localData, new Stack(), allParts, null, precoBackup, stopContPart, loops, staticOperation, path)); } } @@ -1783,7 +1781,7 @@ public class Graph { currentLoop.loopPreContinue = null; List stopPart2 = new ArrayList<>(stopPart); stopPart2.add(currentLoop.loopContinue); - finalComm = printGraph(visited, localData, new Stack(), allParts, null, backup, stopPart2, loops); + finalComm = printGraph(visited, localData, new Stack(), allParts, null, backup, stopPart2, loops, staticOperation, path); currentLoop.loopPreContinue = backup; checkContinueAtTheEnd(finalComm, currentLoop); } @@ -1866,7 +1864,7 @@ public class Graph { currentLoop.loopPreContinue = null; List stopPart2 = new ArrayList<>(stopPart); stopPart2.add(currentLoop.loopContinue); - List finalComm = printGraph(visited, localData, new Stack(), allParts, null, backup, stopPart2, loops); + List finalComm = printGraph(visited, localData, new Stack(), allParts, null, backup, stopPart2, loops, staticOperation, path); currentLoop.loopPreContinue = backup; checkContinueAtTheEnd(finalComm, currentLoop); @@ -1919,9 +1917,8 @@ public class Graph { } } - //loops.remove(currentLoop); if (currentLoop.loopBreak != null) { - ret.addAll(printGraph(visited, localData, stack, allParts, part, currentLoop.loopBreak, stopPart, loops)); + ret.addAll(printGraph(visited, localData, stack, allParts, part, currentLoop.loopBreak, stopPart, loops, staticOperation, path)); } } diff --git a/trunk/src/com/jpexs/decompiler/flash/graph/GraphSource.java b/trunk/src/com/jpexs/decompiler/flash/graph/GraphSource.java index 2bd15f227..e23c838e1 100644 --- a/trunk/src/com/jpexs/decompiler/flash/graph/GraphSource.java +++ b/trunk/src/com/jpexs/decompiler/flash/graph/GraphSource.java @@ -18,7 +18,7 @@ public abstract class GraphSource { public abstract boolean isEmpty(); - public abstract List translatePart(GraphPart part, List localData, Stack stack, int start, int end); + public abstract List translatePart(GraphPart part, List localData, Stack stack, int start, int end, int staticOperation, String path); private void visitCode(int ip, int lastIp, HashMap> refs, int endIp) { boolean debugMode = false; diff --git a/trunk/src/com/jpexs/decompiler/flash/graph/GraphSourceItem.java b/trunk/src/com/jpexs/decompiler/flash/graph/GraphSourceItem.java index 913c9bac8..50f8aed45 100644 --- a/trunk/src/com/jpexs/decompiler/flash/graph/GraphSourceItem.java +++ b/trunk/src/com/jpexs/decompiler/flash/graph/GraphSourceItem.java @@ -9,7 +9,7 @@ import java.util.Stack; */ public interface GraphSourceItem { - public void translate(List localData, Stack stack, List output); + public void translate(List localData, Stack stack, List output, int staticOperation, String path); public boolean isJump(); @@ -25,5 +25,9 @@ public interface GraphSourceItem { public boolean isIgnored(); - public void setIgnored(boolean ignored); + public void setIgnored(boolean ignored, int pos); + + public void setFixBranch(int pos); + + public int getFixBranch(); } diff --git a/trunk/src/com/jpexs/decompiler/flash/graph/GraphSourceItemContainer.java b/trunk/src/com/jpexs/decompiler/flash/graph/GraphSourceItemContainer.java index b6bb3d6f6..e03c44f51 100644 --- a/trunk/src/com/jpexs/decompiler/flash/graph/GraphSourceItemContainer.java +++ b/trunk/src/com/jpexs/decompiler/flash/graph/GraphSourceItemContainer.java @@ -22,4 +22,6 @@ public interface GraphSourceItemContainer { public HashMap getRegNames(); public void translateContainer(List> contents, Stack stack, List output, HashMap regNames, HashMap variables, HashMap functions); + + public String getName(); } diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/ErrorLogFrame.java b/trunk/src/com/jpexs/decompiler/flash/gui/ErrorLogFrame.java index b501dcc71..b993b0f10 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/ErrorLogFrame.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/ErrorLogFrame.java @@ -47,14 +47,12 @@ import javax.swing.JToggleButton; public class ErrorLogFrame extends AppFrame { private JPanel logView = new JPanel(); - - private Handler handler; - - public Handler getHandler(){ + + public Handler getHandler() { return handler; } - + public ErrorLogFrame() { setTitle("Log"); setSize(500, 400); @@ -68,25 +66,21 @@ public class ErrorLogFrame extends AppFrame { cnt.add(new JScrollPane(logView)); handler = new Handler() { - @Override public void publish(LogRecord record) { - log(record.getLevel(),record.getMessage(),record.getThrown()); + log(record.getLevel(), record.getMessage(), record.getThrown()); } @Override public void flush() { - } @Override public void close() throws SecurityException { - } }; //setAlwaysOnTop(true); } - public void log(Level level, String msg, String detail) { if (detail == null) { @@ -96,13 +90,14 @@ public class ErrorLogFrame extends AppFrame { final JTextArea detailTextArea = new JTextArea(detail); detailTextArea.setEditable(false); detailTextArea.setOpaque(false); + detailTextArea.setFont(new JLabel().getFont()); log(level, msg, detailTextArea); } - + private void log(Level level, String msg, final JComponent detail) { JPanel pan = new JPanel(); pan.setLayout(new ListLayout()); - + JPanel header = new JPanel(); header.setLayout(new BoxLayout(header, BoxLayout.X_AXIS)); final JToggleButton expandButton = new JToggleButton(View.getIcon("expand16")); @@ -112,13 +107,13 @@ public class ErrorLogFrame extends AppFrame { expandButton.setContentAreaFilled(false); final JScrollPane scrollPane; if (detail != null) { - scrollPane=new JScrollPane(detail); + scrollPane = new JScrollPane(detail); scrollPane.setAlignmentX(0f); - scrollPane.setMinimumSize(new Dimension(getWidth(),500)); - }else{ - scrollPane =null; + scrollPane.setMinimumSize(new Dimension(getWidth(), 500)); + } else { + scrollPane = null; } - + expandButton.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); if (detail != null) { expandButton.setMargin(new Insets(2, 2, 2, 2)); @@ -135,25 +130,29 @@ public class ErrorLogFrame extends AppFrame { SimpleDateFormat format = new SimpleDateFormat("dd/MM/YYYY HH:mm:ss"); JLabel dateLabel = new JLabel(format.format(new Date())); - dateLabel.setPreferredSize(new Dimension(100, 25)); + dateLabel.setPreferredSize(new Dimension(130, 25)); dateLabel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); header.add(dateLabel); - - - + + + JLabel levelLabel = new JLabel(level.getName()); - levelLabel.setPreferredSize(new Dimension(300, 25)); + levelLabel.setPreferredSize(new Dimension(75, 25)); levelLabel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); header.add(levelLabel); - JLabel msgLabel = new JLabel(msg); + JTextArea msgLabel = new JTextArea(msg); + msgLabel.setEditable(false); + msgLabel.setOpaque(false); + msgLabel.setFont(levelLabel.getFont()); + msgLabel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); header.add(msgLabel); header.setAlignmentX(0f); if (detail != null) { header.add(expandButton); - } - pan.add(header); - if (detail != null) { + } + pan.add(header); + if (detail != null) { pan.add(scrollPane); scrollPane.setVisible(false); } diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/ListLayout.java b/trunk/src/com/jpexs/decompiler/flash/gui/ListLayout.java index 7a49ff1df..ef7c91f33 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/ListLayout.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/ListLayout.java @@ -21,8 +21,6 @@ import java.awt.Container; import java.awt.Dimension; import java.awt.Insets; import java.awt.LayoutManager; -import java.util.ArrayList; -import java.util.List; /** * @@ -35,14 +33,13 @@ public class ListLayout implements LayoutManager { public ListLayout() { this(5); } - + public ListLayout(int border) { this.border = border; } @Override public void addLayoutComponent(String name, Component comp) { - } @Override @@ -55,14 +52,14 @@ public class ListLayout implements LayoutManager { int maxw = 0; boolean first = true; for (Component c : parent.getComponents()) { - if(!c.isVisible()){ + if (!c.isVisible()) { continue; } if (!first) { h += border; } - Dimension pref=c.getPreferredSize(); - if(pref.width > maxw){ + Dimension pref = c.getPreferredSize(); + if (pref.width > maxw) { maxw = pref.width; } h += pref.height; @@ -79,18 +76,18 @@ public class ListLayout implements LayoutManager { @Override public void layoutContainer(Container parent) { - Dimension dim=preferredLayoutSize(parent); + Dimension dim = preferredLayoutSize(parent); int top = 0; - Insets ins = parent.getInsets(); + Insets ins = parent.getInsets(); boolean first = true; for (Component c : parent.getComponents()) { - if(!c.isVisible()){ + if (!c.isVisible()) { continue; } if (!first) { top += border; } - Dimension pref=c.getPreferredSize(); + Dimension pref = c.getPreferredSize(); c.setBounds(0, top, dim.width, pref.height); top += pref.height; first = false; diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/MainFrame.java b/trunk/src/com/jpexs/decompiler/flash/gui/MainFrame.java index d0dc23436..7e0bd86d4 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/MainFrame.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/MainFrame.java @@ -2243,9 +2243,9 @@ public class MainFrame extends AppFrame implements ActionListener, TreeSelection if (deobfuscationDialog.codeProcessingLevel.getValue() == DeobfuscationDialog.LEVEL_REMOVE_DEAD_CODE) { abcPanel.abc.bodies[bi].removeDeadCode(abcPanel.abc.constants); } else if (deobfuscationDialog.codeProcessingLevel.getValue() == DeobfuscationDialog.LEVEL_REMOVE_TRAPS) { - abcPanel.abc.bodies[bi].removeTraps(abcPanel.abc.constants, abcPanel.abc, abcPanel.decompiledTextArea.getScriptLeaf().scriptIndex, abcPanel.decompiledTextArea.getClassIndex(), abcPanel.decompiledTextArea.getIsStatic()); + abcPanel.abc.bodies[bi].removeTraps(abcPanel.abc.constants, abcPanel.abc, abcPanel.decompiledTextArea.getScriptLeaf().scriptIndex, abcPanel.decompiledTextArea.getClassIndex(), abcPanel.decompiledTextArea.getIsStatic(), ""/*FIXME*/); } else if (deobfuscationDialog.codeProcessingLevel.getValue() == DeobfuscationDialog.LEVEL_RESTORE_CONTROL_FLOW) { - abcPanel.abc.bodies[bi].removeTraps(abcPanel.abc.constants, abcPanel.abc, abcPanel.decompiledTextArea.getScriptLeaf().scriptIndex, abcPanel.decompiledTextArea.getClassIndex(), abcPanel.decompiledTextArea.getIsStatic()); + abcPanel.abc.bodies[bi].removeTraps(abcPanel.abc.constants, abcPanel.abc, abcPanel.decompiledTextArea.getScriptLeaf().scriptIndex, abcPanel.decompiledTextArea.getClassIndex(), abcPanel.decompiledTextArea.getIsStatic(), ""/*FIXME*/); abcPanel.abc.bodies[bi].restoreControlFlow(abcPanel.abc.constants); } } diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java index 7ef1e7568..343b74529 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java @@ -81,6 +81,7 @@ public class ABCPanel extends JPanel implements ItemListener, ActionListener { public JPanel searchPanel; public JLabel searchPos; private List found = new ArrayList<>(); + private List foundPath = new ArrayList<>(); private int foundPos = 0; private JLabel searchForLabel; private String searchFor; @@ -112,6 +113,7 @@ public class ABCPanel extends JPanel implements ItemListener, ActionListener { decompiledTextArea.cacheScriptPack(item.value, list); if (pat.matcher(decompiledTextArea.getCachedText(item.value)).find()) { found.add(item.value); + foundPath.add(item.key); } } diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/abc/ClassesListTree.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/ClassesListTree.java index 8e0917943..2b183ae35 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/abc/ClassesListTree.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/ClassesListTree.java @@ -124,7 +124,6 @@ public class ClassesListTree extends JTree implements TreeSelectionListener { Object item = tp.getItem(); if (item instanceof ScriptPack) { final ScriptPack scriptLeaf = (ScriptPack) item; - if (!Main.isWorking()) { Main.startWork("Decompiling..."); (new Thread() { diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/abc/DecompiledEditorPane.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/DecompiledEditorPane.java index c0dd8d521..bdada6712 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/abc/DecompiledEditorPane.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/DecompiledEditorPane.java @@ -336,7 +336,7 @@ public class DecompiledEditorPane extends LineMarkedEditorPane implements CaretL } if (!cache.contains(scriptLeaf)) { for (int scriptTraitIndex : scriptLeaf.traitIndices) { - hilightedCodeBuf.append(script.traits.traits[scriptTraitIndex].convertPackaged("", abcList, abc, false, false, scriptIndex, -1, true, new ArrayList(), (Boolean) Configuration.getConfig("paralelSpeedUp", Boolean.TRUE))); + hilightedCodeBuf.append(script.traits.traits[scriptTraitIndex].convertPackaged(scriptLeaf.getPath().toString(), abcList, abc, false, false, scriptIndex, -1, true, new ArrayList(), (Boolean) Configuration.getConfig("paralelSpeedUp", Boolean.TRUE))); } hilightedCode = hilightedCodeBuf.toString(); diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/action/ActionPanel.java b/trunk/src/com/jpexs/decompiler/flash/gui/action/ActionPanel.java index 7a13560b4..bdf737387 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/action/ActionPanel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/action/ActionPanel.java @@ -166,7 +166,7 @@ public class ActionPanel extends JPanel implements ActionListener { private void cacheScript(ASMSource src) { if (!cache.contains(src)) { List as = src.getActions(SWF.DEFAULT_VERSION); - String s = com.jpexs.decompiler.flash.action.Action.actionsToSource(as, SWF.DEFAULT_VERSION); + String s = com.jpexs.decompiler.flash.action.Action.actionsToSource(as, SWF.DEFAULT_VERSION, src.toString()/*FIXME?*/); List hilights = Highlighting.getInstrHighlights(s); String srcNoHex = Highlighting.stripHilights(s); cache.put(src, new CachedScript(srcNoHex, hilights)); diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/locales/ErrorLogFrame.properties b/trunk/src/com/jpexs/decompiler/flash/gui/locales/ErrorLogFrame.properties new file mode 100644 index 000000000..732ce2430 --- /dev/null +++ b/trunk/src/com/jpexs/decompiler/flash/gui/locales/ErrorLogFrame.properties @@ -0,0 +1,15 @@ +# Copyright (C) 2013 JPEXS +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineButtonTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineButtonTag.java index 2fb9f4000..7cf0496cc 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineButtonTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineButtonTag.java @@ -136,7 +136,7 @@ public class DefineButtonTag extends CharacterTag implements ASMSource, BoundedT */ @Override public String getASMSource(int version, boolean hex) { - return Action.actionsToString(listeners, 0, getActions(version), null, version, hex, getPos() + hdrSize); + return Action.actionsToString(listeners, 0, getActions(version), null, version, hex, getPos() + hdrSize, toString()/*FIXME?*/); } /** @@ -170,9 +170,9 @@ public class DefineButtonTag extends CharacterTag implements ASMSource, BoundedT rri.setPos(prevLength); boolean deobfuscate = (Boolean) Configuration.getConfig("autoDeobfuscate", true); - List list = SWFInputStream.readActionList(listeners, 0, getPos() + hdrSize - prevLength, rri, version, prevLength, -1); + List list = SWFInputStream.readActionList(listeners, 0, getPos() + hdrSize - prevLength, rri, version, prevLength, -1, toString()/*FIXME?*/); if (deobfuscate) { - list = Action.removeNops(0, list, version, getPos() + hdrSize); + list = Action.removeNops(0, list, version, getPos() + hdrSize, toString()/*FIXME?*/); } return list; } catch (Exception ex) { diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DoActionTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DoActionTag.java index 6f63924f7..d70da53c1 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DoActionTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DoActionTag.java @@ -74,7 +74,7 @@ public class DoActionTag extends Tag implements ASMSource { */ @Override public String getASMSource(int version, boolean hex) { - return Action.actionsToString(listeners, 0, getActions(version), null, version, hex, getPos()); + return Action.actionsToString(listeners, 0, getActions(version), null, version, hex, getPos(), toString()/*FIXME?*/); } /** @@ -114,9 +114,9 @@ public class DoActionTag extends Tag implements ASMSource { ReReadableInputStream rri = new ReReadableInputStream(new ByteArrayInputStream(baos.toByteArray())); rri.setPos(prevLength); boolean deobfuscate = (Boolean) Configuration.getConfig("autoDeobfuscate", true); - List list = SWFInputStream.readActionList(listeners, 0, getPos() - prevLength, rri, version, prevLength, -1); + List list = SWFInputStream.readActionList(listeners, 0, getPos() - prevLength, rri, version, prevLength, -1, toString()/*FIXME?*/); if (deobfuscate) { - list = Action.removeNops(0, list, version, getPos()); + list = Action.removeNops(0, list, version, getPos(), toString()/*FIXME?*/); } return list; } catch (Exception ex) { diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DoInitActionTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DoInitActionTag.java index 4b2993c29..4ecf7453c 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DoInitActionTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DoInitActionTag.java @@ -51,6 +51,7 @@ public class DoInitActionTag extends CharacterIdTag implements ASMSource { * * @param data Data bytes * @param version SWF version + * @param pos * @throws IOException */ public DoInitActionTag(byte[] data, int version, long pos) throws IOException { @@ -99,7 +100,7 @@ public class DoInitActionTag extends CharacterIdTag implements ASMSource { */ @Override public String getASMSource(int version, boolean hex) { - return Action.actionsToString(listeners, 0, getActions(version), null, version, hex, getPos() + 2); + return Action.actionsToString(listeners, 0, getActions(version), null, version, hex, getPos() + 2, toString()/*FIXME?*/); } @Override @@ -122,9 +123,9 @@ public class DoInitActionTag extends CharacterIdTag implements ASMSource { ReReadableInputStream rri = new ReReadableInputStream(new ByteArrayInputStream(baos.toByteArray())); rri.setPos(prevLength); boolean deobfuscate = (Boolean) Configuration.getConfig("autoDeobfuscate", true); - List list = SWFInputStream.readActionList(listeners, 0, getPos() + 2 - prevLength, rri, version, prevLength, -1); + List list = SWFInputStream.readActionList(listeners, 0, getPos() + 2 - prevLength, rri, version, prevLength, -1, toString()/*FIXME?*/); if (deobfuscate) { - list = Action.removeNops(0, list, version, getPos() + 2); + list = Action.removeNops(0, list, version, getPos() + 2, toString()/*FIXME?*/); } return list; } catch (Exception ex) { diff --git a/trunk/src/com/jpexs/decompiler/flash/types/BUTTONCONDACTION.java b/trunk/src/com/jpexs/decompiler/flash/types/BUTTONCONDACTION.java index f5e4639b6..3f7e46d69 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/BUTTONCONDACTION.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/BUTTONCONDACTION.java @@ -146,7 +146,7 @@ public class BUTTONCONDACTION implements ASMSource, Exportable { */ @Override public String getASMSource(int version, boolean hex) { - return Action.actionsToString(listeners, 0, getActions(version), null, version, hex, getPos() + 4); + return Action.actionsToString(listeners, 0, getActions(version), null, version, hex, getPos() + 4, toString()/*FIXME?*/); } /** @@ -169,9 +169,9 @@ public class BUTTONCONDACTION implements ASMSource, Exportable { public List getActions(int version) { try { boolean deobfuscate = (Boolean) Configuration.getConfig("autoDeobfuscate", true); - List list = SWFInputStream.readActionList(listeners, 0, getPos() + 4, new ReReadableInputStream(new ByteArrayInputStream(actionBytes)), version, 0, -1); + List list = SWFInputStream.readActionList(listeners, 0, getPos() + 4, new ReReadableInputStream(new ByteArrayInputStream(actionBytes)), version, 0, -1, toString()/*FIXME?*/); if (deobfuscate) { - list = Action.removeNops(0, list, version, getPos() + 4); + list = Action.removeNops(0, list, version, getPos() + 4, toString()/*FIXME?*/); } return list; diff --git a/trunk/src/com/jpexs/decompiler/flash/types/CLIPACTIONRECORD.java b/trunk/src/com/jpexs/decompiler/flash/types/CLIPACTIONRECORD.java index 9e90d2cb5..08d97a34c 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/CLIPACTIONRECORD.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/CLIPACTIONRECORD.java @@ -150,7 +150,7 @@ public class CLIPACTIONRECORD implements ASMSource, Exportable { */ @Override public String getASMSource(int version, boolean hex) { - return Action.actionsToString(listeners, 0, getActions(version), null, version, hex, getPos() + hdrPos); + return Action.actionsToString(listeners, 0, getActions(version), null, version, hex, getPos() + hdrPos, toString()/*FIXME?*/); } /** @@ -167,9 +167,9 @@ public class CLIPACTIONRECORD implements ASMSource, Exportable { public List getActions(int version) { try { boolean deobfuscate = (Boolean) Configuration.getConfig("autoDeobfuscate", true); - List list = SWFInputStream.readActionList(listeners, 0, getPos() + hdrPos, new ReReadableInputStream(new ByteArrayInputStream(actionBytes)), version, 0, -1); + List list = SWFInputStream.readActionList(listeners, 0, getPos() + hdrPos, new ReReadableInputStream(new ByteArrayInputStream(actionBytes)), version, 0, -1, toString()/*FIXME?*/); if (deobfuscate) { - list = Action.removeNops(0, list, version, getPos() + hdrPos); + list = Action.removeNops(0, list, version, getPos() + hdrPos, toString()/*FIXME?*/); } return list; } catch (Exception ex) { diff --git a/trunk/src/com/jpexs/decompiler/flash/xfl/XFLConverter.java b/trunk/src/com/jpexs/decompiler/flash/xfl/XFLConverter.java index 3203b610f..2afd43b71 100644 --- a/trunk/src/com/jpexs/decompiler/flash/xfl/XFLConverter.java +++ b/trunk/src/com/jpexs/decompiler/flash/xfl/XFLConverter.java @@ -1140,7 +1140,7 @@ public class XFLConverter { } private static String convertActionScript(ASMSource as) { - String decompiledASHilighted = com.jpexs.decompiler.flash.action.Action.actionsToSource(as.getActions(SWF.DEFAULT_VERSION), SWF.DEFAULT_VERSION); + String decompiledASHilighted = com.jpexs.decompiler.flash.action.Action.actionsToSource(as.getActions(SWF.DEFAULT_VERSION), SWF.DEFAULT_VERSION, as.toString()); return as.getActionSourcePrefix() + Highlighting.stripHilights(decompiledASHilighted) + as.getActionSourceSuffix(); }