diff --git a/trunk/src/com/jpexs/decompiler/flash/SWF.java b/trunk/src/com/jpexs/decompiler/flash/SWF.java index 8960a708e..bfa612893 100644 --- a/trunk/src/com/jpexs/decompiler/flash/SWF.java +++ b/trunk/src/com/jpexs/decompiler/flash/SWF.java @@ -430,7 +430,7 @@ public class SWF { } String exStr = "Exporting " + "tag " + (i + 1) + "/" + abcTags.size() + " " + cnt + path + " ..."; informListeners("export", exStr); - abc.script_info[scriptIndex].export(abc, abcTags, outdir, isPcode); + abc.script_info[scriptIndex].export(abc, abcTags, outdir, isPcode, scriptIndex); return true; } } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/ABC.java b/trunk/src/com/jpexs/decompiler/flash/abc/ABC.java index a84fc1d03..aedaca1fa 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/ABC.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/ABC.java @@ -560,7 +560,7 @@ public class ABC { } String exStr = "Exporting " + abcStr + cnt + path + " ..."; informListeners("export", exStr); - script_info[i].export(this, abcList, directory, pcode); + script_info[i].export(this, abcList, directory, pcode, i); } } 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 e99709af0..546b4b022 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Code.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Code.java @@ -1032,7 +1032,7 @@ public class AVM2Code implements Serializable { return pos2adr(fixIPAfterDebugLine(adr2pos(addr))); } - public ConvertOutput toSourceOutput(boolean processJumps, boolean isStatic, 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(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()); @@ -1121,7 +1121,7 @@ public class AVM2Code implements Serializable { if (swins.operands.length >= 3) { if (swins.operands[0] == swins.getBytes().length) { if (adr2pos(pos2adr(f) + swins.operands[2]) < finStart) { - finallyCommands = toSourceOutput(processJumps, isStatic, classIndex, localRegs, stack, scopeStack, abc, constants, method_info, body, finStart, f - 1, localRegNames, fullyQualifiedNames, visited).output; + finallyCommands = toSourceOutput(processJumps, isStatic, scriptIndex, classIndex, localRegs, stack, scopeStack, abc, constants, method_info, body, finStart, f - 1, localRegNames, fullyQualifiedNames, visited).output; returnPos = f + 1; break; } @@ -1146,10 +1146,10 @@ public class AVM2Code implements Serializable { } Stack substack = new Stack(); substack.add(new ExceptionTreeItem(catchedExceptions.get(e))); - catchedCommands.add(toSourceOutput(processJumps, isStatic, classIndex, localRegs, substack, new Stack(), abc, constants, method_info, body, adr2pos(fixAddrAfterDebugLine(catchedExceptions.get(e).target)), eendpos, localRegNames, fullyQualifiedNames, visited).output); + catchedCommands.add(toSourceOutput(processJumps, isStatic, scriptIndex, classIndex, localRegs, substack, new Stack(), abc, constants, method_info, body, adr2pos(fixAddrAfterDebugLine(catchedExceptions.get(e).target)), eendpos, localRegNames, fullyQualifiedNames, visited).output); } - List tryCommands = toSourceOutput(processJumps, isStatic, classIndex, localRegs, stack, scopeStack, abc, constants, method_info, body, ip, endpos - 1, localRegNames, fullyQualifiedNames, visited).output; + List tryCommands = toSourceOutput(processJumps, isStatic, scriptIndex, classIndex, localRegs, stack, scopeStack, abc, constants, method_info, body, ip, endpos - 1, localRegNames, fullyQualifiedNames, visited).output; output.add(new TryTreeItem(tryCommands, catchedExceptions, catchedCommands, finallyCommands)); @@ -1234,12 +1234,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, 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); stack.push(before); ip += 2; continue iploop; } else { - ins.definition.translate(isStatic, 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); ip++; continue iploop; } @@ -1277,7 +1277,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(processJumps, isStatic, classIndex, localRegs, stack, scopeStack, abc, constants, method_info, body, ip + 2, t - 1, localRegNames, fullyQualifiedNames, visited); + ConvertOutput assignment = toSourceOutput(processJumps, isStatic, scriptIndex, classIndex, localRegs, stack, scopeStack, abc, constants, method_info, body, ip + 2, t - 1, localRegNames, fullyQualifiedNames, visited); stack.push(assignment.output.remove(assignment.output.size() - 1)); ip = t + 2; continue iploop; @@ -1297,21 +1297,21 @@ public class AVM2Code implements Serializable { } } } else { - ins.definition.translate(isStatic, 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); } ip++; break; //} } else { - ins.definition.translate(isStatic, 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); 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, 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); ip = end + 1; break; } else if (ins.definition instanceof NewFunctionIns) { @@ -1347,12 +1347,12 @@ public class AVM2Code implements Serializable { } } //What to do when hasDup is false? - ins.definition.translate(isStatic, 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); NewFunctionTreeItem nft = (NewFunctionTreeItem) stack.peek(); nft.functionName = functionName; ip++; } else { - ins.definition.translate(isStatic, 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); ip++; addr = pos2adr(ip); @@ -1379,8 +1379,8 @@ public class AVM2Code implements Serializable { return ret; } - public String toSource(String path, boolean isStatic, 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, 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) { + return toSource(path, isStatic, scriptIndex, classIndex, abc, constants, method_info, body, false, localRegNames, scopeStack, isStaticInitializer, fullyQualifiedNames, initTraits); } public int getRegisterCount() { @@ -1453,7 +1453,7 @@ public class AVM2Code implements Serializable { ignoredIns = new ArrayList(); } - public String toSource(String path, boolean isStatic, 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) { initToSource(); List list; String s; @@ -1472,7 +1472,7 @@ public class AVM2Code implements Serializable { //try { try { - list = AVM2Graph.translateViaGraph(path, this, abc, body, isStatic, classIndex, localRegs, scopeStack, localRegNames, fullyQualifiedNames); + list = AVM2Graph.translateViaGraph(path, this, abc, body, isStatic, scriptIndex, classIndex, localRegs, scopeStack, localRegNames, fullyQualifiedNames); } catch (Exception ex2) { Logger.getLogger(AVM2Code.class.getName()).log(Level.SEVERE, "Decompilation error in " + path, ex2); return "/*\r\n * Decompilation error\r\n * Code may be obfuscated\r\n * Error Message: " + ex2.getMessage() + "\r\n */"; @@ -1851,7 +1851,7 @@ public class AVM2Code implements Serializable { List localData = new ArrayList(); localData.add((Boolean) false); //isStatic - localData.add((Integer) 0); //classIndex + localData.add((Integer) (-1)); //classIndex localData.add(new HashMap()); localData.add(new Stack()); localData.add(abc.constants); @@ -1863,8 +1863,9 @@ public class AVM2Code implements Serializable { localData.add(new ArrayList()); localData.add(new ArrayList()); localData.add(new ArrayList()); + localData.add((Integer) (-1)); int ret = 0; - ret += removeTraps(localData, new AVM2GraphSource(this, false, 0, 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); removeIgnored(constants, body); removeDeadCode(constants, body); @@ -2470,7 +2471,7 @@ public class AVM2Code implements Serializable { if (((AVM2Instruction) code.get(t + 1)).definition instanceof KillIns) { if (((AVM2Instruction) code.get(t + 1)).operands[0] == reg) { code.getCode().initToSource(); - ConvertOutput assignment = code.getCode().toSourceOutput(false, (Boolean) localData.get(0), (Integer) localData.get(1), (HashMap) localData.get(2), stack, (Stack) localData.get(3), (ABC) localData.get(7), (ConstantPool) localData.get(4), (MethodInfo[]) localData.get(5), (MethodBody) localData.get(6), ip + 2, t - 1, (HashMap) localData.get(8), (List) localData.get(9), null); + ConvertOutput assignment = code.getCode().toSourceOutput(false, (Boolean) localData.get(0), (Integer) localData.get(10), (Integer) localData.get(1), (HashMap) localData.get(2), stack, (Stack) localData.get(3), (ABC) localData.get(7), (ConstantPool) localData.get(4), (MethodInfo[]) localData.get(5), (MethodBody) localData.get(6), ip + 2, t - 1, (HashMap) localData.get(8), (List) localData.get(9), null); stack.push(assignment.output.remove(assignment.output.size() - 1)); ip = t + 2; continue iploop; 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 11ce08e25..4e60d2a1b 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 @@ -74,8 +74,8 @@ public class AVM2Graph extends Graph { return code; } - public AVM2Graph(AVM2Code code, ABC abc, MethodBody body, boolean isStatic, int classIndex, HashMap localRegs, Stack scopeStack, HashMap localRegNames, List fullyQualifiedNames) { - super(new AVM2GraphSource(code, isStatic, classIndex, localRegs, scopeStack, abc, body, localRegNames, fullyQualifiedNames), body.getExceptionEntries()); + public AVM2Graph(AVM2Code code, ABC abc, MethodBody body, boolean isStatic, int scriptIndex, int classIndex, HashMap localRegs, Stack scopeStack, HashMap localRegNames, List fullyQualifiedNames) { + super(new AVM2GraphSource(code, isStatic, scriptIndex, classIndex, localRegs, scopeStack, abc, body, localRegNames, fullyQualifiedNames), body.getExceptionEntries()); this.code = code; this.abc = abc; this.body = body; @@ -103,8 +103,8 @@ 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 classIndex, HashMap localRegs, Stack scopeStack, HashMap localRegNames, List fullyQualifiedNames) { - AVM2Graph g = new AVM2Graph(code, abc, body, isStatic, classIndex, localRegs, scopeStack, localRegNames, 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) { + AVM2Graph g = new AVM2Graph(code, abc, body, isStatic, scriptIndex, classIndex, localRegs, scopeStack, localRegNames, fullyQualifiedNames); List allParts = new ArrayList(); for (GraphPart head : g.heads) { populateParts(head, allParts); @@ -123,6 +123,7 @@ public class AVM2Graph extends Graph { localData.add(new ArrayList()); localData.add(new ArrayList()); localData.add(new ArrayList()); + localData.add((Integer) scriptIndex); return g.translate(localData); } /* 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 48c4007c3..e47be8386 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 @@ -21,6 +21,7 @@ public class AVM2GraphSource extends GraphSource { private AVM2Code code; boolean isStatic; int classIndex; + int scriptIndex; HashMap localRegs; Stack scopeStack; ABC abc; @@ -32,7 +33,7 @@ public class AVM2GraphSource extends GraphSource { return code; } - public AVM2GraphSource(AVM2Code code, boolean isStatic, int classIndex, HashMap localRegs, Stack scopeStack, ABC abc, MethodBody body, HashMap localRegNames, List fullyQualifiedNames) { + public AVM2GraphSource(AVM2Code code, boolean isStatic, int scriptIndex, int classIndex, HashMap localRegs, Stack scopeStack, ABC abc, MethodBody body, HashMap localRegNames, List fullyQualifiedNames) { this.code = code; this.isStatic = isStatic; this.classIndex = classIndex; @@ -42,6 +43,7 @@ public class AVM2GraphSource extends GraphSource { this.body = body; this.localRegNames = localRegNames; this.fullyQualifiedNames = fullyQualifiedNames; + this.scriptIndex = scriptIndex; } @Override @@ -62,7 +64,7 @@ public class AVM2GraphSource extends GraphSource { @Override public List translatePart(List localData, Stack stack, int start, int end) { List ret = new ArrayList(); - ConvertOutput co = code.toSourceOutput(false, isStatic, classIndex, localRegs, stack, (Stack) localData.get(AVM2Graph.DATA_SCOPESTACK), abc, abc.constants, abc.method_info, body, start, end, localRegNames, fullyQualifiedNames, new boolean[size()]); + ConvertOutput co = code.toSourceOutput(false, isStatic, scriptIndex, classIndex, localRegs, stack, (Stack) localData.get(AVM2Graph.DATA_SCOPESTACK), 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 d7c53778f..e9c7bc46e 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 @@ -244,7 +244,7 @@ public class AVM2Instruction implements Serializable, GraphSourceItem { @Override public void translate(List localData, Stack stack, List output) { - definition.translate((Boolean) localData.get(0), (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)); + definition.translate((Boolean) localData.get(0), (Integer) localData.get(10), (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)); } @Override 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 a2a186a26..c26b55675 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 @@ -72,7 +72,7 @@ public class InstructionDefinition implements Serializable { throw new UnsupportedOperationException("Instruction " + instructionName + " not implemented"); } - public void translate(boolean isStatic, 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) { } 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 3cb85b85b..2331d6aaf 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 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) { 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 7c7179534..9afe2c01d 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 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) { 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 bcff4ecd3..7e5f70f95 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 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) { 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 9db7a272c..77a98f406 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 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) { 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 13c882cd1..ef2692ec4 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 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) { 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 e015626e7..f90fbf1e9 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 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) { 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 1d74811a8..2b7678ae6 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 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) { 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 a07a08a42..c5c642e4b 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 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) { 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 de3f72116..584da198d 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 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) { 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 dfc71ae00..4454de4e6 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 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) { 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 ac0f90959..6b3588026 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 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) { 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 486db1eb6..e84f1ba71 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 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) { 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 97651f973..dd23c74f3 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 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) { 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 57105066e..faedfd5f2 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 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) { 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 60ab40d55..71994d1f7 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 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) { 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 02b61c769..a8594da75 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 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) { 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 b3edae276..dfee38199 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 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) { 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 e9a651816..f5a9d9255 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 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) { 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 71e66406e..9ac67fb8c 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 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) { 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 9ea767573..837cb3822 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 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) { 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 8cf524747..26082aba3 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 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) { 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 0a9b11e17..11a8929fd 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 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) { 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/comparsion/EqualsIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparsion/EqualsIns.java index 69767e3b5..d961625ca 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparsion/EqualsIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparsion/EqualsIns.java @@ -43,7 +43,7 @@ public class EqualsIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, 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) { 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/comparsion/GreaterEqualsIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparsion/GreaterEqualsIns.java index 528af9539..4c9c954de 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparsion/GreaterEqualsIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparsion/GreaterEqualsIns.java @@ -34,7 +34,7 @@ public class GreaterEqualsIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, 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) { 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/comparsion/GreaterThanIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparsion/GreaterThanIns.java index 19cb4de40..1b2678ff5 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparsion/GreaterThanIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparsion/GreaterThanIns.java @@ -34,7 +34,7 @@ public class GreaterThanIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, 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) { 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/comparsion/LessEqualsIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparsion/LessEqualsIns.java index b517d5902..cef94a5fc 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparsion/LessEqualsIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparsion/LessEqualsIns.java @@ -34,7 +34,7 @@ public class LessEqualsIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, 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) { 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/comparsion/LessThanIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparsion/LessThanIns.java index 846e47d44..b9f4fc855 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparsion/LessThanIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparsion/LessThanIns.java @@ -34,7 +34,7 @@ public class LessThanIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, 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) { 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/comparsion/StrictEqualsIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparsion/StrictEqualsIns.java index 555177cb4..635fb62d3 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparsion/StrictEqualsIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparsion/StrictEqualsIns.java @@ -34,7 +34,7 @@ public class StrictEqualsIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, 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) { 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 7b95fdebc..357e75d84 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 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) { 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 0ea4ef96f..2dfb5316a 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 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) { 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 59de83ba6..53dc95a58 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 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) { 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 5ae249966..5c69d7f8e 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 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) { 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 340aad014..58d70d8a6 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 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) { 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 44062b433..ed4f8d0f1 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 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) { 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 8d7c70054..682bd3131 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 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) { 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 b27d094c5..d876f3253 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 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) { 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, classIndex, abc, constants, method_info, new Stack()/*scopeStack*/, false, true, fullyQualifiedNames, null) + Highlighting.hilighMethodBegin(body.method_info); + 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); } 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 efcf471b8..0ca3882d0 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 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) { 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 30ddc7bca..bcd1fa914 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 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) { 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 1349813ab..d829c0ea4 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 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) { 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 915642bc9..d8a6f100e 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 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) { 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 2274bdbdf..16fb2b39f 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 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) { 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 02ead3c62..6312c6455 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 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) { 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 c1fda0146..e0d037f67 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 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) { 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 d5d461b28..649469250 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 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) { 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 44d415602..d44ca49f1 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 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) { 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 e018cddeb..3fe2cf904 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 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) { 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 f1b5aa837..f85e93fb0 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 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) { 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 fc03565a5..add1254e9 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 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) { 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 572713025..99d3f40d4 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 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) { 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 8c09df927..3c3b5ceaa 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 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) { 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 cc674e02c..984103a9c 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 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) { 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 76b00f32c..3bcf3ad36 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 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) { 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 d9ca4edf0..5253ff949 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 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) { 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 1e0b35e22..3cb1f1c06 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 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) { 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 85bdf14fb..a9321f3c0 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 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) { 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 37e1f5214..3c01e97b5 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 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) { 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 a15705012..a8185ddec 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 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) { 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 f0541962b..a2fb6a1cf 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 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) { 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 9c254850c..8d2e0bf46 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 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 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 6e6bb986f..4af6150a7 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 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) { //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 e815f3d04..87961d61c 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 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) { 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 eb2bd90dc..64144f98c 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 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) { 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 dd37a0a81..7cc6465d5 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 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) { 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 791c0229a..7cff61c68 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 @@ -22,6 +22,7 @@ import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; import com.jpexs.decompiler.flash.abc.avm2.treemodel.ClassTreeItem; +import com.jpexs.decompiler.flash.abc.avm2.treemodel.ScriptTreeItem; import com.jpexs.decompiler.flash.abc.avm2.treemodel.ThisTreeItem; import com.jpexs.decompiler.flash.abc.types.MethodInfo; import com.jpexs.decompiler.flash.graph.GraphTargetItem; @@ -41,9 +42,9 @@ public class GetLocal0Ins extends InstructionDefinition implements GetLocalTypeI } @Override - public void translate(boolean isStatic, 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) { if ((classIndex >= abc.instance_info.length) || classIndex < 0) { - stack.push(new ThisTreeItem(null)); + stack.push(new ScriptTreeItem(scriptIndex)); return; } if (isStatic) { diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocal1Ins.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocal1Ins.java index 399789617..b3866b335 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocal1Ins.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocal1Ins.java @@ -40,7 +40,7 @@ public class GetLocal1Ins extends InstructionDefinition implements GetLocalTypeI } @Override - public void translate(boolean isStatic, 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) { stack.push(new LocalRegTreeItem(ins, 1, localRegs.get(1))); } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocal2Ins.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocal2Ins.java index 6550e0961..8b2f47d4a 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocal2Ins.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocal2Ins.java @@ -40,7 +40,7 @@ public class GetLocal2Ins extends InstructionDefinition implements GetLocalTypeI } @Override - public void translate(boolean isStatic, 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) { stack.push(new LocalRegTreeItem(ins, 2, localRegs.get(2))); } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocal3Ins.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocal3Ins.java index a6fcf4674..6b557370d 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocal3Ins.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocal3Ins.java @@ -40,7 +40,7 @@ public class GetLocal3Ins extends InstructionDefinition implements GetLocalTypeI } @Override - public void translate(boolean isStatic, 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) { stack.push(new LocalRegTreeItem(ins, 3, localRegs.get(3))); } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocalIns.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocalIns.java index f1578eb64..26a415f2b 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocalIns.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocalIns.java @@ -41,7 +41,7 @@ public class GetLocalIns extends InstructionDefinition implements GetLocalTypeIn } @Override - public void translate(boolean isStatic, 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) { int regIndex = ins.operands[0]; stack.push(new LocalRegTreeItem(ins, regIndex, localRegs.get(regIndex))); } 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 c318bcbf5..d8e4a250b 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 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) { 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 99ad3982c..6d8ca334e 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 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) { 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 23735bc40..8b9e70208 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 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) { //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 5973f7e01..b99f35025 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 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) { 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 48048b4ce..1da87f7fd 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 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) { 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 631ad2b37..dfcd50003 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 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) { 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 55aab7338..95e97c7b8 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 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) { 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 484eac447..c551ce75e 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 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) { 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 1977d2427..504cc7cca 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 @@ -22,6 +22,7 @@ import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; import com.jpexs.decompiler.flash.abc.avm2.treemodel.ClassTreeItem; +import com.jpexs.decompiler.flash.abc.avm2.treemodel.ScriptTreeItem; import com.jpexs.decompiler.flash.abc.types.MethodInfo; import com.jpexs.decompiler.flash.graph.GraphTargetItem; import java.util.HashMap; @@ -40,9 +41,13 @@ public class GetGlobalScopeIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, 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) { if (scopeStack.isEmpty()) { - stack.push(new ClassTreeItem(abc.instance_info[classIndex].getName(constants))); + if (classIndex == -1) { + stack.push(new ScriptTreeItem(scriptIndex)); + } else { + stack.push(new ClassTreeItem(abc.instance_info[classIndex].getName(constants))); + } return; } stack.push(scopeStack.get(0)); 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 e00f17922..9a9809732 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 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) { 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 26b56b054..8ec60d86e 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 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) { 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 e9d489006..05dbb69a2 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 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) { 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 fe3ff345c..f3acfbfa8 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 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) { 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 5c624e256..fff0c3b4f 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 @@ -23,10 +23,13 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; import com.jpexs.decompiler.flash.abc.avm2.treemodel.ClassTreeItem; import com.jpexs.decompiler.flash.abc.avm2.treemodel.GetSlotTreeItem; +import com.jpexs.decompiler.flash.abc.avm2.treemodel.NewActivationTreeItem; +import com.jpexs.decompiler.flash.abc.avm2.treemodel.ScriptTreeItem; import com.jpexs.decompiler.flash.abc.avm2.treemodel.ThisTreeItem; import com.jpexs.decompiler.flash.abc.avm2.treemodel.clauses.ExceptionTreeItem; import com.jpexs.decompiler.flash.abc.types.MethodInfo; import com.jpexs.decompiler.flash.abc.types.Multiname; +import com.jpexs.decompiler.flash.abc.types.traits.Trait; import com.jpexs.decompiler.flash.abc.types.traits.TraitSlotConst; import com.jpexs.decompiler.flash.graph.GraphTargetItem; import java.util.HashMap; @@ -40,7 +43,7 @@ public class GetSlotIns extends InstructionDefinition { } @Override - public void translate(boolean isStatic, 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) { int slotIndex = ins.operands[0]; GraphTargetItem obj = (GraphTargetItem) stack.pop(); //scope obj = obj.getThroughRegister(); @@ -51,7 +54,17 @@ public class GetSlotIns extends InstructionDefinition { slotname = ((ClassTreeItem) obj).className; } else if (obj instanceof ThisTreeItem) { slotname = ((ThisTreeItem) obj).className; - } else { + } else if (obj instanceof ScriptTreeItem) { + for (int t = 0; t < abc.script_info[((ScriptTreeItem) obj).scriptIndex].traits.traits.length; t++) { + Trait tr = abc.script_info[((ScriptTreeItem) obj).scriptIndex].traits.traits[t]; + if (tr instanceof TraitSlotConst) { + if (((TraitSlotConst) tr).slot_id == slotIndex) { + slotname = tr.getName(abc); + } + } + } + } else if (obj instanceof NewActivationTreeItem) { + for (int t = 0; t < body.traits.traits.length; t++) { if (body.traits.traits[t] instanceof TraitSlotConst) { if (((TraitSlotConst) body.traits.traits[t]).slot_id == slotIndex) { 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 65b51019c..3451bc5e8 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 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) { 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 c9673b763..85cd2e99b 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 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) { 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 3514defee..79c2ba71c 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 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) { 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 264a2b8ab..421e02963 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 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) { 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 84c4e0133..6d85d343f 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 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) { 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 21335ac56..4f4fa6b0f 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 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) { 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 b6e3ca1c4..fd8ace6f2 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 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) { 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 ee67d6647..05439f8f1 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 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) { 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 39705bb3a..c22f5cd13 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 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) { 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 f5be6726e..89fa2c45d 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 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) { 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 45d75bea8..6943cec06 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 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) { 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 232221757..10e978d13 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 @@ -50,7 +50,7 @@ public class SetSlotIns extends InstructionDefinition implements SetTypeIns { } @Override - public void translate(boolean isStatic, 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) { 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 45aee124b..2e7e82dd0 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 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) { 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 9c82881e8..cc3b36cc9 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 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) { 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 39beb714b..35cec189e 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 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) { GraphTargetItem v = stack.pop(); stack.push(v); stack.push(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 189d5aae8..464d45d6d 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 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) { 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 08aac4ddc..46962e732 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 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) { 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 719bfa962..d83e1b192 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 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) { stack.push(new IntegerValueTreeItem(ins, new Long(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 c152e677c..177e05ebf 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 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) { 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 8776fadbd..8c4ffac5a 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 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) { 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 dd50dbfab..a4ca9355b 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 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) { 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 ef563c952..18c29cbce 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 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) { 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 efcbd17bf..848970a02 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 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) { 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 bf782667a..17371b9d1 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 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) { 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 cfad3d2c3..faf43226d 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 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) { 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 22270cda2..ded7601a2 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 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) { stack.push(new IntegerValueTreeItem(ins, new Long(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 3072a0934..3cf714eaf 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 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) { 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 13c91200f..398a6ad49 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 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) { 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 666753e37..1981dd6d7 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 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) { 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 2bf795804..550d215b5 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 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) { 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 f2ebf9b2a..ea3c3fe46 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 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) { 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 49546a52c..c2e7298a4 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 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) { 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 f8beba483..0872fef23 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 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) { 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 c4f86c518..a402f83d6 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 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) { 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 061582e7e..f728e8c8c 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 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) { 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 15fce8fbb..16f4890ba 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 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) { 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 f0cd39a08..6496442dc 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 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) { 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 511729291..386072cf2 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 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) { 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 da948bcbd..aaee52bf8 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 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) { 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 3767c99e8..84e9a80d4 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 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) { 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 25e80f2bc..616c39fd6 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 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) { 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 343e5e3eb..8e7bf682c 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 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) { 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 b11deb415..638ebd571 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 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) { 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 6cc88adae..34a9e3e7e 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 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) { 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 d0813426c..fa32f55ce 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 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) { 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 8d9693c40..4c25caa95 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 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) { 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 afc4321f3..2903121f7 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 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) { 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 826885989..3bd4c926d 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 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) { 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 bfa6008e2..fbf6c29bb 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 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) { 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 ba81bd88a..f4efb98f6 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 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) { 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 1d0a4cde2..5296f4fba 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 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) { 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 8c4f6f449..681026663 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 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) { 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 58c541ede..abd84af9c 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 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) { stack.push(new EscapeXElemTreeItem(ins, stack.pop())); } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/treemodel/GetSlotTreeItem.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/treemodel/GetSlotTreeItem.java index e57eca8e3..76b13d6cc 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/treemodel/GetSlotTreeItem.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/treemodel/GetSlotTreeItem.java @@ -36,7 +36,9 @@ public class GetSlotTreeItem extends TreeItem { @Override public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { - //scope.toString(constants)+"." + if (slotName == null) { + return hilight("/*UnknownSlot*/"); + } return hilight(slotName.getName(constants, fullyQualifiedNames)); } } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/treemodel/ScriptTreeItem.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/treemodel/ScriptTreeItem.java new file mode 100644 index 000000000..295dc8566 --- /dev/null +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/treemodel/ScriptTreeItem.java @@ -0,0 +1,40 @@ +/* + * 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 . + */ +package com.jpexs.decompiler.flash.abc.avm2.treemodel; + +import com.jpexs.decompiler.flash.abc.avm2.ConstantPool; +import java.util.HashMap; +import java.util.List; + +/** + * + * @author JPEXS + */ +public class ScriptTreeItem extends TreeItem { + + public int scriptIndex; + + public ScriptTreeItem(int scriptIndex) { + super(null, NOPRECEDENCE); + this.scriptIndex = scriptIndex; + } + + @Override + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { + return "script" + scriptIndex; + } +} diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/gui/ASMSourceEditorPane.java b/trunk/src/com/jpexs/decompiler/flash/abc/gui/ASMSourceEditorPane.java index c309f0975..5bd91405b 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/gui/ASMSourceEditorPane.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/gui/ASMSourceEditorPane.java @@ -110,7 +110,7 @@ public class ASMSourceEditorPane extends LineMarkedEditorPane implements CaretLi } public void graph() { - AVM2Graph gr = new AVM2Graph(abc.bodies[bodyIndex].code, abc, abc.bodies[bodyIndex], false, 0, new HashMap(), new Stack(), new HashMap(), new ArrayList()); + AVM2Graph gr = new AVM2Graph(abc.bodies[bodyIndex].code, abc, abc.bodies[bodyIndex], false, -1, -1, new HashMap(), new Stack(), new HashMap(), new ArrayList()); (new GraphFrame(gr, name)).setVisible(true); } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/gui/ClassesListTree.java b/trunk/src/com/jpexs/decompiler/flash/abc/gui/ClassesListTree.java index f6dc50d07..218509892 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/gui/ClassesListTree.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/gui/ClassesListTree.java @@ -139,9 +139,9 @@ public class ClassesListTree extends JTree implements TreeSelectionListener { } } abcPanel.navigator.setABC(abcList, scriptLeaf.abc); - abcPanel.navigator.setClassIndex(classIndex); + abcPanel.navigator.setClassIndex(classIndex, scriptLeaf.scriptIndex); abcPanel.setAbc(scriptLeaf.abc); - abcPanel.decompiledTextArea.setScript(scriptLeaf.abc.script_info[scriptLeaf.scriptIndex], scriptLeaf.abc, abcList); + abcPanel.decompiledTextArea.setScript(scriptLeaf.scriptIndex, scriptLeaf.abc, abcList); abcPanel.decompiledTextArea.setClassIndex(classIndex); abcPanel.decompiledTextArea.setNoTrait(); abcPanel.detailPanel.methodTraitPanel.methodCodePanel.setCode(""); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/gui/DecompiledEditorPane.java b/trunk/src/com/jpexs/decompiler/flash/abc/gui/DecompiledEditorPane.java index 1f0bc2118..fd4e508c7 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/gui/DecompiledEditorPane.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/gui/DecompiledEditorPane.java @@ -38,7 +38,7 @@ public class DecompiledEditorPane extends LineMarkedEditorPane implements CaretL private List classHighlights = new ArrayList(); private Highlighting currentMethodHighlight; private ABC abc; - private ScriptInfo script; + private int scriptIndex; public int lastTraitIndex = 0; private boolean ignoreCarret = false; private boolean reset = false; @@ -98,9 +98,9 @@ public class DecompiledEditorPane extends LineMarkedEditorPane implements CaretL return success; } - public void displayClass(int classIndex) { + public void displayClass(int classIndex, int scriptIndex) { if (abcPanel.navigator.getClassIndex() != classIndex) { - abcPanel.navigator.setClassIndex(classIndex); + abcPanel.navigator.setClassIndex(classIndex, scriptIndex); } } private int classIndex = -1; @@ -128,7 +128,7 @@ public class DecompiledEditorPane extends LineMarkedEditorPane implements CaretL for (Highlighting cm : classHighlights) { if ((pos >= cm.startPos) && (pos < cm.startPos + cm.len)) { classIndex = (int) cm.offset; - displayClass(classIndex); + displayClass(classIndex, scriptIndex); break; } } @@ -137,7 +137,9 @@ public class DecompiledEditorPane extends LineMarkedEditorPane implements CaretL if ((pos >= tm.startPos) && (pos < tm.startPos + tm.len)) { String name = ""; if (abc != null) { - name = abc.instance_info[classIndex].getName(abc.constants).getNameWithNamespace(abc.constants); + if (classIndex > -1) { + name = abc.instance_info[classIndex].getName(abc.constants).getNameWithNamespace(abc.constants); + } } Trait t = null; for (Highlighting th : traitHighlights) { @@ -213,7 +215,7 @@ public class DecompiledEditorPane extends LineMarkedEditorPane implements CaretL this.classHighlights = classHighlights; } } - private HashMap bufferedClasses = new HashMap(); + private HashMap bufferedClasses = new HashMap(); public void gotoLastTrait() { gotoTrait(lastTraitIndex); @@ -271,25 +273,29 @@ public class DecompiledEditorPane extends LineMarkedEditorPane implements CaretL bufferedClasses.clear(); } - public void setScript(ScriptInfo script, ABC abc, List abcList) { + public void setScript(int scriptIndex, ABC abc, List abcList) { + ScriptInfo script = null; + if (scriptIndex > -1) { + script = abc.script_info[scriptIndex]; + } if (script == null) { highlights = new ArrayList(); traitHighlights = new ArrayList(); methodHighlights = new ArrayList(); - this.script = null; + this.scriptIndex = scriptIndex; return; } setText("//Please wait..."); String hilightedCode; if (!bufferedClasses.containsKey(script)) { - hilightedCode = script.convert(abcList, abc, false, true); + hilightedCode = script.convert(abcList, abc, false, true, scriptIndex); highlights = Highlighting.getInstrHighlights(hilightedCode); traitHighlights = Highlighting.getTraitHighlights(hilightedCode); methodHighlights = Highlighting.getMethodHighlights(hilightedCode); classHighlights = Highlighting.getClassHighlights(hilightedCode); hilightedCode = Highlighting.stripHilights(hilightedCode); - bufferedClasses.put(script, new BufferedClass(hilightedCode, highlights, traitHighlights, methodHighlights, classHighlights)); + bufferedClasses.put(scriptIndex, new BufferedClass(hilightedCode, highlights, traitHighlights, methodHighlights, classHighlights)); } else { BufferedClass bc = bufferedClasses.get(script); hilightedCode = bc.text; @@ -300,16 +306,16 @@ public class DecompiledEditorPane extends LineMarkedEditorPane implements CaretL } this.abc = abc; this.abcList = abcList; - this.script = script; + this.scriptIndex = scriptIndex; setText(hilightedCode); } public void reloadClass() { int ci = classIndex; - if (bufferedClasses.containsKey(script)) { - bufferedClasses.remove(script); + if (bufferedClasses.containsKey(scriptIndex)) { + bufferedClasses.remove(scriptIndex); } - setScript(script, abc, abcList); + setScript(scriptIndex, abc, abcList); setNoTrait(); setClassIndex(ci); } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/gui/TraitsList.java b/trunk/src/com/jpexs/decompiler/flash/abc/gui/TraitsList.java index f0bcfe1a9..00cd4dd59 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/gui/TraitsList.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/gui/TraitsList.java @@ -53,16 +53,16 @@ public class TraitsList extends JList implements ListSelectionListener { this.abc = abc; this.abcTags = abcTags; setModel(new DefaultListModel()); - setClassIndex(-1); + setClassIndex(-1, -1); } - public void setClassIndex(int classIndex) { + public void setClassIndex(int classIndex, int scriptIndex) { this.classIndex = classIndex; if (classIndex == -1) { setModel(new DefaultListModel()); } else { if (abc != null) { - setModel(new TraitsListModel(abcTags, abc, classIndex, sorted)); + setModel(new TraitsListModel(abcTags, abc, classIndex, scriptIndex, sorted)); } } } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/gui/TraitsListItem.java b/trunk/src/com/jpexs/decompiler/flash/abc/gui/TraitsListItem.java index 49f90660c..96bd35e61 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/gui/TraitsListItem.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/gui/TraitsListItem.java @@ -20,16 +20,18 @@ public class TraitsListItem { private ABC abc; private int classIndex; private int index; + private int scriptIndex; public static final String STR_INSTANCE_INITIALIZER = "instance initializer"; public static final String STR_CLASS_INITIALIZER = "class initializer"; - public TraitsListItem(Type type, int index, boolean isStatic, List abcTags, ABC abc, int classIndex) { + public TraitsListItem(Type type, int index, boolean isStatic, List abcTags, ABC abc, int classIndex, int scriptIndex) { this.type = type; this.index = index; this.isStatic = isStatic; this.abcTags = abcTags; this.abc = abc; this.classIndex = classIndex; + this.scriptIndex = scriptIndex; } public int getGlobalTraitId() { @@ -62,9 +64,9 @@ public class TraitsListItem { @Override public String toString() { if ((type != Type.INITIALIZER) && isStatic) { - return abc.class_info[classIndex].static_traits.traits[index].convertHeader("", abcTags, abc, true, false, classIndex, false, new ArrayList()); + return abc.class_info[classIndex].static_traits.traits[index].convertHeader("", abcTags, abc, true, false, scriptIndex, classIndex, false, new ArrayList()); } else if ((type != Type.INITIALIZER) && (!isStatic)) { - return abc.instance_info[classIndex].instance_traits.traits[index].convertHeader("", abcTags, abc, false, false, classIndex, false, new ArrayList()); + return abc.instance_info[classIndex].instance_traits.traits[index].convertHeader("", abcTags, abc, false, false, scriptIndex, classIndex, false, new ArrayList()); } else if (!isStatic) { return STR_INSTANCE_INITIALIZER; } else { diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/gui/TraitsListModel.java b/trunk/src/com/jpexs/decompiler/flash/abc/gui/TraitsListModel.java index b54357b2c..cb89c5f5e 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/gui/TraitsListModel.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/gui/TraitsListModel.java @@ -31,6 +31,7 @@ public class TraitsListModel implements ListModel { private List abcTags; private ABC abc; private int classIndex; + private int scriptIndex; public void setSorted(boolean sorted) { if (sorted) { @@ -48,19 +49,20 @@ public class TraitsListModel implements ListModel { private void reset() { items = new ArrayList(); for (int t = 0; t < abc.class_info[classIndex].static_traits.traits.length; t++) { - items.add(new TraitsListItem(TraitsListItem.Type.getTypeForTrait(abc.class_info[classIndex].static_traits.traits[t]), t, true, abcTags, abc, classIndex)); + items.add(new TraitsListItem(TraitsListItem.Type.getTypeForTrait(abc.class_info[classIndex].static_traits.traits[t]), t, true, abcTags, abc, classIndex, scriptIndex)); } for (int t = 0; t < abc.instance_info[classIndex].instance_traits.traits.length; t++) { - items.add(new TraitsListItem(TraitsListItem.Type.getTypeForTrait(abc.instance_info[classIndex].instance_traits.traits[t]), t, false, abcTags, abc, classIndex)); + items.add(new TraitsListItem(TraitsListItem.Type.getTypeForTrait(abc.instance_info[classIndex].instance_traits.traits[t]), t, false, abcTags, abc, classIndex, scriptIndex)); } - items.add(new TraitsListItem(TraitsListItem.Type.INITIALIZER, 0, false, abcTags, abc, classIndex)); - items.add(new TraitsListItem(TraitsListItem.Type.INITIALIZER, 0, true, abcTags, abc, classIndex)); + items.add(new TraitsListItem(TraitsListItem.Type.INITIALIZER, 0, false, abcTags, abc, classIndex, scriptIndex)); + items.add(new TraitsListItem(TraitsListItem.Type.INITIALIZER, 0, true, abcTags, abc, classIndex, scriptIndex)); } - public TraitsListModel(List abcTags, ABC abc, int classIndex, boolean sorted) { + public TraitsListModel(List abcTags, ABC abc, int classIndex, int scriptIndex, boolean sorted) { this.abcTags = abcTags; this.abc = abc; this.classIndex = classIndex; + this.scriptIndex = scriptIndex; reset(); if (sorted) { setSorted(true); 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 a3e49363f..096351539 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/types/MethodBody.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/types/MethodBody.java @@ -100,7 +100,7 @@ public class MethodBody implements Cloneable, Serializable { return ret; } - public String toString(String path, boolean pcode, boolean isStatic, int classIndex, ABC abc, ConstantPool constants, MethodInfo method_info[], Stack scopeStack, boolean isStaticInitializer, boolean hilight, List fullyQualifiedNames, Traits initTraits) { + public String toString(String path, boolean pcode, boolean isStatic, int scriptIndex, int classIndex, ABC abc, ConstantPool constants, MethodInfo method_info[], Stack scopeStack, boolean isStaticInitializer, boolean hilight, List fullyQualifiedNames, Traits initTraits) { String s = ""; if (!Main.DO_DECOMPILE) { s = "//NOT DECOMPILED"; @@ -121,7 +121,7 @@ public class MethodBody implements Cloneable, Serializable { } //deobfuscated.restoreControlFlow(constants, b); try { - s += deobfuscated.toSource(path, isStatic, 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); 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 160087cf7..7c5feeb76 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/types/ScriptInfo.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/types/ScriptInfo.java @@ -62,11 +62,11 @@ public class ScriptInfo { return packageName + "." + scriptName; } - public String convert(List abcTags, ABC abc, boolean pcode, boolean highlighting) { - return traits.convert("", abcTags, abc, false, pcode, true, -1, highlighting, new ArrayList()); + public String convert(List abcTags, ABC abc, boolean pcode, boolean highlighting, int scriptIndex) { + return traits.convert("", abcTags, abc, false, pcode, true, scriptIndex, -1, highlighting, new ArrayList()); } - public void export(ABC abc, List abcList, String directory, boolean pcode) throws IOException { + public void export(ABC abc, List abcList, String directory, boolean pcode, int scriptIndex) throws IOException { String path = getPath(abc); String packageName = path.substring(0, path.lastIndexOf(".")); String className = path.substring(path.lastIndexOf(".") + 1); @@ -76,7 +76,7 @@ public class ScriptInfo { } String fileName = outDir.toString() + File.separator + className + ".as"; FileOutputStream fos = new FileOutputStream(fileName); - fos.write(convert(abcList, abc, pcode, false).getBytes()); + fos.write(convert(abcList, abc, pcode, false, scriptIndex).getBytes()); fos.close(); } 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 fc2c172b1..70fa31074 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 @@ -110,16 +110,16 @@ public abstract class Trait implements Serializable { return abc.constants.constant_multiname[name_index].toString(abc.constants, fullyQualifiedNames) + " kind=" + kindType + " metadata=" + Helper.intArrToString(metadata); } - public String convert(String path, List abcTags, ABC abc, boolean isStatic, boolean pcode, int classIndex, boolean highlight, List fullyQualifiedNames) { + public String convert(String path, List abcTags, ABC abc, boolean isStatic, boolean pcode, int scriptIndex, int classIndex, boolean highlight, List fullyQualifiedNames) { return abc.constants.constant_multiname[name_index].toString(abc.constants, fullyQualifiedNames) + " kind=" + kindType + " metadata=" + Helper.intArrToString(metadata); } - public String convertPackaged(String path, List abcTags, ABC abc, boolean isStatic, boolean pcod, int classIndex, boolean highlight, List fullyQualifiedNames) { - return makePackageFromIndex(abc, name_index, convert(path, abcTags, abc, isStatic, pcod, classIndex, highlight, fullyQualifiedNames)); + public String convertPackaged(String path, List abcTags, ABC abc, boolean isStatic, boolean pcod, int scriptIndex, int classIndex, boolean highlight, List fullyQualifiedNames) { + return makePackageFromIndex(abc, name_index, convert(path, abcTags, abc, isStatic, pcod, scriptIndex, classIndex, highlight, fullyQualifiedNames)); } - public String convertHeader(String path, List abcTags, ABC abc, boolean isStatic, boolean pcode, int classIndex, boolean highlight, List fullyQualifiedNames) { - return convert(path, abcTags, abc, isStatic, pcode, classIndex, highlight, fullyQualifiedNames).trim(); + public String convertHeader(String path, List abcTags, ABC abc, boolean isStatic, boolean pcode, int scriptIndex, int classIndex, boolean highlight, List fullyQualifiedNames) { + return convert(path, abcTags, abc, isStatic, pcode, scriptIndex, classIndex, highlight, fullyQualifiedNames).trim(); } protected String makePackageFromIndex(ABC abc, int name_index, String value) { 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 93f24a02c..fe779241a 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 @@ -294,13 +294,13 @@ public class TraitClass extends Trait { } @Override - public String convertHeader(String path, List abcTags, ABC abc, boolean isStatic, boolean pcode, int classIndex, boolean highlight, List fullyQualifiedNames) { + public String convertHeader(String path, List abcTags, ABC abc, boolean isStatic, boolean pcode, int scriptIndex, int classIndex, boolean highlight, List fullyQualifiedNames) { String classHeader = abc.instance_info[class_info].getClassHeaderStr(abc, fullyQualifiedNames); return classHeader; } @Override - public String convert(String path, List abcTags, ABC abc, boolean isStatic, boolean pcode, int classIndex, boolean highlight, List fullyQualifiedNames) { + public String convert(String path, List abcTags, ABC abc, boolean isStatic, boolean pcode, int scriptIndex, int classIndex, boolean highlight, List fullyQualifiedNames) { if (!highlight) { Highlighting.doHighlight = false; } @@ -394,7 +394,7 @@ public class TraitClass extends Trait { 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, 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(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 (Highlighting.stripHilights(bodyStr).equals("")) { toPrint = ABC.addTabs(bodyStr, 3); @@ -428,7 +428,7 @@ public class TraitClass extends Trait { 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, 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(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); constructorParams = abc.method_info[abc.instance_info[class_info].iinit_index].getParamStr(abc.constants, abc.bodies[bodyIndex], abc, fullyQualifiedNames); } else { constructorParams = abc.method_info[abc.instance_info[class_info].iinit_index].getParamStr(abc.constants, null, abc, fullyQualifiedNames); @@ -442,9 +442,9 @@ public class TraitClass extends Trait { //} //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, class_info, highlight, fullyQualifiedNames)); + 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)); - 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, class_info, highlight, fullyQualifiedNames)); + 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)); out.println(Helper.joinStrings(outTraits, "\r\n\r\n")); out.println(ABC.IDENT_STRING + "}");//class 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 af68dbffa..ed3288b86 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 @@ -35,7 +35,7 @@ public class TraitFunction extends Trait { } @Override - public String convertHeader(String path, List abcTags, ABC abc, boolean isStatic, boolean pcode, int classIndex, boolean highlight, List fullyQualifiedNames) { + public String convertHeader(String path, List abcTags, ABC abc, boolean isStatic, boolean pcode, int scriptIndex, int classIndex, boolean highlight, List fullyQualifiedNames) { String modifier = getModifiers(abcTags, abc, isStatic) + " "; if (modifier.equals(" ")) { modifier = ""; @@ -45,12 +45,12 @@ public class TraitFunction extends Trait { } @Override - public String convert(String path, List abcTags, ABC abc, boolean isStatic, boolean pcode, int classIndex, boolean highlight, List fullyQualifiedNames) { - String header = convertHeader(path, abcTags, abc, isStatic, pcode, classIndex, highlight, fullyQualifiedNames); + public String convert(String path, List abcTags, ABC abc, boolean isStatic, boolean pcode, int scriptIndex, int classIndex, boolean highlight, List fullyQualifiedNames) { + String header = convertHeader(path, abcTags, abc, isStatic, pcode, scriptIndex, classIndex, highlight, fullyQualifiedNames); String bodyStr = ""; int bodyIndex = abc.findBodyIndex(method_info); if (bodyIndex != -1) { - bodyStr = ABC.addTabs(abc.bodies[bodyIndex].toString(path + "." + abc.constants.constant_multiname[name_index].getName(abc.constants, fullyQualifiedNames), pcode, isStatic, classIndex, abc, abc.constants, abc.method_info, new Stack(), false, highlight, fullyQualifiedNames, null), 3); + bodyStr = ABC.addTabs(abc.bodies[bodyIndex].toString(path + "." + abc.constants.constant_multiname[name_index].getName(abc.constants, fullyQualifiedNames), pcode, isStatic, scriptIndex, classIndex, abc, abc.constants, abc.method_info, new Stack(), false, highlight, fullyQualifiedNames, null), 3); } return ABC.IDENT_STRING + ABC.IDENT_STRING + header + (abc.instance_info[classIndex].isInterface() ? ";" : " {\r\n" + bodyStr + "\r\n" + ABC.IDENT_STRING + ABC.IDENT_STRING + "}"); 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 d8a709f68..fb3572bd8 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 @@ -35,7 +35,7 @@ public class TraitMethodGetterSetter extends Trait { } @Override - public String convertHeader(String path, List abcTags, ABC abc, boolean isStatic, boolean pcode, int classIndex, boolean highlight, List fullyQualifiedNames) { + public String convertHeader(String path, List abcTags, ABC abc, boolean isStatic, boolean pcode, int scriptIndex, int classIndex, boolean highlight, List fullyQualifiedNames) { String modifier = getModifiers(abcTags, abc, isStatic) + " "; if (modifier.equals(" ")) { modifier = ""; @@ -53,16 +53,16 @@ public class TraitMethodGetterSetter extends Trait { } @Override - public String convert(String path, List abcTags, ABC abc, boolean isStatic, boolean pcode, int classIndex, boolean highlight, List fullyQualifiedNames) { + public String convert(String path, List abcTags, ABC abc, boolean isStatic, boolean pcode, int scriptIndex, int classIndex, boolean highlight, List fullyQualifiedNames) { if (debugMode) { - System.out.println("Decompiling " + path + "." + getName(abc).getName(abc.constants, fullyQualifiedNames)); + System.err.println("Decompiling " + path + "." + getName(abc).getName(abc.constants, fullyQualifiedNames)); } - String header = convertHeader(path, abcTags, abc, isStatic, pcode, classIndex, highlight, fullyQualifiedNames); + String header = convertHeader(path, abcTags, abc, isStatic, pcode, scriptIndex, classIndex, highlight, fullyQualifiedNames); String bodyStr = ""; int bodyIndex = abc.findBodyIndex(method_info); if (bodyIndex != -1) { - bodyStr = ABC.addTabs(abc.bodies[bodyIndex].toString(path + "." + getName(abc).getName(abc.constants, fullyQualifiedNames), pcode, isStatic, classIndex, abc, abc.constants, abc.method_info, new Stack(), false, highlight, fullyQualifiedNames, null), 3); + bodyStr = ABC.addTabs(abc.bodies[bodyIndex].toString(path + "." + getName(abc).getName(abc.constants, fullyQualifiedNames), pcode, isStatic, scriptIndex, classIndex, abc, abc.constants, abc.method_info, new Stack(), false, highlight, fullyQualifiedNames, null), 3); } return ABC.IDENT_STRING + ABC.IDENT_STRING + header + ((classIndex != -1 && abc.instance_info[classIndex].isInterface()) ? ";" : " {\r\n" + bodyStr + "\r\n" + ABC.IDENT_STRING + ABC.IDENT_STRING + "}"); } 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 dd67e36c8..554506e0a 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 @@ -106,7 +106,7 @@ public class TraitSlotConst extends Trait { } @Override - public String convert(String path, List abcTags, ABC abc, boolean isStatic, boolean pcode, int classIndex, boolean highlight, List fullyQualifiedNames) { + public String convert(String path, List abcTags, ABC abc, boolean isStatic, boolean pcode, int scriptIndex, int classIndex, boolean highlight, List fullyQualifiedNames) { String modifier = getModifiers(abcTags, abc, isStatic) + " "; if (modifier.equals(" ")) { modifier = ""; 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 6cd9105df..5505fe567 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 @@ -49,7 +49,7 @@ public class Traits implements Serializable { return s; } - public String convert(String path, List abcTags, ABC abc, boolean isStatic, boolean pcode, boolean makePackages, int classIndex, boolean highlighting, List fullyQualifiedNames) { + public String convert(String path, List abcTags, ABC abc, boolean isStatic, boolean pcode, boolean makePackages, int scriptIndex, int classIndex, boolean highlighting, List fullyQualifiedNames) { String s = ""; for (int t = 0; t < traits.length; t++) { if (t > 0) { @@ -58,9 +58,9 @@ public class Traits implements Serializable { String plus; //System.out.println(path+":"+traits[t].convertHeader(path, abcTags, abc, isStatic, pcode, classIndex, highlighting, fullyQualifiedNames)); if (makePackages) { - plus = traits[t].convertPackaged(path, abcTags, abc, isStatic, pcode, classIndex, highlighting, fullyQualifiedNames); + plus = traits[t].convertPackaged(path, abcTags, abc, isStatic, pcode, scriptIndex, classIndex, highlighting, fullyQualifiedNames); } else { - plus = traits[t].convert(path, abcTags, abc, isStatic, pcode, classIndex, highlighting, fullyQualifiedNames); + plus = traits[t].convert(path, abcTags, abc, isStatic, pcode, scriptIndex, classIndex, highlighting, fullyQualifiedNames); } if (highlighting) { int h = t; diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/usages/ConstVarMultinameUsage.java b/trunk/src/com/jpexs/decompiler/flash/abc/usages/ConstVarMultinameUsage.java index 1f994f132..2d723fd21 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/usages/ConstVarMultinameUsage.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/usages/ConstVarMultinameUsage.java @@ -39,10 +39,10 @@ public abstract class ConstVarMultinameUsage extends TraitMultinameUsage { return super.toString(abcTags, abc) + " " + (parentTraitIndex > -1 ? (isStatic - ? (((TraitMethodGetterSetter) abc.class_info[classIndex].static_traits.traits[parentTraitIndex]).convertHeader("", abcTags, abc, isStatic, false, classIndex, false, new ArrayList())) - : (((TraitMethodGetterSetter) abc.instance_info[classIndex].instance_traits.traits[parentTraitIndex]).convertHeader("", abcTags, abc, isStatic, false, classIndex, false, new ArrayList()))) + ? (((TraitMethodGetterSetter) abc.class_info[classIndex].static_traits.traits[parentTraitIndex]).convertHeader("", abcTags, abc, isStatic, false, -1/*FIXME*/, classIndex, false, new ArrayList())) + : (((TraitMethodGetterSetter) abc.instance_info[classIndex].instance_traits.traits[parentTraitIndex]).convertHeader("", abcTags, abc, isStatic, false, -1/*FIXME*/, classIndex, false, new ArrayList()))) : "") - + ((TraitSlotConst) traits.traits[traitIndex]).convertHeader("", abcTags, abc, isStatic, false, classIndex, false, new ArrayList()); + + ((TraitSlotConst) traits.traits[traitIndex]).convertHeader("", abcTags, abc, isStatic, false, -1/*FIXME*/, classIndex, false, new ArrayList()); } public int getTraitIndex() { diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/usages/MethodMultinameUsage.java b/trunk/src/com/jpexs/decompiler/flash/abc/usages/MethodMultinameUsage.java index 10a8324e5..cc650649a 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/usages/MethodMultinameUsage.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/usages/MethodMultinameUsage.java @@ -48,10 +48,10 @@ public abstract class MethodMultinameUsage extends TraitMultinameUsage { : "instance initializer") : ((parentTraitIndex > -1 ? (isStatic - ? (((TraitMethodGetterSetter) abc.class_info[classIndex].static_traits.traits[parentTraitIndex]).convertHeader("", abcTags, abc, isStatic, false, classIndex, false, new ArrayList())) - : (((TraitMethodGetterSetter) abc.instance_info[classIndex].instance_traits.traits[parentTraitIndex]).convertHeader("", abcTags, abc, isStatic, false, classIndex, false, new ArrayList()))) + " " + ? (((TraitMethodGetterSetter) abc.class_info[classIndex].static_traits.traits[parentTraitIndex]).convertHeader("", abcTags, abc, isStatic, false, -1/*FIXME*/, classIndex, false, new ArrayList())) + : (((TraitMethodGetterSetter) abc.instance_info[classIndex].instance_traits.traits[parentTraitIndex]).convertHeader("", abcTags, abc, isStatic, false, -1/*FIXME*/, classIndex, false, new ArrayList()))) + " " : "") - + (((TraitMethodGetterSetter) traits.traits[traitIndex]).convertHeader("", abcTags, abc, isStatic, false, classIndex, false, new ArrayList())))); + + (((TraitMethodGetterSetter) traits.traits[traitIndex]).convertHeader("", abcTags, abc, isStatic, false, -1/*FIXME*/, classIndex, false, new ArrayList())))); } public int getTraitIndex() { 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 e75ba4138..3cbe20678 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionPush.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionPush.java @@ -34,8 +34,6 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Stack; -import java.util.logging.Level; -import java.util.logging.Logger; public class ActionPush extends Action { diff --git a/trunk/src/com/jpexs/decompiler/flash/graph/Graph.java b/trunk/src/com/jpexs/decompiler/flash/graph/Graph.java index 38f17e4bd..5da33809f 100644 --- a/trunk/src/com/jpexs/decompiler/flash/graph/Graph.java +++ b/trunk/src/com/jpexs/decompiler/flash/graph/Graph.java @@ -1,16 +1,16 @@ /* * Copyright (C) 2010-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 . */ @@ -466,13 +466,6 @@ public class Graph { } if (part == null) { //return ret; - } else if ((part.nextParts.size() == 1) && part.leadsTo(code, part, getLoopsContinues(loops))) { - Loop l = new Loop(loops.size(), part, null); - List trueExp = new ArrayList(); - trueExp.add(new TrueItem(null)); - loops.add(l); - ret.add(new WhileItem(null, l, trueExp, printGraph(localData, stack, allParts, parent, part, stopPart, loops, forFinalCommands))); - return ret; } part = checkPart(localData, part); if (part == null) { @@ -514,7 +507,7 @@ public class Graph { if (part.nextParts.size() == 2) { if (!stack.isEmpty()) { GraphTargetItem top = stack.peek(); - if (false) { //top.isCompileTime()){ + if (false) { //top.isCompileTime()){ stack.pop(); if (top.toBoolean()) { ret.addAll(output); @@ -650,11 +643,7 @@ public class Graph { } - List retChecked = null; - if ((retChecked = check(code, localData, allParts, stack, parent, part, stopPart, loops, output, forFinalCommands)) != null) { - ret.addAll(retChecked); - return ret; - } + List loopContinues = getLoopsContinues(loops); boolean loop = false; boolean reversed = false; @@ -677,6 +666,83 @@ public class Graph { loop = true; reversed = true; } + + + Loop lc = null; + if (part.leadsTo(code, part, loopContinues)) { + lc = new Loop(loops.size(), part, null); + loops.add(lc); + } + + List retChecked = null; + if ((retChecked = check(code, localData, allParts, stack, parent, part, stopPart, loops, output, forFinalCommands)) != null) { + if (lc != null) { + List trueExp = new ArrayList(); + trueExp.add(new TrueItem(null)); + boolean chwt = true; + + if (!retChecked.isEmpty()) { //doWhileCheck + checkContinueAtTheEnd(retChecked, lc); + List finalCommands = forFinalCommands.get(lc); + IfItem ifi = null; + if ((finalCommands != null) && !finalCommands.isEmpty()) { + if (finalCommands.get(finalCommands.size() - 1) instanceof IfItem) { + ifi = (IfItem) finalCommands.get(finalCommands.size() - 1); + finalCommands.remove(finalCommands.size() - 1); + } + } else if (retChecked.get(retChecked.size() - 1) instanceof IfItem) { + ifi = (IfItem) retChecked.get(retChecked.size() - 1); + retChecked.remove(retChecked.size() - 1); + } + if (ifi != null) { + if (ifi.onFalse.isEmpty()) { + if (!ifi.onTrue.isEmpty()) { + if (ifi.onTrue.get(ifi.onTrue.size() - 1) instanceof ExitItem) { + whileTrue = false; + List tr = new ArrayList(); + GraphTargetItem ex = ifi.expression; + if (ex instanceof LogicalOpItem) { + ex = ((LogicalOpItem) ex).invert(); + } else { + ex = new NotItem(null, ex); + } + if ((finalCommands != null) && (!finalCommands.isEmpty())) { + tr.addAll(finalCommands); + } + tr.add(ex); + ret.add(new DoWhileItem(null, lc, retChecked, tr)); + ret.addAll(ifi.onTrue); + chwt = false; + } + } + } + } + } + + if (chwt) { + ret.add(new WhileItem(null, lc, trueExp, retChecked)); + } + } else { + ret.addAll(retChecked); + } + return ret; + } else { + if (lc != null) { + loops.remove(lc); + } + } + + /* if ( part.leadsTo(code, part, getLoopsContinues(loops))) { + Loop l = new Loop(loops.size(), part, null); + List trueExp = new ArrayList(); + trueExp.add(new TrueItem(null)); + loops.add(l); + List wtbody=new ArrayList(); + wtbody.addAll(output); + wtbody.addAll(printGraph(localData, stack, allParts, parent, part, stopPart, loops, forFinalCommands)); + ret.add(new WhileItem(null, l, trueExp, wtbody)); + return ret; + }*/ if (((part.nextParts.size() == 2) || ((part.nextParts.size() == 1) && loop)) /*&& (!isSwitch)*/) { boolean doWhile = loop; @@ -799,7 +865,7 @@ public class Graph { retw.addAll(body); - if (!retw.isEmpty()) { + if (!retw.isEmpty()) { //doWhileCheck checkContinueAtTheEnd(retw, whileTrueLoop); List finalCommands = forFinalCommands.get(whileTrueLoop); IfItem ifi = null; diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/MainFrame.java b/trunk/src/com/jpexs/decompiler/flash/gui/MainFrame.java index 8d55631b4..1c0611604 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/MainFrame.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/MainFrame.java @@ -18,7 +18,6 @@ package com.jpexs.decompiler.flash.gui; import com.jpexs.decompiler.flash.Configuration; import com.jpexs.decompiler.flash.Main; -import static com.jpexs.decompiler.flash.Main.applicationVerName; import com.jpexs.decompiler.flash.SWF; import com.jpexs.decompiler.flash.SWFOutputStream; import com.jpexs.decompiler.flash.abc.gui.ABCPanel; @@ -1104,7 +1103,7 @@ public class MainFrame extends JFrame implements ActionListener, TreeSelectionLi for (int i = 0; i < tlsList.size(); i++) { TreeLeafScript tls = tlsList.get(i); Main.startWork("Exporting " + (i + 1) + "/" + tlsList.size() + " " + tls.abc.script_info[tls.scriptIndex].getPath(tls.abc) + " ..."); - tls.abc.script_info[tls.scriptIndex].export(tls.abc, abcPanel.list, selFile, isPcode); + tls.abc.script_info[tls.scriptIndex].export(tls.abc, abcPanel.list, selFile, isPcode, tls.scriptIndex); } } else { List allNodes = new ArrayList(); @@ -1408,9 +1407,9 @@ public class MainFrame extends JFrame implements ActionListener, TreeSelectionLi } } abcPanel.navigator.setABC(abcList, scriptLeaf.abc); - abcPanel.navigator.setClassIndex(classIndex); + abcPanel.navigator.setClassIndex(classIndex, scriptLeaf.scriptIndex); abcPanel.setAbc(scriptLeaf.abc); - abcPanel.decompiledTextArea.setScript(scriptLeaf.abc.script_info[scriptLeaf.scriptIndex], scriptLeaf.abc, abcList); + abcPanel.decompiledTextArea.setScript(scriptLeaf.scriptIndex, scriptLeaf.abc, abcList); abcPanel.decompiledTextArea.setClassIndex(classIndex); abcPanel.decompiledTextArea.setNoTrait(); abcPanel.detailPanel.methodTraitPanel.methodCodePanel.setCode("");