diff --git a/trunk/src/com/jpexs/asdec/SWF.java b/trunk/src/com/jpexs/asdec/SWF.java index 71f9f463d..65323ce49 100644 --- a/trunk/src/com/jpexs/asdec/SWF.java +++ b/trunk/src/com/jpexs/asdec/SWF.java @@ -297,18 +297,18 @@ public class SWF { } } }; - List abcTags=new ArrayList(); + List abcTags = new ArrayList(); for (Tag t : tags) { if (t instanceof DoABCTag) { - abcTags.add((DoABCTag)t); + abcTags.add((DoABCTag) t); asV3Found = true; } } - for(DoABCTag t:abcTags){ - t.abc.addEventListener(evl); - t.abc.export(outdir, isPcode,abcTags); + for (DoABCTag t : abcTags) { + t.abc.addEventListener(evl); + t.abc.export(outdir, isPcode, abcTags); } - + if (!asV3Found) { List list2 = new ArrayList(); list2.addAll(tags); diff --git a/trunk/src/com/jpexs/asdec/abc/ABC.java b/trunk/src/com/jpexs/asdec/abc/ABC.java index d7beb1260..59e4aaf9b 100644 --- a/trunk/src/com/jpexs/asdec/abc/ABC.java +++ b/trunk/src/com/jpexs/asdec/abc/ABC.java @@ -27,7 +27,6 @@ import com.jpexs.asdec.abc.types.traits.TraitMethodGetterSetter; import com.jpexs.asdec.abc.types.traits.TraitSlotConst; import com.jpexs.asdec.abc.types.traits.Traits; import com.jpexs.asdec.abc.usages.*; -import com.jpexs.asdec.helpers.Helper; import com.jpexs.asdec.tags.DoABCTag; import java.io.*; import java.util.ArrayList; @@ -382,11 +381,11 @@ public class ABC { public MethodBody findBodyByClassAndName(String className, String methodName) { for (int i = 0; i < instance_info.length; i++) { - if (className.equals(constants.constant_multiname[instance_info[i].name_index].getName(constants))) { + if (className.equals(constants.constant_multiname[instance_info[i].name_index].getName(constants, new ArrayList()))) { for (Trait t : instance_info[i].instance_traits.traits) { if (t instanceof TraitMethodGetterSetter) { TraitMethodGetterSetter t2 = (TraitMethodGetterSetter) t; - if (methodName.equals(t2.getName(this).getName(constants))) { + if (methodName.equals(t2.getName(this).getName(constants, new ArrayList()))) { for (MethodBody body : bodies) { if (body.method_info == t2.method_info) { return body; @@ -399,11 +398,11 @@ public class ABC { } } for (int i = 0; i < class_info.length; i++) { - if (className.equals(constants.constant_multiname[instance_info[i].name_index].getName(constants))) { + if (className.equals(constants.constant_multiname[instance_info[i].name_index].getName(constants, new ArrayList()))) { for (Trait t : class_info[i].static_traits.traits) { if (t instanceof TraitMethodGetterSetter) { TraitMethodGetterSetter t2 = (TraitMethodGetterSetter) t; - if (methodName.equals(t2.getName(this).getName(constants))) { + if (methodName.equals(t2.getName(this).getName(constants, new ArrayList()))) { for (MethodBody body : bodies) { if (body.method_info == t2.method_info) { return body; @@ -484,8 +483,8 @@ public class ABC { if (t instanceof TraitSlotConst) { TraitSlotConst s = ((TraitSlotConst) t); if (s.isNamespace()) { - String key=constants.constant_namespace[s.value_index].getName(constants); - String val=constants.constant_multiname[s.name_index].getNameWithNamespace(constants); + String key = constants.constant_namespace[s.value_index].getName(constants); + String val = constants.constant_multiname[s.name_index].getNameWithNamespace(constants); namespaceMap.put(key, val); } } @@ -497,7 +496,7 @@ public class ABC { if (ns.equals("http://www.adobe.com/2006/actionscript/flash/proxy")) { return "flash.utils.flash_proxy"; } - if(ns.equals("http://adobe.com/AS3/2006/builtin")){ + if (ns.equals("http://adobe.com/AS3/2006/builtin")) { return "-"; } return null; @@ -507,16 +506,16 @@ public class ABC { if (namespaceMap.containsKey(value)) { return namespaceMap.get(value); } else { - String ns=builtInNs(value); - if(ns==null){ + String ns = builtInNs(value); + if (ns == null) { return ""; - }else{ + } else { return ns; } } } - public void export(String directory, boolean pcode,List abcList) throws IOException { + public void export(String directory, boolean pcode, List abcList) throws IOException { for (int i = 0; i < script_info.length; i++) { String path = script_info[i].getPath(this); String packageName = path.substring(0, path.lastIndexOf(".")); @@ -533,7 +532,7 @@ public class ABC { } String fileName = outDir.toString() + File.separator + className + ".as"; FileOutputStream fos = new FileOutputStream(fileName); - fos.write(script_info[i].convert(abcList,this, pcode, false).getBytes()); + fos.write(script_info[i].convert(abcList, this, pcode, false).getBytes()); fos.close(); } } @@ -542,19 +541,19 @@ public class ABC { PrintStream output = new PrintStream(os); constants.dump(output); for (int i = 0; i < method_info.length; i++) { - output.println("MethodInfo[" + i + "]:" + method_info[i].toString(constants)); + output.println("MethodInfo[" + i + "]:" + method_info[i].toString(constants, new ArrayList())); } for (int i = 0; i < metadata_info.length; i++) { output.println("MetadataInfo[" + i + "]:" + metadata_info[i].toString(constants)); } for (int i = 0; i < instance_info.length; i++) { - output.println("InstanceInfo[" + i + "]:" + instance_info[i].toString(this)); + output.println("InstanceInfo[" + i + "]:" + instance_info[i].toString(this, new ArrayList())); } for (int i = 0; i < class_info.length; i++) { - output.println("ClassInfo[" + i + "]:" + class_info[i].toString(this)); + output.println("ClassInfo[" + i + "]:" + class_info[i].toString(this, new ArrayList())); } for (int i = 0; i < script_info.length; i++) { - output.println("ScriptInfo[" + i + "]:" + script_info[i].toString(this)); + output.println("ScriptInfo[" + i + "]:" + script_info[i].toString(this, new ArrayList())); } for (int i = 0; i < bodies.length; i++) { output.println("MethodBody[" + i + "]:"); //+ bodies[i].toString(this, constants, method_info)); diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/AVM2Code.java b/trunk/src/com/jpexs/asdec/abc/avm2/AVM2Code.java index df456b95c..b3d642b2a 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/AVM2Code.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/AVM2Code.java @@ -683,7 +683,7 @@ public class AVM2Code { String s = ""; int i = 0; for (AVM2Instruction instruction : code) { - s += Helper.formatAddress(i) + " " + instruction.toString(constants) + "\r\n"; + s += Helper.formatAddress(i) + " " + instruction.toString(constants, new ArrayList()) + "\r\n"; i++; } return s; @@ -703,8 +703,8 @@ public class AVM2Code { public String toASMSource(ConstantPool constants, MethodBody body) { String ret = ""; for (int e = 0; e < body.exceptions.length; e++) { - ret += "exception " + e + " m[" + body.exceptions[e].name_index + "]\"" + Helper.escapeString(body.exceptions[e].getVarName(constants)) + "\" " - + "m[" + body.exceptions[e].type_index + "]\"" + Helper.escapeString(body.exceptions[e].getTypeName(constants)) + "\"\n"; + ret += "exception " + e + " m[" + body.exceptions[e].name_index + "]\"" + Helper.escapeString(body.exceptions[e].getVarName(constants, new ArrayList())) + "\" " + + "m[" + body.exceptions[e].type_index + "]\"" + Helper.escapeString(body.exceptions[e].getTypeName(constants, new ArrayList())) + "\"\n"; } List offsets = new ArrayList(); for (AVM2Instruction ins : code) { @@ -726,7 +726,7 @@ public class AVM2Code { ret += "exceptiontarget " + e + ":"; } } - ret += ins.toStringNoAddress(constants) + "\n"; + ret += ins.toStringNoAddress(constants, new ArrayList()) + "\n"; ofs += ins.getBytes().length; } @@ -764,11 +764,11 @@ public class AVM2Code { return posCache.get(pos).intValue(); } - private static String listToString(List stack, ConstantPool constants, HashMap localRegNames) { + private static String listToString(List stack, ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { String ret = ""; for (int d = 0; d < stack.size(); d++) { TreeItem o = stack.get(d); - ret += o.toStringSemicoloned(constants, localRegNames) + "\r\n"; + ret += o.toStringSemicoloned(constants, localRegNames, fullyQualifiedNames) + "\r\n"; } return ret; } @@ -973,7 +973,7 @@ public class AVM2Code { return pos2adr(fixIPAfterDebugLine(adr2pos(addr))); } - private ConvertOutput toSource(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) throws ConvertException { + private ConvertOutput toSource(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) throws ConvertException { boolean debugMode = false; if (debugMode) { System.out.println("OPEN SubSource:" + start + "-" + end + " " + code.get(start).toString() + " to " + code.get(end).toString()); @@ -1056,7 +1056,7 @@ public class AVM2Code { if (swins.operands.length >= 3) { if (swins.operands[0] == swins.getBytes().length) { if (adr2pos(pos2adr(f) + swins.operands[2]) < finStart) { - finallyCommands = toSource(isStatic, classIndex, localRegs, stack, scopeStack, abc, constants, method_info, body, finStart, f - 1, localRegNames).output; + finallyCommands = toSource(isStatic, classIndex, localRegs, stack, scopeStack, abc, constants, method_info, body, finStart, f - 1, localRegNames, fullyQualifiedNames).output; returnPos = f + 1; break; } @@ -1081,10 +1081,10 @@ public class AVM2Code { } Stack substack = new Stack(); substack.add(new ExceptionTreeItem(catchedExceptions.get(e))); - catchedCommands.add(toSource(isStatic, classIndex, localRegs, substack, new Stack(), abc, constants, method_info, body, adr2pos(fixAddrAfterDebugLine(catchedExceptions.get(e).target)), eendpos, localRegNames).output); + catchedCommands.add(toSource(isStatic, classIndex, localRegs, substack, new Stack(), abc, constants, method_info, body, adr2pos(fixAddrAfterDebugLine(catchedExceptions.get(e).target)), eendpos, localRegNames, fullyQualifiedNames).output); } - List tryCommands = toSource(isStatic, classIndex, localRegs, stack, scopeStack, abc, constants, method_info, body, ip, endpos - 1, localRegNames).output; + List tryCommands = toSource(isStatic, classIndex, localRegs, stack, scopeStack, abc, constants, method_info, body, ip, endpos - 1, localRegNames, fullyQualifiedNames).output; output.add(new TryTreeItem(tryCommands, catchedExceptions, catchedCommands, finallyCommands)); @@ -1139,7 +1139,7 @@ public class AVM2Code { if ((ip + 2 < code.size()) && (ins.definition instanceof NewCatchIns)) { //Filling local register in catch clause if (code.get(ip + 1).definition instanceof DupIns) { if (code.get(ip + 2).definition instanceof SetLocalTypeIns) { - ins.definition.translate(isStatic, classIndex, localRegs, stack, scopeStack, constants, ins, method_info, output, body, abc, localRegNames); + ins.definition.translate(isStatic, classIndex, localRegs, stack, scopeStack, constants, ins, method_info, output, body, abc, localRegNames, fullyQualifiedNames); ip += 3; continue; } @@ -1249,7 +1249,7 @@ public class AVM2Code { throw new ConvertException("Unknown pattern: no setlocal before lookupswitch", switchPos); } loopList.add(new Loop(ip, switchPos + 1)); - Stack substack = toSource(isStatic, classIndex, localRegs, new Stack(), scopeStack, abc, constants, method_info, body, jumpPos, evalTo - 1, localRegNames).stack; + Stack substack = toSource(isStatic, classIndex, localRegs, new Stack(), scopeStack, abc, constants, method_info, body, jumpPos, evalTo - 1, localRegNames, fullyQualifiedNames).stack; TreeItem switchedValue = substack.pop(); //output.add("loop" + (switchPos + 1) + ":"); int switchBreak = switchPos + 1; @@ -1284,7 +1284,7 @@ public class AVM2Code { if (evalTo > -1) { - substack = toSource(isStatic, classIndex, localRegs, new Stack(), scopeStack, abc, constants, method_info, body, curPos, evalTo - 1, localRegNames).stack; + substack = toSource(isStatic, classIndex, localRegs, new Stack(), scopeStack, abc, constants, method_info, body, curPos, evalTo - 1, localRegNames, fullyQualifiedNames).stack; casesList.add(substack.pop()); } int substart = adr2pos(code.get(switchPos).operands[2 + casePos] + pos2adr(switchPos)); @@ -1296,7 +1296,7 @@ public class AVM2Code { if (evalTo == -1) { subend--; } - List commands = toSource(isStatic, classIndex, localRegs, new Stack(), scopeStack, abc, constants, method_info, body, substart, subend, localRegNames).output; + List commands = toSource(isStatic, classIndex, localRegs, new Stack(), scopeStack, abc, constants, method_info, body, substart, subend, localRegNames, fullyQualifiedNames).output; if ((evalTo == -1) && (casePos + 1 < code.get(switchPos).operands.length - 2)) { if (commands.size() == 1) { commands.remove(0); @@ -1340,16 +1340,16 @@ public class AVM2Code { loopList.add(currentLoop); - ConvertOutput co = toSource(isStatic, classIndex, localRegs, new Stack(), scopeStack, abc, constants, method_info, body, jumpPos, adr2pos(afterBackJumpAddr) - 2, localRegNames); + ConvertOutput co = toSource(isStatic, classIndex, localRegs, new Stack(), scopeStack, abc, constants, method_info, body, jumpPos, adr2pos(afterBackJumpAddr) - 2, localRegNames, fullyQualifiedNames); Stack substack = co.stack; - backJumpIns.definition.translate(isStatic, classIndex, localRegs, substack, scopeStack, constants, backJumpIns, method_info, output, body, abc, localRegNames); + backJumpIns.definition.translate(isStatic, classIndex, localRegs, substack, scopeStack, constants, backJumpIns, method_info, output, body, abc, localRegNames, fullyQualifiedNames); TreeItem expression = substack.pop(); List subins = new ArrayList(); boolean isFor = false; List finalExpression = new ArrayList(); try { - subins = toSource(isStatic, classIndex, localRegs, new Stack(), scopeStack, abc, constants, method_info, body, adr2pos(secondAddr) + 1/*label*/, jumpPos - 1, localRegNames).output; + subins = toSource(isStatic, classIndex, localRegs, new Stack(), scopeStack, abc, constants, method_info, body, adr2pos(secondAddr) + 1/*label*/, jumpPos - 1, localRegNames, fullyQualifiedNames).output; } catch (UnknownJumpException uje) { if ((uje.ip >= start) && (uje.ip <= end)) { currentLoop.loopContinue = uje.ip; @@ -1374,7 +1374,7 @@ public class AVM2Code { } } } - finalExpression = toSource(isStatic, classIndex, localRegs, new Stack(), scopeStack, abc, constants, method_info, body, uje.ip, jumpPos - 1, localRegNames).output; + finalExpression = toSource(isStatic, classIndex, localRegs, new Stack(), scopeStack, abc, constants, method_info, body, uje.ip, jumpPos - 1, localRegNames, fullyQualifiedNames).output; isFor = true; } else { throw new ConvertException("Unknown pattern: jump to nowhere", ip); @@ -1444,20 +1444,20 @@ public class AVM2Code { } else { throw new ConvertException("Unknown pattern: back jump ", ip); } - } else if ((ins.definition instanceof SetLocalTypeIns)&&(ip+1<=end)&&(isKilled(((SetLocalTypeIns)ins.definition).getRegisterId(ins), ip, end))){ //set_local_x,get_local_x..kill x - - AVM2Instruction insAfter=code.get(ip+1); - if((insAfter.definition instanceof GetLocalTypeIns)&&(((GetLocalTypeIns)insAfter.definition).getRegisterId(insAfter)==((SetLocalTypeIns)ins.definition).getRegisterId(ins))){ - TreeItem before=stack.peek(); - ins.definition.translate(isStatic, classIndex, localRegs, stack, scopeStack, constants, ins, method_info, output, body, abc, localRegNames); + } else if ((ins.definition instanceof SetLocalTypeIns) && (ip + 1 <= end) && (isKilled(((SetLocalTypeIns) ins.definition).getRegisterId(ins), ip, end))) { //set_local_x,get_local_x..kill x + + AVM2Instruction insAfter = code.get(ip + 1); + if ((insAfter.definition instanceof GetLocalTypeIns) && (((GetLocalTypeIns) insAfter.definition).getRegisterId(insAfter) == ((SetLocalTypeIns) ins.definition).getRegisterId(ins))) { + TreeItem before = stack.peek(); + ins.definition.translate(isStatic, classIndex, localRegs, stack, scopeStack, constants, ins, method_info, output, body, abc, localRegNames, fullyQualifiedNames); stack.push(before); - ip+=2; + ip += 2; continue iploop; - }else{ - ins.definition.translate(isStatic, classIndex, localRegs, stack, scopeStack, constants, ins, method_info, output, body, abc, localRegNames); + } else { + ins.definition.translate(isStatic, classIndex, localRegs, stack, scopeStack, constants, ins, method_info, output, body, abc, localRegNames, fullyQualifiedNames); ip++; continue iploop; - } + } } else if (ins.definition instanceof DupIns) { int nextPos; do { @@ -1487,7 +1487,7 @@ public class AVM2Code { 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 = toSource(isStatic, classIndex, localRegs, stack, scopeStack, abc, constants, method_info, body, ip + 2, t - 1, localRegNames); + ConvertOutput assignment = toSource(isStatic, classIndex, localRegs, stack, scopeStack, abc, constants, method_info, body, ip + 2, t - 1, localRegNames, fullyQualifiedNames); stack.push(assignment.output.remove(assignment.output.size() - 1)); ip = t + 2; continue iploop; @@ -1501,14 +1501,14 @@ public class AVM2Code { stack.push(new LocalRegTreeItem(ins, reg, v)); stack.push(v); } else { - ins.definition.translate(isStatic, classIndex, localRegs, stack, scopeStack, constants, ins, method_info, output, body, abc, localRegNames); + ins.definition.translate(isStatic, 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); + ins.definition.translate(isStatic, classIndex, localRegs, stack, scopeStack, constants, ins, method_info, output, body, abc, localRegNames, fullyQualifiedNames); ip++; break; //throw new ConvertException("Unknown pattern after DUP:" + insComparsion.toString()); @@ -1516,9 +1516,9 @@ public class AVM2Code { addr = addr + ins.getBytes().length + insAfter.getBytes().length + insAfter.operands[0]; nextPos = adr2pos(addr) - 1; if (isAnd) { - stack.add(new AndTreeItem(insAfter, stack.pop(), toSource(isStatic, classIndex, localRegs, new Stack(), scopeStack, abc, constants, method_info, body, ip + 3, nextPos, localRegNames).stack.pop())); + stack.add(new AndTreeItem(insAfter, stack.pop(), toSource(isStatic, classIndex, localRegs, new Stack(), scopeStack, abc, constants, method_info, body, ip + 3, nextPos, localRegNames, fullyQualifiedNames).stack.pop())); } else { - stack.add(new OrTreeItem(insAfter, stack.pop(), toSource(isStatic, classIndex, localRegs, new Stack(), scopeStack, abc, constants, method_info, body, ip + 3, nextPos, localRegNames).stack.pop())); + stack.add(new OrTreeItem(insAfter, stack.pop(), toSource(isStatic, classIndex, localRegs, new Stack(), scopeStack, abc, constants, method_info, body, ip + 3, nextPos, localRegNames, fullyQualifiedNames).stack.pop())); } ins = code.get(nextPos + 1); ip = nextPos + 1; @@ -1571,13 +1571,13 @@ public class AVM2Code { } } } - ConvertOutput onTrue = toSource(isStatic, classIndex, localRegs, new Stack(), scopeStack, abc, constants, method_info, body, ip + 1, targetIns - 1 - ((hasElse || hasReturn) ? 1 : 0), localRegNames); + ConvertOutput onTrue = toSource(isStatic, classIndex, localRegs, new Stack(), scopeStack, abc, constants, method_info, body, ip + 1, targetIns - 1 - ((hasElse || hasReturn) ? 1 : 0), localRegNames, fullyQualifiedNames); ip = targetIns; ConvertOutput onFalse = new ConvertOutput(new Stack(), new ArrayList()); if (hasElse) { int finalAddr = targetAddr + code.get(targetIns - 1).operands[0]; int finalIns = adr2pos(finalAddr); - onFalse = toSource(isStatic, classIndex, localRegs, new Stack(), scopeStack, abc, constants, method_info, body, targetIns, finalIns - 1, localRegNames); + onFalse = toSource(isStatic, classIndex, localRegs, new Stack(), scopeStack, abc, constants, method_info, body, targetIns, finalIns - 1, localRegNames, fullyQualifiedNames); ip = finalIns; } if ((onTrue.stack.size() > 0) && (onFalse != null) && (onFalse.stack.size() > 0)) { @@ -1587,11 +1587,11 @@ public class AVM2Code { } } 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); + ins.definition.translate(isStatic, classIndex, localRegs, stack, scopeStack, constants, ins, method_info, output, body, abc, localRegNames, fullyQualifiedNames); ip = end + 1; break; } else { - ins.definition.translate(isStatic, classIndex, localRegs, stack, scopeStack, constants, ins, method_info, output, body, abc, localRegNames); + ins.definition.translate(isStatic, classIndex, localRegs, stack, scopeStack, constants, ins, method_info, output, body, abc, localRegNames, fullyQualifiedNames); addr += ins.getBytes().length; ip++; @@ -1624,11 +1624,11 @@ public class AVM2Code { return ret; } - public String toSource(boolean isStatic, int classIndex, ABC abc, ConstantPool constants, MethodInfo method_info[], MethodBody body, HashMap localRegNames, Stack scopeStack, boolean isStaticInitializer) { - return toSource(isStatic, classIndex, abc, constants, method_info, body, false, localRegNames, scopeStack, isStaticInitializer); + public String toSource(boolean isStatic, int classIndex, ABC abc, ConstantPool constants, MethodInfo method_info[], MethodBody body, HashMap localRegNames, Stack scopeStack, boolean isStaticInitializer, List fullyQualifiedNames) { + return toSource(isStatic, classIndex, abc, constants, method_info, body, false, localRegNames, scopeStack, isStaticInitializer, fullyQualifiedNames); } - public List toTree(boolean isStatic, int classIndex, ABC abc, ConstantPool constants, MethodInfo method_info[], MethodBody body, HashMap localRegNames) { + public List toTree(boolean isStatic, int classIndex, ABC abc, ConstantPool constants, MethodInfo method_info[], MethodBody body, HashMap localRegNames, List fullyQualifiedNames) { toSourceCount = 0; loopList = new ArrayList(); unknownJumps = new ArrayList(); @@ -1636,7 +1636,7 @@ public class AVM2Code { finallyJumps = new ArrayList(); HashMap localRegs = new HashMap(); try { - return toSource(isStatic, classIndex, localRegs, new Stack(), new Stack(), abc, constants, method_info, body, 0, code.size() - 1, localRegNames).output; + return toSource(isStatic, classIndex, localRegs, new Stack(), new Stack(), abc, constants, method_info, body, 0, code.size() - 1, localRegNames, fullyQualifiedNames).output; } catch (ConvertException ex) { return new ArrayList(); } @@ -1659,14 +1659,14 @@ public class AVM2Code { return maxRegister + 1; } - public HashMap getLocalRegTypes(ConstantPool constants) { + public HashMap getLocalRegTypes(ConstantPool constants, List fullyQualifiedNames) { HashMap ret = new HashMap(); AVM2Instruction prev = null; for (AVM2Instruction ins : code) { if (ins.definition instanceof SetLocalTypeIns) { if (prev != null) { if (prev.definition instanceof CoerceOrConvertTypeIns) { - ret.put(((SetLocalTypeIns) ins.definition).getRegisterId(ins), ((CoerceOrConvertTypeIns) prev.definition).getTargetType(constants, prev)); + ret.put(((SetLocalTypeIns) ins.definition).getRegisterId(ins), ((CoerceOrConvertTypeIns) prev.definition).getTargetType(constants, prev, fullyQualifiedNames)); } } } @@ -1703,7 +1703,7 @@ public class AVM2Code { } } - public String toSource(boolean isStatic, int classIndex, ABC abc, ConstantPool constants, MethodInfo method_info[], MethodBody body, boolean hilighted, HashMap localRegNames, Stack scopeStack, boolean isStaticInitializer) { + public String toSource(boolean isStatic, int classIndex, ABC abc, ConstantPool constants, MethodInfo method_info[], MethodBody body, boolean hilighted, HashMap localRegNames, Stack scopeStack, boolean isStaticInitializer, List fullyQualifiedNames) { toSourceCount = 0; loopList = new ArrayList(); unknownJumps = new ArrayList(); @@ -1725,7 +1725,7 @@ public class AVM2Code { } try { - list = toSource(isStatic, classIndex, localRegs, new Stack(), scopeStack, abc, constants, method_info, body, 0, code.size() - 1, localRegNames).output; + list = toSource(isStatic, classIndex, localRegs, new Stack(), scopeStack, abc, constants, method_info, body, 0, code.size() - 1, localRegNames, fullyQualifiedNames).output; if (isStaticInitializer) { List newList = new ArrayList(); @@ -1766,7 +1766,7 @@ public class AVM2Code { for (int t = 0; t < body.traits.traits.length; t++) { if (body.traits.traits[t].getName(abc) == sl.multiname) { if (body.traits.traits[t] instanceof TraitSlotConst) { - type = ((TraitSlotConst) body.traits.traits[t]).getType(constants); + type = ((TraitSlotConst) body.traits.traits[t]).getType(constants, fullyQualifiedNames); } } } @@ -1776,7 +1776,7 @@ public class AVM2Code { } } - s = listToString(list, constants, localRegNames); + s = listToString(list, constants, localRegNames, fullyQualifiedNames); } catch (Exception ex) { Logger.getLogger(AVM2Code.class.getName()).log(Level.SEVERE, null, ex); s = "/*\r\n * Decompilation error\r\n * Code may be obfuscated\r\n * Error Message: " + ex.getMessage() + "\r\n */"; diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/CodeStats.java b/trunk/src/com/jpexs/asdec/abc/avm2/CodeStats.java index 3c2d0ddf2..ac3c96bb3 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/CodeStats.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/CodeStats.java @@ -17,6 +17,7 @@ package com.jpexs.asdec.abc.avm2; import com.jpexs.asdec.abc.ABC; +import java.util.List; /** * @@ -31,7 +32,7 @@ public class CodeStats { public boolean has_activation = false; public InstructionStats instructionStats[]; - public String toString(ABC abc) { + public String toString(ABC abc, List fullyQualifiedNames) { String ret = "Stats: maxstack=" + maxstack + ", maxscope=" + maxscope + ", maxlocal=" + maxlocal + "\r\n"; int i = 0; int ms = 0; @@ -40,7 +41,7 @@ public class CodeStats { if (stats.stackpos > ms) { ms = stats.stackpos; } - ret += "" + i + ":" + stats.stackpos + (deltastack >= 0 ? "+" + deltastack : deltastack) + "," + stats.scopepos + " " + stats.ins.toString(abc.constants) + "\r\n"; + ret += "" + i + ":" + stats.stackpos + (deltastack >= 0 ? "+" + deltastack : deltastack) + "," + stats.scopepos + " " + stats.ins.toString(abc.constants, fullyQualifiedNames) + "\r\n"; i++; } return ret; diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/ConstantPool.java b/trunk/src/com/jpexs/asdec/abc/avm2/ConstantPool.java index fede49a42..ed8479a84 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/ConstantPool.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/ConstantPool.java @@ -22,6 +22,7 @@ import com.jpexs.asdec.abc.types.Namespace; import com.jpexs.asdec.abc.types.NamespaceSet; import java.io.OutputStream; import java.io.PrintStream; +import java.util.ArrayList; import java.util.Arrays; public class ConstantPool { @@ -96,15 +97,6 @@ public class ConstantPool { return 0; } - public int getMultiNameId(String s) { - for (int i = 1; i < constant_multiname.length; i++) { - if (constant_multiname[i].getName(this).equals(s)) { - return i; - } - } - return 0; - } - public int forceGetStringId(String val) { int id = getStringId(val); if (id == 0) { @@ -160,7 +152,7 @@ public class ConstantPool { } for (int i = 1; i < constant_multiname.length; i++) { - output.println("Multiname[" + i + "]=" + constant_multiname[i].toString(this)); + output.println("Multiname[" + i + "]=" + constant_multiname[i].toString(this, new ArrayList())); } } } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/AVM2Instruction.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/AVM2Instruction.java index c4ef28cbe..6b2349be4 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/AVM2Instruction.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/AVM2Instruction.java @@ -146,12 +146,12 @@ public class AVM2Instruction { return s; } - public String getParams(ConstantPool constants) { + public String getParams(ConstantPool constants, List fullyQualifiedNames) { String s = ""; for (int i = 0; i < definition.operands.length; i++) { switch (definition.operands[i]) { case AVM2Code.DAT_MULTINAME_INDEX: - s += " m[" + operands[i] + "]\"" + Helper.escapeString(constants.constant_multiname[operands[i]].toString(constants)) + "\""; + s += " m[" + operands[i] + "]\"" + Helper.escapeString(constants.constant_multiname[operands[i]].toString(constants, fullyQualifiedNames)) + "\""; break; case AVM2Code.DAT_STRING_INDEX: s += " \"" + Helper.escapeString(constants.constant_string[operands[i]]) + "\""; @@ -207,15 +207,15 @@ public class AVM2Instruction { return " ;" + comment; } - public String toString(ConstantPool constants) { + public String toString(ConstantPool constants, List fullyQualifiedNames) { String s = Helper.formatAddress(offset) + " " + Helper.padSpaceRight(Helper.byteArrToString(getBytes()), 30) + definition.instructionName; - s += getParams(constants) + getComment(); + s += getParams(constants, fullyQualifiedNames) + getComment(); return s; } - public String toStringNoAddress(ConstantPool constants) { + public String toStringNoAddress(ConstantPool constants, List fullyQualifiedNames) { String s = definition.instructionName; - s += getParams(constants) + getComment(); + s += getParams(constants, fullyQualifiedNames) + getComment(); return s; } } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/InstructionDefinition.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/InstructionDefinition.java index 24a4ef173..d0b7a95ff 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/InstructionDefinition.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/InstructionDefinition.java @@ -70,7 +70,7 @@ public class InstructionDefinition { 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { } protected FullMultinameTreeItem resolveMultiname(Stack stack, ConstantPool constants, int multinameIndex, AVM2Instruction ins) { @@ -97,7 +97,7 @@ public class InstructionDefinition { } - protected String resolveMultinameNoPop(int pos, Stack stack, ConstantPool constants, int multinameIndex, AVM2Instruction ins) { + protected String resolveMultinameNoPop(int pos, Stack stack, ConstantPool constants, int multinameIndex, AVM2Instruction ins, List fullyQualifiedNames) { String ns = ""; String name; if (constants.constant_multiname[multinameIndex].needsNs()) { @@ -107,7 +107,7 @@ public class InstructionDefinition { if (constants.constant_multiname[multinameIndex].needsName()) { name = stack.get(pos).toString(); } else { - name = hilighOffset(constants.constant_multiname[multinameIndex].getName(constants), ins.offset); + name = hilighOffset(constants.constant_multiname[multinameIndex].getName(constants, fullyQualifiedNames), ins.offset); } return name + ns; } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/SetTypeIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/SetTypeIns.java index 8ab0c0492..f57686149 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/SetTypeIns.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/SetTypeIns.java @@ -24,5 +24,5 @@ import java.util.Stack; public interface SetTypeIns { - public abstract String getObject(Stack stack, ABC abc, AVM2Instruction ins, List output, com.jpexs.asdec.abc.types.MethodBody body, HashMap localRegNames); + public abstract String getObject(Stack stack, ABC abc, AVM2Instruction ins, List output, com.jpexs.asdec.abc.types.MethodBody body, HashMap localRegNames, List fullyQualifiedNames); } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/arithmetic/AddIIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/arithmetic/AddIIns.java index afe910e46..ef04ce4b7 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/arithmetic/AddIIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { TreeItem v2 = (TreeItem) stack.pop(); TreeItem v1 = (TreeItem) stack.pop(); stack.push(new AddTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/arithmetic/AddIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/arithmetic/AddIns.java index 701c2b5fb..a43e3c63c 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/arithmetic/AddIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { TreeItem v2 = (TreeItem) stack.pop(); TreeItem v1 = (TreeItem) stack.pop(); stack.push(new AddTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/arithmetic/DecrementIIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/arithmetic/DecrementIIns.java index 1ee359959..111820b80 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/arithmetic/DecrementIIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { stack.push(new DecrementTreeItem(ins, (TreeItem) stack.pop())); } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/arithmetic/DecrementIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/arithmetic/DecrementIns.java index 8c93f3352..a09061da9 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/arithmetic/DecrementIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { stack.push(new DecrementTreeItem(ins, (TreeItem) stack.pop())); } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/arithmetic/DivideIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/arithmetic/DivideIns.java index 595b2e545..999ca2446 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/arithmetic/DivideIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { TreeItem v2 = (TreeItem) stack.pop(); TreeItem v1 = (TreeItem) stack.pop(); stack.push(new DivideTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/arithmetic/IncrementIIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/arithmetic/IncrementIIns.java index 59fcf7c63..aac63c107 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/arithmetic/IncrementIIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { stack.push(new IncrementTreeItem(ins, (TreeItem) stack.pop())); } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/arithmetic/IncrementIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/arithmetic/IncrementIns.java index c5acb8a73..6c76be587 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/arithmetic/IncrementIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { stack.push(new IncrementTreeItem(ins, (TreeItem) stack.pop())); } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/arithmetic/ModuloIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/arithmetic/ModuloIns.java index d468049af..bc1b16717 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/arithmetic/ModuloIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { TreeItem v2 = (TreeItem) stack.pop(); TreeItem v1 = (TreeItem) stack.pop(); stack.push(new ModuloTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/arithmetic/MultiplyIIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/arithmetic/MultiplyIIns.java index 6a4375945..11ffdeaa8 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/arithmetic/MultiplyIIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { TreeItem v2 = (TreeItem) stack.pop(); TreeItem v1 = (TreeItem) stack.pop(); stack.push(new MultiplyTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/arithmetic/MultiplyIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/arithmetic/MultiplyIns.java index 0d1ff5756..fde4b47e3 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/arithmetic/MultiplyIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { TreeItem v2 = (TreeItem) stack.pop(); TreeItem v1 = (TreeItem) stack.pop(); stack.push(new MultiplyTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/arithmetic/NegateIIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/arithmetic/NegateIIns.java index 1e3f42e9f..bce10f035 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/arithmetic/NegateIIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { TreeItem v = (TreeItem) stack.pop(); stack.push(new NegTreeItem(ins, v)); } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/arithmetic/NegateIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/arithmetic/NegateIns.java index b0917bb65..a687f950f 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/arithmetic/NegateIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { TreeItem v = (TreeItem) stack.pop(); stack.push(new NegTreeItem(ins, v)); } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/arithmetic/NotIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/arithmetic/NotIns.java index 0a7c7a2ee..9d1a4467d 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/arithmetic/NotIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { TreeItem v = (TreeItem) stack.pop(); stack.push(new NotTreeItem(ins, v)); } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/arithmetic/SubtractIIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/arithmetic/SubtractIIns.java index 867d68f78..c40dee7ef 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/arithmetic/SubtractIIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { TreeItem v2 = (TreeItem) stack.pop(); TreeItem v1 = (TreeItem) stack.pop(); stack.push(new SubtractTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/arithmetic/SubtractIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/arithmetic/SubtractIns.java index c36ba8e0c..8740692e1 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/arithmetic/SubtractIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { TreeItem v2 = (TreeItem) stack.pop(); TreeItem v1 = (TreeItem) stack.pop(); stack.push(new SubtractTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/bitwise/BitAndIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/bitwise/BitAndIns.java index a1ff72daf..98b406abc 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/bitwise/BitAndIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { TreeItem v2 = (TreeItem) stack.pop(); TreeItem v1 = (TreeItem) stack.pop(); stack.push(new BitAndTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/bitwise/BitNotIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/bitwise/BitNotIns.java index 2943253c7..0e59b732a 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/bitwise/BitNotIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { TreeItem v = (TreeItem) stack.pop(); stack.push(new BitNotTreeItem(ins, v)); } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/bitwise/BitOrIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/bitwise/BitOrIns.java index 8696fc9cd..3e50da83b 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/bitwise/BitOrIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { TreeItem v2 = (TreeItem) stack.pop(); TreeItem v1 = (TreeItem) stack.pop(); stack.push(new BitOrTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/bitwise/BitXorIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/bitwise/BitXorIns.java index acdc9476d..785df9c03 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/bitwise/BitXorIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { TreeItem v2 = (TreeItem) stack.pop(); TreeItem v1 = (TreeItem) stack.pop(); stack.push(new BitXorTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/bitwise/LShiftIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/bitwise/LShiftIns.java index c27d668cc..825d2cf24 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/bitwise/LShiftIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { TreeItem v2 = (TreeItem) stack.pop(); TreeItem v1 = (TreeItem) stack.pop(); stack.push(new LShiftTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/bitwise/RShiftIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/bitwise/RShiftIns.java index 461a0cc9f..4f1a2cded 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/bitwise/RShiftIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { TreeItem v2 = (TreeItem) stack.pop(); TreeItem v1 = (TreeItem) stack.pop(); stack.push(new RShiftTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/bitwise/URShiftIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/bitwise/URShiftIns.java index 2897b9357..d9bf22037 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/bitwise/URShiftIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { TreeItem v2 = (TreeItem) stack.pop(); TreeItem v1 = (TreeItem) stack.pop(); stack.push(new URShiftTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/comparsion/EqualsIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/comparsion/EqualsIns.java index bd506233c..49714f33e 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/comparsion/EqualsIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { TreeItem v2 = (TreeItem) stack.pop(); TreeItem v1 = (TreeItem) stack.pop(); stack.push(new EqTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/comparsion/GreaterEqualsIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/comparsion/GreaterEqualsIns.java index 8cc841163..1f154f7e8 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/comparsion/GreaterEqualsIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { TreeItem v2 = (TreeItem) stack.pop(); TreeItem v1 = (TreeItem) stack.pop(); stack.push(new GeTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/comparsion/GreaterThanIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/comparsion/GreaterThanIns.java index 26d099cbc..d78ef6348 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/comparsion/GreaterThanIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { TreeItem v2 = (TreeItem) stack.pop(); TreeItem v1 = (TreeItem) stack.pop(); stack.push(new LtTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/comparsion/LessEqualsIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/comparsion/LessEqualsIns.java index 834e7019b..a8a3e1d83 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/comparsion/LessEqualsIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { TreeItem v2 = (TreeItem) stack.pop(); TreeItem v1 = (TreeItem) stack.pop(); stack.push(new LeTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/comparsion/LessThanIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/comparsion/LessThanIns.java index cc34fd011..d82fb4bca 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/comparsion/LessThanIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { TreeItem v2 = (TreeItem) stack.pop(); TreeItem v1 = (TreeItem) stack.pop(); stack.push(new GtTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/comparsion/StrictEqualsIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/comparsion/StrictEqualsIns.java index b4fa9a7f1..2b9856d8a 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/comparsion/StrictEqualsIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { TreeItem v2 = (TreeItem) stack.pop(); TreeItem v1 = (TreeItem) stack.pop(); stack.push(new StrictEqTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/construction/ConstructIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/construction/ConstructIns.java index 69d3ea281..0e9996b6c 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/construction/ConstructIns.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/construction/ConstructIns.java @@ -50,7 +50,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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.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/asdec/abc/avm2/instructions/construction/ConstructPropIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/construction/ConstructPropIns.java index 17d4db770..588a364e4 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/construction/ConstructPropIns.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/construction/ConstructPropIns.java @@ -53,7 +53,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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.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/asdec/abc/avm2/instructions/construction/ConstructSuperIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/construction/ConstructSuperIns.java index 52c19d22c..ec73cb500 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/construction/ConstructSuperIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.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/asdec/abc/avm2/instructions/construction/NewActivationIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/construction/NewActivationIns.java index e0c52123c..9c1f9147e 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/construction/NewActivationIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { stack.push(new NewActivationTreeItem(ins)); } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/construction/NewArrayIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/construction/NewArrayIns.java index 2db659a27..b6e7b7da9 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/construction/NewArrayIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.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/asdec/abc/avm2/instructions/construction/NewCatchIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/construction/NewCatchIns.java index 32fd22c36..dea57bc8e 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/construction/NewCatchIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.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/asdec/abc/avm2/instructions/construction/NewClassIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/construction/NewClassIns.java index 33f22cbae..edc3f0449 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/construction/NewClassIns.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/construction/NewClassIns.java @@ -35,10 +35,10 @@ 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { int clsIndex = ins.operands[0]; - String baseType = stack.pop().toString(constants, localRegNames); - stack.push(new UnparsedTreeItem(ins, "new " + abc.constants.constant_multiname[abc.instance_info[clsIndex].name_index].getName(constants) + ".class extends " + baseType)); + String baseType = stack.pop().toString(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)); } @Override diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/construction/NewFunctionIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/construction/NewFunctionIns.java index 3a5b39c9e..f4686f6a3 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/construction/NewFunctionIns.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/construction/NewFunctionIns.java @@ -37,16 +37,16 @@ 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { int methodIndex = ins.operands[0]; MethodBody mybody = abc.findBody(methodIndex); String bodyStr = ""; String paramStr = ""; if (mybody != null) { - bodyStr = Highlighting.hilighMethodEnd() + mybody.toString(false, isStatic, classIndex, abc, constants, method_info, new Stack()/*scopeStack*/, false, true) + Highlighting.hilighMethodBegin(body.method_info); - paramStr = method_info[methodIndex].getParamStr(constants, mybody, abc); + bodyStr = Highlighting.hilighMethodEnd() + mybody.toString(false, isStatic, classIndex, abc, constants, method_info, new Stack()/*scopeStack*/, false, true, fullyQualifiedNames) + Highlighting.hilighMethodBegin(body.method_info); + paramStr = method_info[methodIndex].getParamStr(constants, mybody, abc, fullyQualifiedNames); } - stack.push(new NewFunctionTreeItem(ins, paramStr, method_info[methodIndex].getReturnTypeStr(constants), bodyStr)); + stack.push(new NewFunctionTreeItem(ins, paramStr, method_info[methodIndex].getReturnTypeStr(constants, fullyQualifiedNames), bodyStr)); } @Override diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/construction/NewObjectIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/construction/NewObjectIns.java index 40f6f71fc..2350568e5 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/construction/NewObjectIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.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/asdec/abc/avm2/instructions/executing/CallIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/executing/CallIns.java index 24bba41be..b1e29f674 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/executing/CallIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.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/asdec/abc/avm2/instructions/executing/CallMethodIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/executing/CallMethodIns.java index 296db8c0b..597764ba5 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/executing/CallMethodIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.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/asdec/abc/avm2/instructions/executing/CallPropLexIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/executing/CallPropLexIns.java index 96e6cacdd..b1ba8742d 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/executing/CallPropLexIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.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/asdec/abc/avm2/instructions/executing/CallPropVoidIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/executing/CallPropVoidIns.java index 482cb5702..80d3530ef 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/executing/CallPropVoidIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.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/asdec/abc/avm2/instructions/executing/CallPropertyIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/executing/CallPropertyIns.java index e487216e5..12af2b888 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/executing/CallPropertyIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.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/asdec/abc/avm2/instructions/executing/CallStaticIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/executing/CallStaticIns.java index 93fe963c7..ae7df8ea0 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/executing/CallStaticIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.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/asdec/abc/avm2/instructions/executing/CallSuperIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/executing/CallSuperIns.java index 1accdd19a..4064ca1e2 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/executing/CallSuperIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.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/asdec/abc/avm2/instructions/executing/CallSuperVoidIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/executing/CallSuperVoidIns.java index 57521d62a..8de351c51 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/executing/CallSuperVoidIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.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/asdec/abc/avm2/instructions/jumps/IfEqIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/jumps/IfEqIns.java index 4c1b455c2..9fd4cb5ab 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/jumps/IfEqIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { TreeItem v2 = (TreeItem) stack.pop(); TreeItem v1 = (TreeItem) stack.pop(); stack.push(new EqTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/jumps/IfFalseIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/jumps/IfFalseIns.java index 3d3e1e24e..d3f40cbd3 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/jumps/IfFalseIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { TreeItem v1 = (TreeItem) stack.pop(); stack.push(new NotTreeItem(ins, v1)); } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/jumps/IfGeIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/jumps/IfGeIns.java index 869aebb4e..33bc02e25 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/jumps/IfGeIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { TreeItem v2 = (TreeItem) stack.pop(); TreeItem v1 = (TreeItem) stack.pop(); stack.push(new GeTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/jumps/IfGtIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/jumps/IfGtIns.java index 1d955b7ca..d1296a93e 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/jumps/IfGtIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { TreeItem v2 = (TreeItem) stack.pop(); TreeItem v1 = (TreeItem) stack.pop(); stack.push(new GtTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/jumps/IfLeIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/jumps/IfLeIns.java index 8d8727405..7e1e9c6b4 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/jumps/IfLeIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { TreeItem v2 = (TreeItem) stack.pop(); TreeItem v1 = (TreeItem) stack.pop(); stack.push(new LeTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/jumps/IfLtIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/jumps/IfLtIns.java index 5a33abcaa..6253af05b 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/jumps/IfLtIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { TreeItem v2 = (TreeItem) stack.pop(); TreeItem v1 = (TreeItem) stack.pop(); stack.push(new LtTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/jumps/IfNGeIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/jumps/IfNGeIns.java index d17ac5c0d..78f093a23 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/jumps/IfNGeIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { TreeItem v2 = (TreeItem) stack.pop(); TreeItem v1 = (TreeItem) stack.pop(); stack.push(new LtTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/jumps/IfNGtIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/jumps/IfNGtIns.java index d18779eff..2199c8579 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/jumps/IfNGtIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { TreeItem v2 = (TreeItem) stack.pop(); TreeItem v1 = (TreeItem) stack.pop(); stack.push(new LeTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/jumps/IfNLeIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/jumps/IfNLeIns.java index 710df5d66..5a5ab75d7 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/jumps/IfNLeIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { TreeItem v2 = (TreeItem) stack.pop(); TreeItem v1 = (TreeItem) stack.pop(); stack.push(new GtTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/jumps/IfNLtIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/jumps/IfNLtIns.java index 149092181..1f95108f6 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/jumps/IfNLtIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { TreeItem v2 = (TreeItem) stack.pop(); TreeItem v1 = (TreeItem) stack.pop(); stack.push(new GeTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/jumps/IfNeIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/jumps/IfNeIns.java index fc625ca62..a8b9ada79 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/jumps/IfNeIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { TreeItem v2 = (TreeItem) stack.pop(); TreeItem v1 = (TreeItem) stack.pop(); stack.push(new NeqTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/jumps/IfStrictEqIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/jumps/IfStrictEqIns.java index 88b06b5a8..316c23626 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/jumps/IfStrictEqIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { TreeItem v2 = (TreeItem) stack.pop(); TreeItem v1 = (TreeItem) stack.pop(); stack.push(new StrictEqTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/jumps/IfStrictNeIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/jumps/IfStrictNeIns.java index 4dd55f076..78ae09d85 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/jumps/IfStrictNeIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { TreeItem v2 = (TreeItem) stack.pop(); TreeItem v1 = (TreeItem) stack.pop(); stack.push(new StrictNeqTreeItem(ins, v1, v2)); diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/jumps/IfTrueIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/jumps/IfTrueIns.java index fd4ada8c5..f6bdee8cb 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/jumps/IfTrueIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { //String v1 = stack.pop().toString(); //stack.push("(" + v1 + ")"); } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/jumps/JumpIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/jumps/JumpIns.java index bdfed5a68..239bca00d 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/jumps/JumpIns.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/jumps/JumpIns.java @@ -35,7 +35,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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { stack.push(new BooleanTreeItem(ins, Boolean.TRUE));// + ins.operands[0]); } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/jumps/LookupSwitchIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/jumps/LookupSwitchIns.java index b8934ffd0..62c0e8729 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/jumps/LookupSwitchIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.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/asdec/abc/avm2/instructions/localregs/DecLocalIIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/localregs/DecLocalIIns.java index aba622434..3617183ad 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/localregs/DecLocalIIns.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/localregs/DecLocalIIns.java @@ -54,7 +54,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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { int regIndex = ins.operands[0]; output.add(new DecLocalTreeItem(ins, regIndex)); } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/localregs/DecLocalIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/localregs/DecLocalIns.java index edf586157..072986c13 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/localregs/DecLocalIns.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/localregs/DecLocalIns.java @@ -54,7 +54,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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { int regIndex = ins.operands[0]; output.add(new DecLocalTreeItem(ins, regIndex)); } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/localregs/GetLocal0Ins.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/localregs/GetLocal0Ins.java index 3181fadb0..cb230b20f 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/localregs/GetLocal0Ins.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/localregs/GetLocal0Ins.java @@ -41,7 +41,7 @@ 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { if (isStatic) { stack.push(new ClassTreeItem(abc.instance_info[classIndex].getName(constants))); } else { diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/localregs/GetLocal1Ins.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/localregs/GetLocal1Ins.java index 36030027b..65ba5aaf2 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/localregs/GetLocal1Ins.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { stack.push(new LocalRegTreeItem(ins, 1, localRegs.get(1))); } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/localregs/GetLocal2Ins.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/localregs/GetLocal2Ins.java index 961636ccf..3aed30b7f 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/localregs/GetLocal2Ins.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { stack.push(new LocalRegTreeItem(ins, 2, localRegs.get(2))); } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/localregs/GetLocal3Ins.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/localregs/GetLocal3Ins.java index b19452000..24604141f 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/localregs/GetLocal3Ins.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { stack.push(new LocalRegTreeItem(ins, 3, localRegs.get(3))); } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/localregs/GetLocalIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/localregs/GetLocalIns.java index 67acc01ac..555346caa 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/localregs/GetLocalIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.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/asdec/abc/avm2/instructions/localregs/IncLocalIIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/localregs/IncLocalIIns.java index 2c8dc99f4..495e4d43e 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/localregs/IncLocalIIns.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/localregs/IncLocalIIns.java @@ -34,7 +34,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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { int regIndex = ins.operands[0]; output.add(new IncLocalTreeItem(ins, regIndex)); } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/localregs/IncLocalIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/localregs/IncLocalIns.java index 1443a572a..cb413469f 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/localregs/IncLocalIns.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/localregs/IncLocalIns.java @@ -34,7 +34,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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { int regIndex = ins.operands[0]; output.add(new IncLocalTreeItem(ins, regIndex)); } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/localregs/KillIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/localregs/KillIns.java index 4bb55983b..37e3afd7a 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/localregs/KillIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { //kill local register } } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/localregs/SetLocalTypeIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/localregs/SetLocalTypeIns.java index cea4ddb77..e340c78d3 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/localregs/SetLocalTypeIns.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/localregs/SetLocalTypeIns.java @@ -44,7 +44,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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { int regId = getRegisterId(ins); TreeItem value = (TreeItem) stack.pop(); localRegs.put(regId, value); @@ -105,7 +105,7 @@ public abstract class SetLocalTypeIns extends InstructionDefinition implements S output.add(new SetLocalTreeItem(ins, regId, value)); } - public String getObject(Stack stack, ABC abc, AVM2Instruction ins, List output, com.jpexs.asdec.abc.types.MethodBody body, HashMap localRegNames) { + public String getObject(Stack stack, ABC abc, AVM2Instruction ins, List output, com.jpexs.asdec.abc.types.MethodBody body, HashMap localRegNames, List fullyQualifiedNames) { return TreeItem.localRegName(localRegNames, getRegisterId(ins)); } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/DeletePropertyIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/DeletePropertyIns.java index 5875f6781..fe58085f6 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/DeletePropertyIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { int multinameIndex = ins.operands[0]; FullMultinameTreeItem multiname = resolveMultiname(stack, constants, multinameIndex, ins); TreeItem obj = (TreeItem) stack.pop(); diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/FindPropertyIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/FindPropertyIns.java index afe4a8175..75a2797f0 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/FindPropertyIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.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/asdec/abc/avm2/instructions/other/FindPropertyStrictIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/FindPropertyStrictIns.java index bdd520cc9..71f1bac9c 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/FindPropertyStrictIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.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/asdec/abc/avm2/instructions/other/GetDescendantsIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/GetDescendantsIns.java index 11c1556b6..b289fab40 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/GetDescendantsIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { int multinameIndex = ins.operands[0]; FullMultinameTreeItem multiname = resolveMultiname(stack, constants, multinameIndex, ins); TreeItem obj = (TreeItem) stack.pop(); diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/GetGlobalScopeIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/GetGlobalScopeIns.java index e671c6bcb..407e2342b 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/GetGlobalScopeIns.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/GetGlobalScopeIns.java @@ -40,7 +40,7 @@ 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { if (scopeStack.isEmpty()) { stack.push(new ClassTreeItem(abc.instance_info[classIndex].getName(constants))); return; diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/GetGlobalSlotIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/GetGlobalSlotIns.java index c9d1e3e35..68d0b1a06 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/GetGlobalSlotIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { int slotIndex = ins.operands[0]; TreeItem obj = (TreeItem) scopeStack.get(0); //scope Multiname slotname = null; diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/GetLexIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/GetLexIns.java index 200d3bd8f..1a143598d 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/GetLexIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.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/asdec/abc/avm2/instructions/other/GetPropertyIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/GetPropertyIns.java index e62d46430..eba3ef193 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/GetPropertyIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { int multinameIndex = ins.operands[0]; FullMultinameTreeItem multiname = resolveMultiname(stack, constants, multinameIndex, ins); TreeItem obj = (TreeItem) stack.pop(); diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/GetScopeObjectIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/GetScopeObjectIns.java index a7ac0d8f5..fdd3cb98d 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/GetScopeObjectIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { int index = ins.operands[0]; /* System.out.println("Getting scope object"+index+":"); for(TreeItem ti:scopeStack){ diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/GetSlotIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/GetSlotIns.java index ce28a3633..45ca457b7 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/GetSlotIns.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/GetSlotIns.java @@ -40,7 +40,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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { int slotIndex = ins.operands[0]; TreeItem obj = (TreeItem) stack.pop(); //scope Multiname slotname = null; diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/GetSuperIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/GetSuperIns.java index 1187ef9af..a712a6ede 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/GetSuperIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { int multinameIndex = ins.operands[0]; FullMultinameTreeItem multiname = resolveMultiname(stack, constants, multinameIndex, ins); TreeItem obj = (TreeItem) stack.pop(); diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/HasNext2Ins.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/HasNext2Ins.java index 241860980..fc593bf80 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/HasNext2Ins.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.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/asdec/abc/avm2/instructions/other/HasNextIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/HasNextIns.java index 9887fb2a2..fd4a9f57f 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/HasNextIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { TreeItem curIndex = (TreeItem) stack.pop(); TreeItem obj = (TreeItem) stack.pop(); stack.push(new InTreeItem(ins, curIndex, obj)); diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/InIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/InIns.java index a45839534..f67dc75fe 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/InIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { TreeItem obj = (TreeItem) stack.pop(); TreeItem name = (TreeItem) stack.pop(); stack.push(new InTreeItem(ins, name, obj)); diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/InitPropertyIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/InitPropertyIns.java index 81a91c94b..a4bbe3e3d 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/InitPropertyIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { int multinameIndex = ins.operands[0]; TreeItem val = (TreeItem) stack.pop(); diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/NextNameIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/NextNameIns.java index a0156cb6b..8cf559bd1 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/NextNameIns.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/NextNameIns.java @@ -33,7 +33,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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { TreeItem index = stack.pop(); TreeItem obj = stack.pop(); //stack.push(obj + ".nextName(" + index + ")"); diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/NextValueIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/NextValueIns.java index 67f75fb0d..4916f77ed 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/NextValueIns.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/NextValueIns.java @@ -33,7 +33,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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { TreeItem index = stack.pop(); TreeItem obj = stack.pop(); //stack.push(obj + ".nextValue(" + index + ")"); diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/ReturnValueIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/ReturnValueIns.java index b5ed60f1f..1f7cef5c3 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/ReturnValueIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { output.add(new ReturnValueTreeItem(ins, (TreeItem) stack.pop())); } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/ReturnVoidIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/ReturnVoidIns.java index fbeaefbe5..4640b04e6 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/ReturnVoidIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { output.add(new ReturnVoidTreeItem(ins)); } } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/SetGlobalSlotIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/SetGlobalSlotIns.java index ddd4a7f77..80b8640dd 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/SetGlobalSlotIns.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/SetGlobalSlotIns.java @@ -36,11 +36,11 @@ 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { output.add(new SetGlobalSlotTreeItem(ins, ins.operands[0], (TreeItem) stack.pop())); } - public String getObject(Stack stack, ABC abc, AVM2Instruction ins, List output, com.jpexs.asdec.abc.types.MethodBody body, HashMap localRegNames) { + public String getObject(Stack stack, ABC abc, AVM2Instruction ins, List output, com.jpexs.asdec.abc.types.MethodBody body, HashMap localRegNames, List fullyQualifiedNames) { return "globalslot" + ins.operands[0]; } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/SetPropertyIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/SetPropertyIns.java index 7eba4b1bf..168e0bd3d 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/SetPropertyIns.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/SetPropertyIns.java @@ -45,7 +45,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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { int multinameIndex = ins.operands[0]; TreeItem value = (TreeItem) stack.pop(); FullMultinameTreeItem multiname = resolveMultiname(stack, constants, multinameIndex, ins); @@ -112,9 +112,9 @@ public class SetPropertyIns extends InstructionDefinition implements SetTypeIns output.add(new SetPropertyTreeItem(ins, obj, multiname, value)); } - public String getObject(Stack stack, ABC abc, AVM2Instruction ins, List output, com.jpexs.asdec.abc.types.MethodBody body, HashMap localRegNames) { + public String getObject(Stack stack, ABC abc, AVM2Instruction ins, List output, com.jpexs.asdec.abc.types.MethodBody body, HashMap localRegNames, List fullyQualifiedNames) { int multinameIndex = ins.operands[0]; - String multiname = resolveMultinameNoPop(0, stack, abc.constants, multinameIndex, ins); + String multiname = resolveMultinameNoPop(0, stack, abc.constants, multinameIndex, ins, fullyQualifiedNames); TreeItem obj = stack.get(1 + resolvedCount(abc.constants, multinameIndex)); //pod vrcholem if ((!obj.toString().equals(""))) { multiname = "." + multiname; diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/SetSlotIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/SetSlotIns.java index 8a1bc4202..56bba8c7a 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/SetSlotIns.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/SetSlotIns.java @@ -46,7 +46,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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { int slotIndex = ins.operands[0]; TreeItem value = (TreeItem) stack.pop(); TreeItem obj = (TreeItem) stack.pop(); //scopeId @@ -65,7 +65,7 @@ public class SetSlotIns extends InstructionDefinition implements SetTypeIns { } - if (localRegNames.containsValue(slotname.getName(constants))) { + if (localRegNames.containsValue(slotname.getName(constants, fullyQualifiedNames))) { return; }; @@ -122,14 +122,14 @@ public class SetSlotIns extends InstructionDefinition implements SetTypeIns { output.add(new SetSlotTreeItem(ins, obj, slotname, value)); } - public String getObject(Stack stack, ABC abc, AVM2Instruction ins, List output, com.jpexs.asdec.abc.types.MethodBody body, HashMap localRegNames) { + public String getObject(Stack stack, ABC abc, AVM2Instruction ins, List output, com.jpexs.asdec.abc.types.MethodBody body, HashMap localRegNames, List fullyQualifiedNames) { int slotIndex = ins.operands[0]; ////String obj = stack.get(1); String slotname = ""; 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) { - slotname = body.traits.traits[t].getName(abc).getName(abc.constants); + slotname = body.traits.traits[t].getName(abc).getName(abc.constants, fullyQualifiedNames); } } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/SetSuperIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/SetSuperIns.java index 8689fe852..70f3974fe 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/SetSuperIns.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/SetSuperIns.java @@ -37,7 +37,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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { int multinameIndex = ins.operands[0]; TreeItem value = (TreeItem) stack.pop(); @@ -46,10 +46,10 @@ public class SetSuperIns extends InstructionDefinition implements SetTypeIns { output.add(new SetSuperTreeItem(ins, value, obj, multiname)); } - public String getObject(Stack stack, ABC abc, AVM2Instruction ins, List output, com.jpexs.asdec.abc.types.MethodBody body, HashMap localRegNames) { + public String getObject(Stack stack, ABC abc, AVM2Instruction ins, List output, com.jpexs.asdec.abc.types.MethodBody body, HashMap localRegNames, List fullyQualifiedNames) { int multinameIndex = ins.operands[0]; - String multiname = resolveMultinameNoPop(1, stack, abc.constants, multinameIndex, ins); - String obj = stack.get(1 + resolvedCount(abc.constants, multinameIndex)).toString(abc.constants, localRegNames); + String multiname = resolveMultinameNoPop(1, stack, abc.constants, multinameIndex, ins, fullyQualifiedNames); + String obj = stack.get(1 + resolvedCount(abc.constants, multinameIndex)).toString(abc.constants, localRegNames, fullyQualifiedNames); return obj + ".super." + multiname; } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/ThrowIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/ThrowIns.java index 82f7c3c90..67c6db199 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/other/ThrowIns.java +++ b/trunk/src/com/jpexs/asdec/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) { + 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) { output.add(new ThrowTreeItem(ins, (TreeItem) stack.pop())); } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/DupIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/DupIns.java index 4554e472d..bf026fe49 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/DupIns.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/DupIns.java @@ -41,7 +41,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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { TreeItem v = (TreeItem) stack.pop(); stack.push(v); stack.push(v); diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/PopIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/PopIns.java index e8a2b199e..26d49b1de 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/PopIns.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/PopIns.java @@ -40,7 +40,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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { if (stack.size() > 0) { TreeItem top = stack.pop(); if (top instanceof CallPropertyTreeItem) { diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/PopScopeIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/PopScopeIns.java index c4851541c..7a9591885 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/PopScopeIns.java +++ b/trunk/src/com/jpexs/asdec/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) { + 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) { TreeItem scope = (TreeItem) scopeStack.pop(); for (int i = output.size() - 1; i >= 0; i--) { if (output.get(i) instanceof WithTreeItem) { diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/PushByteIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/PushByteIns.java index 12687c741..7bd967edd 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/PushByteIns.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/PushByteIns.java @@ -41,7 +41,7 @@ public class PushByteIns 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { stack.push(new IntegerValueTreeItem(ins, new Long(ins.operands[0]))); } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/PushDoubleIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/PushDoubleIns.java index 1161c87b6..377712a94 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/PushDoubleIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.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/asdec/abc/avm2/instructions/stack/PushFalseIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/PushFalseIns.java index 6d2377384..151deb17d 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/PushFalseIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { stack.push(new BooleanTreeItem(ins, Boolean.FALSE)); } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/PushIntIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/PushIntIns.java index 4b5d633cd..24427436d 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/PushIntIns.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/PushIntIns.java @@ -41,7 +41,7 @@ public class PushIntIns 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.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/asdec/abc/avm2/instructions/stack/PushNamespaceIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/PushNamespaceIns.java index 2e05b13a5..73dfe138c 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/PushNamespaceIns.java +++ b/trunk/src/com/jpexs/asdec/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) { + 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) { stack.push(new NameSpaceTreeItem(ins, ins.operands[0])); } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/PushNanIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/PushNanIns.java index 37565762c..00206ed85 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/PushNanIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { stack.push(new NanTreeItem(ins)); } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/PushNullIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/PushNullIns.java index bd49337f1..01ca1a1b9 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/PushNullIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { stack.push(new NullTreeItem(ins)); } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/PushScopeIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/PushScopeIns.java index 25a35b26c..057843eea 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/PushScopeIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { scopeStack.push(stack.pop()); } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/PushShortIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/PushShortIns.java index e3e75150b..ca5181313 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/PushShortIns.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/PushShortIns.java @@ -41,7 +41,7 @@ public class PushShortIns 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { stack.push(new IntegerValueTreeItem(ins, new Long(ins.operands[0]))); } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/PushStringIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/PushStringIns.java index 2d444b791..1755e1416 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/PushStringIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.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/asdec/abc/avm2/instructions/stack/PushTrueIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/PushTrueIns.java index 00a5089bc..22eaa51aa 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/PushTrueIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { stack.push(new BooleanTreeItem(ins, Boolean.TRUE)); } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/PushUIntIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/PushUIntIns.java index bda044d05..7c7444930 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/PushUIntIns.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/PushUIntIns.java @@ -41,7 +41,7 @@ public class PushUIntIns 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.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/asdec/abc/avm2/instructions/stack/PushUndefinedIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/PushUndefinedIns.java index 696909f7e..1ffc2f15c 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/PushUndefinedIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { stack.push(new UndefinedTreeItem(ins)); } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/PushWithIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/PushWithIns.java index 40a36e63f..3a2d8dd2a 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/PushWithIns.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/PushWithIns.java @@ -35,7 +35,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) { + 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) { TreeItem w = (TreeItem) stack.pop(); scopeStack.push(w); output.add(new WithTreeItem(ins, w)); diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/SwapIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/SwapIns.java index f622062eb..f860e9aaf 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/SwapIns.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/stack/SwapIns.java @@ -43,7 +43,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) { + 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) { TreeItem o1 = stack.pop(); TreeItem o2 = stack.pop(); diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/ApplyTypeIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/ApplyTypeIns.java index 007427adc..ad5ae558b 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/ApplyTypeIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.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/asdec/abc/avm2/instructions/types/AsTypeIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/AsTypeIns.java index bcd97c9a3..0a60557cc 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/AsTypeIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { TreeItem val = (TreeItem) stack.pop(); stack.push(new AsTypeTreeItem(ins, val, new FullMultinameTreeItem(ins, ins.operands[0]))); diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/AsTypeLateIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/AsTypeLateIns.java index 7ea5ccfed..c18b72f53 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/AsTypeLateIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { TreeItem cls = (TreeItem) stack.pop(); TreeItem val = (TreeItem) stack.pop(); stack.push(new AsTypeTreeItem(ins, val, cls)); diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/CoerceAIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/CoerceAIns.java index 45b53fe06..96da8ef6d 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/CoerceAIns.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/CoerceAIns.java @@ -44,8 +44,8 @@ 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { - stack.push(new CoerceTreeItem(ins, (TreeItem) stack.pop(), getTargetType(constants, ins))); + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + stack.push(new CoerceTreeItem(ins, (TreeItem) stack.pop(), getTargetType(constants, ins, fullyQualifiedNames))); } @@ -54,7 +54,7 @@ public class CoerceAIns extends InstructionDefinition implements CoerceOrConvert return -1 + 1; } - public String getTargetType(ConstantPool constants, AVM2Instruction ins) { + public String getTargetType(ConstantPool constants, AVM2Instruction ins, List fullyQualifiedNames) { return "*"; } } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/CoerceIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/CoerceIns.java index f857d4974..c694ad69e 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/CoerceIns.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/CoerceIns.java @@ -42,14 +42,14 @@ 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { int multinameIndex = ins.operands[0]; - stack.push(new CoerceTreeItem(ins, (TreeItem) stack.pop(), constants.constant_multiname[multinameIndex].getName(constants))); + stack.push(new CoerceTreeItem(ins, (TreeItem) stack.pop(), constants.constant_multiname[multinameIndex].getName(constants, fullyQualifiedNames))); } - public String getTargetType(ConstantPool constants, AVM2Instruction ins) { + public String getTargetType(ConstantPool constants, AVM2Instruction ins, List fullyQualifiedNames) { int multinameIndex = ins.operands[0]; - return constants.constant_multiname[multinameIndex].getName(constants); + return constants.constant_multiname[multinameIndex].getName(constants, fullyQualifiedNames); } @Override diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/CoerceOrConvertTypeIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/CoerceOrConvertTypeIns.java index 7d51aedc4..1cb384f47 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/CoerceOrConvertTypeIns.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/CoerceOrConvertTypeIns.java @@ -18,6 +18,7 @@ package com.jpexs.asdec.abc.avm2.instructions.types; import com.jpexs.asdec.abc.avm2.ConstantPool; import com.jpexs.asdec.abc.avm2.instructions.AVM2Instruction; +import java.util.List; /** * @@ -25,5 +26,5 @@ import com.jpexs.asdec.abc.avm2.instructions.AVM2Instruction; */ public interface CoerceOrConvertTypeIns { - public String getTargetType(ConstantPool constants, AVM2Instruction ins); + public String getTargetType(ConstantPool constants, AVM2Instruction ins, List fullyQualifiedNames); } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/CoerceSIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/CoerceSIns.java index ab6efbdad..2bcfc9957 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/CoerceSIns.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/CoerceSIns.java @@ -41,8 +41,8 @@ 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { - stack.push(new CoerceTreeItem(ins, (TreeItem) stack.pop(), getTargetType(constants, ins))); + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + stack.push(new CoerceTreeItem(ins, (TreeItem) stack.pop(), getTargetType(constants, ins, fullyQualifiedNames))); } @Override @@ -50,7 +50,7 @@ public class CoerceSIns extends InstructionDefinition implements CoerceOrConvert return -1 + 1; } - public String getTargetType(ConstantPool constants, AVM2Instruction ins) { + public String getTargetType(ConstantPool constants, AVM2Instruction ins, List fullyQualifiedNames) { return "String"; } } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/ConvertBIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/ConvertBIns.java index d2afc3af1..fa997d3dc 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/ConvertBIns.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/ConvertBIns.java @@ -51,8 +51,8 @@ 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { - stack.push(new ConvertTreeItem(ins, (TreeItem) stack.pop(), getTargetType(constants, ins))); + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + stack.push(new ConvertTreeItem(ins, (TreeItem) stack.pop(), getTargetType(constants, ins, fullyQualifiedNames))); } @Override @@ -60,7 +60,7 @@ public class ConvertBIns extends InstructionDefinition implements CoerceOrConver return -1 + 1; } - public String getTargetType(ConstantPool constants, AVM2Instruction ins) { + public String getTargetType(ConstantPool constants, AVM2Instruction ins, List fullyQualifiedNames) { return "Boolean"; } } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/ConvertDIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/ConvertDIns.java index 0dd510a77..076a95ca6 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/ConvertDIns.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/ConvertDIns.java @@ -59,8 +59,8 @@ 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { - stack.push(new ConvertTreeItem(ins, (TreeItem) stack.pop(), getTargetType(constants, ins))); + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + stack.push(new ConvertTreeItem(ins, (TreeItem) stack.pop(), getTargetType(constants, ins, fullyQualifiedNames))); } @Override @@ -68,7 +68,7 @@ public class ConvertDIns extends InstructionDefinition implements CoerceOrConver return -1 + 1; } - public String getTargetType(ConstantPool constants, AVM2Instruction ins) { + public String getTargetType(ConstantPool constants, AVM2Instruction ins, List fullyQualifiedNames) { return "Number"; } } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/ConvertIIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/ConvertIIns.java index 25df936f3..0fd2490fe 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/ConvertIIns.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/ConvertIIns.java @@ -57,8 +57,8 @@ 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { - stack.push(new ConvertTreeItem(ins, (TreeItem) stack.pop(), getTargetType(constants, ins))); + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + stack.push(new ConvertTreeItem(ins, (TreeItem) stack.pop(), getTargetType(constants, ins, fullyQualifiedNames))); } @Override @@ -66,7 +66,7 @@ public class ConvertIIns extends InstructionDefinition implements CoerceOrConver return -1 + 1; } - public String getTargetType(ConstantPool constants, AVM2Instruction ins) { + public String getTargetType(ConstantPool constants, AVM2Instruction ins, List fullyQualifiedNames) { return "int"; } } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/ConvertOIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/ConvertOIns.java index 2500c8ee0..8aaa036ea 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/ConvertOIns.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/ConvertOIns.java @@ -40,8 +40,8 @@ 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { - stack.push(new ConvertTreeItem(ins, (TreeItem) stack.pop(), getTargetType(constants, ins))); + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + stack.push(new ConvertTreeItem(ins, (TreeItem) stack.pop(), getTargetType(constants, ins, fullyQualifiedNames))); } @Override @@ -49,7 +49,7 @@ public class ConvertOIns extends InstructionDefinition implements CoerceOrConver return -1 + 1; } - public String getTargetType(ConstantPool constants, AVM2Instruction ins) { + public String getTargetType(ConstantPool constants, AVM2Instruction ins, List fullyQualifiedNames) { return "Object"; } } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/ConvertSIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/ConvertSIns.java index 9e41894bb..b92c70c45 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/ConvertSIns.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/ConvertSIns.java @@ -41,8 +41,8 @@ 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { - stack.push(new ConvertTreeItem(ins, (TreeItem) stack.pop(), getTargetType(constants, ins))); + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + stack.push(new ConvertTreeItem(ins, (TreeItem) stack.pop(), getTargetType(constants, ins, fullyQualifiedNames))); } @Override @@ -50,7 +50,7 @@ public class ConvertSIns extends InstructionDefinition implements CoerceOrConver return -1 + 1; } - public String getTargetType(ConstantPool constants, AVM2Instruction ins) { + public String getTargetType(ConstantPool constants, AVM2Instruction ins, List fullyQualifiedNames) { return "String"; } } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/ConvertUIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/ConvertUIns.java index 492e4129f..5e5ae0378 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/ConvertUIns.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/ConvertUIns.java @@ -40,8 +40,8 @@ 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { - stack.push(new ConvertTreeItem(ins, (TreeItem) stack.pop(), getTargetType(constants, ins))); + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + stack.push(new ConvertTreeItem(ins, (TreeItem) stack.pop(), getTargetType(constants, ins, fullyQualifiedNames))); } @Override @@ -49,7 +49,7 @@ public class ConvertUIns extends InstructionDefinition implements CoerceOrConver return -1 + 1; } - public String getTargetType(ConstantPool constants, AVM2Instruction ins) { + public String getTargetType(ConstantPool constants, AVM2Instruction ins, List fullyQualifiedNames) { return "uint"; } } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/InstanceOfIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/InstanceOfIns.java index 86d8f68de..6d578d683 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/InstanceOfIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { TreeItem type = (TreeItem) stack.pop(); TreeItem value = (TreeItem) stack.pop(); stack.push(new InstanceOfTreeItem(ins, value, type)); diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/IsTypeIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/IsTypeIns.java index e39cfb745..4c806d56a 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/IsTypeIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { int multinameIndex = ins.operands[0]; TreeItem value = (TreeItem) stack.pop(); stack.push(new IsTypeTreeItem(ins, value, new FullMultinameTreeItem(ins, multinameIndex))); diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/IsTypeLateIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/IsTypeLateIns.java index 5c921892e..c6e7570a9 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/IsTypeLateIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { TreeItem type = (TreeItem) stack.pop(); TreeItem value = (TreeItem) stack.pop(); stack.push(new IsTypeTreeItem(ins, value, type)); diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/TypeOfIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/TypeOfIns.java index 9b7529d4c..b85252aad 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/types/TypeOfIns.java +++ b/trunk/src/com/jpexs/asdec/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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { stack.push(new TypeOfTreeItem(ins, (TreeItem) stack.pop())); } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/xml/CheckFilterIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/xml/CheckFilterIns.java index 907746014..157ee45ca 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/xml/CheckFilterIns.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/xml/CheckFilterIns.java @@ -39,7 +39,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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { } @Override diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/xml/DXNSLateIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/xml/DXNSLateIns.java index 34cb11b5e..774a0f56c 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/xml/DXNSLateIns.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/xml/DXNSLateIns.java @@ -41,9 +41,9 @@ 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { TreeItem xmlns = stack.pop(); - stack.push(new UnparsedTreeItem(ins, "XMLNS:" + xmlns.toString(constants, localRegNames))); + stack.push(new UnparsedTreeItem(ins, "XMLNS:" + xmlns.toString(constants, localRegNames, fullyQualifiedNames))); } @Override diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/xml/EscXAttrIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/xml/EscXAttrIns.java index 48d51481f..b51136ca3 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/xml/EscXAttrIns.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/xml/EscXAttrIns.java @@ -42,8 +42,8 @@ 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { - stack.push(new UnparsedTreeItem(ins, "esc_xattr(" + stack.pop().toString(constants, localRegNames) + ")")); + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + stack.push(new UnparsedTreeItem(ins, "esc_xattr(" + stack.pop().toString(constants, localRegNames, fullyQualifiedNames) + ")")); } @Override diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/xml/EscXElemIns.java b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/xml/EscXElemIns.java index daf739f0b..fa5b0575c 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/instructions/xml/EscXElemIns.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/instructions/xml/EscXElemIns.java @@ -42,8 +42,8 @@ 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames) { - stack.push(new UnparsedTreeItem(ins, "esc_xelem(" + stack.pop().toString(constants, localRegNames) + ")")); + 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.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap localRegNames, List fullyQualifiedNames) { + stack.push(new UnparsedTreeItem(ins, "esc_xelem(" + stack.pop().toString(constants, localRegNames, fullyQualifiedNames) + ")")); } @Override diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/ApplyTypeTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/ApplyTypeTreeItem.java index 97f25a049..7e2c35531 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/ApplyTypeTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/ApplyTypeTreeItem.java @@ -33,15 +33,15 @@ public class ApplyTypeTreeItem extends TreeItem { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { - String ret = object.toString(constants, localRegNames); + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { + String ret = object.toString(constants, localRegNames, fullyQualifiedNames); if (!params.isEmpty()) { ret += hilight(".<"); for (int i = 0; i < params.size(); i++) { if (i > 0) { ret += hilight(","); } - ret += params.get(i).toString(constants, localRegNames); + ret += params.get(i).toString(constants, localRegNames, fullyQualifiedNames); } ret += hilight(">"); } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/BooleanTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/BooleanTreeItem.java index 17bc46119..96aa17fd5 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/BooleanTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/BooleanTreeItem.java @@ -19,6 +19,7 @@ package com.jpexs.asdec.abc.avm2.treemodel; import com.jpexs.asdec.abc.avm2.ConstantPool; import com.jpexs.asdec.abc.avm2.instructions.AVM2Instruction; import java.util.HashMap; +import java.util.List; public class BooleanTreeItem extends TreeItem { @@ -30,7 +31,7 @@ public class BooleanTreeItem extends TreeItem { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { return value.toString(); } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/BreakTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/BreakTreeItem.java index 581660796..fe6915f5a 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/BreakTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/BreakTreeItem.java @@ -19,6 +19,7 @@ package com.jpexs.asdec.abc.avm2.treemodel; import com.jpexs.asdec.abc.avm2.ConstantPool; import com.jpexs.asdec.abc.avm2.instructions.AVM2Instruction; import java.util.HashMap; +import java.util.List; public class BreakTreeItem extends TreeItem { @@ -36,7 +37,7 @@ public class BreakTreeItem extends TreeItem { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { return hilight("break") + " loop" + loopPos; } } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/CallMethodTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/CallMethodTreeItem.java index a162c6ea3..853166525 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/CallMethodTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/CallMethodTreeItem.java @@ -35,14 +35,14 @@ public class CallMethodTreeItem extends TreeItem { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { String args = ""; for (int a = 0; a < arguments.size(); a++) { if (a > 0) { args = args + ","; } - args = args + arguments.get(a).toString(constants, localRegNames); + args = args + arguments.get(a).toString(constants, localRegNames, fullyQualifiedNames); } - return receiver.toString(constants, localRegNames) + hilight(".") + methodName + hilight("(") + args + hilight(")"); + return receiver.toString(constants, localRegNames, fullyQualifiedNames) + hilight(".") + methodName + hilight("(") + args + hilight(")"); } } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/CallPropertyTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/CallPropertyTreeItem.java index a187ccc95..87a44c2a1 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/CallPropertyTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/CallPropertyTreeItem.java @@ -37,14 +37,14 @@ public class CallPropertyTreeItem extends TreeItem { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { String args = ""; for (int a = 0; a < arguments.size(); a++) { if (a > 0) { args = args + hilight(","); } - args = args + arguments.get(a).toString(constants, localRegNames); + args = args + arguments.get(a).toString(constants, localRegNames, fullyQualifiedNames); } - return formatProperty(constants, receiver, propertyName, localRegNames) + hilight("(") + args + hilight(")"); + return formatProperty(constants, receiver, propertyName, localRegNames, fullyQualifiedNames) + hilight("(") + args + hilight(")"); } } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/CallStaticTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/CallStaticTreeItem.java index af08638c0..db896ed50 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/CallStaticTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/CallStaticTreeItem.java @@ -35,14 +35,14 @@ public class CallStaticTreeItem extends TreeItem { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { String args = ""; for (int a = 0; a < arguments.size(); a++) { if (a > 0) { args = args + ","; } - args = args + arguments.get(a).toString(constants, localRegNames); + args = args + arguments.get(a).toString(constants, localRegNames, fullyQualifiedNames); } - return receiver.toString(constants, localRegNames) + hilight(".") + methodName + hilight("(") + args + hilight(")"); + return receiver.toString(constants, localRegNames, fullyQualifiedNames) + hilight(".") + methodName + hilight("(") + args + hilight(")"); } } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/CallSuperTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/CallSuperTreeItem.java index 54849a095..d7f91a388 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/CallSuperTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/CallSuperTreeItem.java @@ -38,18 +38,18 @@ public class CallSuperTreeItem extends TreeItem { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { String args = ""; for (int a = 0; a < arguments.size(); a++) { if (a > 0) { args = args + ","; } - args = args + arguments.get(a).toString(constants, localRegNames); + args = args + arguments.get(a).toString(constants, localRegNames, fullyQualifiedNames); } - String calee = receiver.toString(constants, localRegNames) + "."; + String calee = receiver.toString(constants, localRegNames, fullyQualifiedNames) + "."; if (Highlighting.stripHilights(calee).equals("this.")) { calee = ""; } - return calee + hilight("super.") + multiname.toString(constants, localRegNames) + hilight("(") + args + hilight(")"); + return calee + hilight("super.") + multiname.toString(constants, localRegNames, fullyQualifiedNames) + hilight("(") + args + hilight(")"); } } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/CallTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/CallTreeItem.java index 53b659ad1..7a5f7afa2 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/CallTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/CallTreeItem.java @@ -35,13 +35,13 @@ public class CallTreeItem extends TreeItem { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { String args = ""; for (int a = 0; a < arguments.size(); a++) { if (a > 0) { args = args + ","; } - args = args + arguments.get(a).toString(constants, localRegNames); + args = args + arguments.get(a).toString(constants, localRegNames, fullyQualifiedNames); } /*String recPart = ""; receiver.toString(constants, localRegNames) + hilight("."); if (receiver instanceof NewActivationTreeItem) { @@ -50,6 +50,6 @@ public class CallTreeItem extends TreeItem { if (receiver instanceof ThisTreeItem) { recPart = ""; }*/ - return function.toString(constants, localRegNames) + hilight("(") + args + hilight(")"); + return function.toString(constants, localRegNames, fullyQualifiedNames) + hilight("(") + args + hilight(")"); } } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/ClassTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/ClassTreeItem.java index 35943554f..631a29432 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/ClassTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/ClassTreeItem.java @@ -19,6 +19,7 @@ package com.jpexs.asdec.abc.avm2.treemodel; import com.jpexs.asdec.abc.avm2.ConstantPool; import com.jpexs.asdec.abc.types.Multiname; import java.util.HashMap; +import java.util.List; public class ClassTreeItem extends TreeItem { @@ -30,7 +31,7 @@ public class ClassTreeItem extends TreeItem { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { - return className.getName(constants); + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { + return className.getName(constants, fullyQualifiedNames); } } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/CoerceTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/CoerceTreeItem.java index 232af7e42..d04a2686b 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/CoerceTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/CoerceTreeItem.java @@ -19,6 +19,7 @@ package com.jpexs.asdec.abc.avm2.treemodel; import com.jpexs.asdec.abc.avm2.ConstantPool; import com.jpexs.asdec.abc.avm2.instructions.AVM2Instruction; import java.util.HashMap; +import java.util.List; public class CoerceTreeItem extends TreeItem { @@ -32,9 +33,9 @@ public class CoerceTreeItem extends TreeItem { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { //return hilight("("+type+")")+ - return value.toString(constants, localRegNames); + return value.toString(constants, localRegNames, fullyQualifiedNames); } @Override diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/ConstructPropTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/ConstructPropTreeItem.java index a12d87a85..eb504fc1b 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/ConstructPropTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/ConstructPropTreeItem.java @@ -35,19 +35,19 @@ public class ConstructPropTreeItem extends TreeItem { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { String argStr = ""; for (int a = 0; a < args.size(); a++) { if (a > 0) { argStr = argStr + ","; } - argStr = argStr + args.get(a).toString(constants, localRegNames); + argStr = argStr + args.get(a).toString(constants, localRegNames, fullyQualifiedNames); } - String objstr = object.toString(constants, localRegNames); + String objstr = object.toString(constants, localRegNames, fullyQualifiedNames); if (!objstr.equals("")) { objstr += "."; } - return hilight("new ") + objstr + propertyName.toString(constants, localRegNames) + hilight("(") + argStr + hilight(")"); + return hilight("new ") + objstr + propertyName.toString(constants, localRegNames, fullyQualifiedNames) + hilight("(") + argStr + hilight(")"); } } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/ConstructSuperTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/ConstructSuperTreeItem.java index 99a81df9e..5c627d009 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/ConstructSuperTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/ConstructSuperTreeItem.java @@ -34,15 +34,15 @@ public class ConstructSuperTreeItem extends TreeItem { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { String argStr = ""; for (int a = 0; a < args.size(); a++) { if (a > 0) { argStr = argStr + ","; } - argStr = argStr + args.get(a).toString(constants, localRegNames); + argStr = argStr + args.get(a).toString(constants, localRegNames, fullyQualifiedNames); } - String calee = object.toString(constants, localRegNames) + "."; + String calee = object.toString(constants, localRegNames, fullyQualifiedNames) + "."; if (Highlighting.stripHilights(calee).equals("this.")) { calee = ""; } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/ConstructTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/ConstructTreeItem.java index 4ac1f7613..65ccff120 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/ConstructTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/ConstructTreeItem.java @@ -33,18 +33,18 @@ public class ConstructTreeItem extends TreeItem { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { String argStr = ""; for (int a = 0; a < args.size(); a++) { if (a > 0) { argStr = argStr + ","; } - argStr = argStr + args.get(a).toString(constants, localRegNames); + argStr = argStr + args.get(a).toString(constants, localRegNames, fullyQualifiedNames); } if (object instanceof NewFunctionTreeItem) { - return object.toString(constants, localRegNames); + return object.toString(constants, localRegNames, fullyQualifiedNames); } - return hilight("new ") + object.toString(constants, localRegNames) + hilight("(") + argStr + hilight(")"); + return hilight("new ") + object.toString(constants, localRegNames, fullyQualifiedNames) + hilight("(") + argStr + hilight(")"); } } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/ContinueTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/ContinueTreeItem.java index 309ed7916..7315050e4 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/ContinueTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/ContinueTreeItem.java @@ -19,6 +19,7 @@ package com.jpexs.asdec.abc.avm2.treemodel; import com.jpexs.asdec.abc.avm2.ConstantPool; import com.jpexs.asdec.abc.avm2.instructions.AVM2Instruction; import java.util.HashMap; +import java.util.List; public class ContinueTreeItem extends TreeItem { @@ -36,7 +37,7 @@ public class ContinueTreeItem extends TreeItem { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { return hilight("continue") + " " + (isKnown ? "loop" : "unk") + loopPos; } } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/ConvertTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/ConvertTreeItem.java index e39ff6485..160895b06 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/ConvertTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/ConvertTreeItem.java @@ -19,6 +19,7 @@ package com.jpexs.asdec.abc.avm2.treemodel; import com.jpexs.asdec.abc.avm2.ConstantPool; import com.jpexs.asdec.abc.avm2.instructions.AVM2Instruction; import java.util.HashMap; +import java.util.List; public class ConvertTreeItem extends TreeItem { @@ -32,9 +33,9 @@ public class ConvertTreeItem extends TreeItem { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { //return hilight("("+type+")")+ - return value.toString(constants, localRegNames); + return value.toString(constants, localRegNames, fullyQualifiedNames); } @Override diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/DecLocalTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/DecLocalTreeItem.java index 67d405be1..6fc52a3df 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/DecLocalTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/DecLocalTreeItem.java @@ -19,6 +19,7 @@ package com.jpexs.asdec.abc.avm2.treemodel; import com.jpexs.asdec.abc.avm2.ConstantPool; import com.jpexs.asdec.abc.avm2.instructions.AVM2Instruction; import java.util.HashMap; +import java.util.List; public class DecLocalTreeItem extends TreeItem { @@ -30,7 +31,7 @@ public class DecLocalTreeItem extends TreeItem { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { return localRegName(localRegNames, regIndex) + hilight("--"); } } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/DecrementTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/DecrementTreeItem.java index d9e4827d2..d85c5bfbf 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/DecrementTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/DecrementTreeItem.java @@ -19,6 +19,7 @@ package com.jpexs.asdec.abc.avm2.treemodel; import com.jpexs.asdec.abc.avm2.ConstantPool; import com.jpexs.asdec.abc.avm2.instructions.AVM2Instruction; import java.util.HashMap; +import java.util.List; public class DecrementTreeItem extends TreeItem { @@ -30,7 +31,7 @@ public class DecrementTreeItem extends TreeItem { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { - return object.toString(constants, localRegNames) + hilight("-1"); + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { + return object.toString(constants, localRegNames, fullyQualifiedNames) + hilight("-1"); } } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/FindPropertyTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/FindPropertyTreeItem.java index 0b5bdc8e8..47c2723e7 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/FindPropertyTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/FindPropertyTreeItem.java @@ -19,6 +19,7 @@ package com.jpexs.asdec.abc.avm2.treemodel; import com.jpexs.asdec.abc.avm2.ConstantPool; import com.jpexs.asdec.abc.avm2.instructions.AVM2Instruction; import java.util.HashMap; +import java.util.List; public class FindPropertyTreeItem extends TreeItem { @@ -30,7 +31,7 @@ public class FindPropertyTreeItem extends TreeItem { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { return ""; } } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/FloatValueTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/FloatValueTreeItem.java index 527afec31..b490f40fe 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/FloatValueTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/FloatValueTreeItem.java @@ -19,6 +19,7 @@ package com.jpexs.asdec.abc.avm2.treemodel; import com.jpexs.asdec.abc.avm2.ConstantPool; import com.jpexs.asdec.abc.avm2.instructions.AVM2Instruction; import java.util.HashMap; +import java.util.List; public class FloatValueTreeItem extends NumberValueTreeItem { @@ -30,7 +31,7 @@ public class FloatValueTreeItem extends NumberValueTreeItem { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { return hilight("" + value); } } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/FullMultinameTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/FullMultinameTreeItem.java index 89deb9da1..45a175cf6 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/FullMultinameTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/FullMultinameTreeItem.java @@ -19,6 +19,7 @@ package com.jpexs.asdec.abc.avm2.treemodel; import com.jpexs.asdec.abc.avm2.ConstantPool; import com.jpexs.asdec.abc.avm2.instructions.AVM2Instruction; import java.util.HashMap; +import java.util.List; public class FullMultinameTreeItem extends TreeItem { @@ -52,15 +53,15 @@ public class FullMultinameTreeItem extends TreeItem { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { String ret = ""; if (name != null) { - ret = "[" + name.toString(constants, localRegNames) + "]"; + ret = "[" + name.toString(constants, localRegNames, fullyQualifiedNames) + "]"; } else { - ret = hilight(constants.constant_multiname[multinameIndex].getName(constants)); + ret = hilight(constants.constant_multiname[multinameIndex].getName(constants, fullyQualifiedNames)); } if (namespace != null) { - ret = namespace.toString(constants, localRegNames) + "::" + ret; + ret = namespace.toString(constants, localRegNames, fullyQualifiedNames) + "::" + ret; } else { /*Namespace ns = constants.constant_multiname[multinameIndex].getNamespace(constants); if ((ns != null)&&(ns.name_index!=0)) { diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/GetDescendantsTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/GetDescendantsTreeItem.java index b68c755aa..73e9636b5 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/GetDescendantsTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/GetDescendantsTreeItem.java @@ -19,6 +19,7 @@ package com.jpexs.asdec.abc.avm2.treemodel; import com.jpexs.asdec.abc.avm2.ConstantPool; import com.jpexs.asdec.abc.avm2.instructions.AVM2Instruction; import java.util.HashMap; +import java.util.List; public class GetDescendantsTreeItem extends TreeItem { @@ -32,7 +33,7 @@ public class GetDescendantsTreeItem extends TreeItem { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { - return object.toString(constants, localRegNames) + hilight("..") + multiname.toString(constants, localRegNames); + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { + return object.toString(constants, localRegNames, fullyQualifiedNames) + hilight("..") + multiname.toString(constants, localRegNames, fullyQualifiedNames); } } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/GetLexTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/GetLexTreeItem.java index c22f42f01..069959cf7 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/GetLexTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/GetLexTreeItem.java @@ -20,6 +20,7 @@ import com.jpexs.asdec.abc.avm2.ConstantPool; import com.jpexs.asdec.abc.avm2.instructions.AVM2Instruction; import com.jpexs.asdec.abc.types.Multiname; import java.util.HashMap; +import java.util.List; public class GetLexTreeItem extends TreeItem { @@ -31,7 +32,7 @@ public class GetLexTreeItem extends TreeItem { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { - return hilight(propertyName.getName(constants)); + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { + return hilight(propertyName.getName(constants, fullyQualifiedNames)); } } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/GetPropertyTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/GetPropertyTreeItem.java index cf24fa1fa..9dc7e13f3 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/GetPropertyTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/GetPropertyTreeItem.java @@ -19,6 +19,7 @@ package com.jpexs.asdec.abc.avm2.treemodel; import com.jpexs.asdec.abc.avm2.ConstantPool; import com.jpexs.asdec.abc.avm2.instructions.AVM2Instruction; import java.util.HashMap; +import java.util.List; public class GetPropertyTreeItem extends TreeItem { @@ -32,7 +33,7 @@ public class GetPropertyTreeItem extends TreeItem { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { - return formatProperty(constants, object, propertyName, localRegNames); + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { + return formatProperty(constants, object, propertyName, localRegNames, fullyQualifiedNames); } } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/GetSlotTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/GetSlotTreeItem.java index 559825ad3..b465ef4cd 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/GetSlotTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/GetSlotTreeItem.java @@ -20,6 +20,7 @@ import com.jpexs.asdec.abc.avm2.ConstantPool; import com.jpexs.asdec.abc.avm2.instructions.AVM2Instruction; import com.jpexs.asdec.abc.types.Multiname; import java.util.HashMap; +import java.util.List; public class GetSlotTreeItem extends TreeItem { @@ -33,8 +34,8 @@ public class GetSlotTreeItem extends TreeItem { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { //scope.toString(constants)+"." - return hilight(slotName.getName(constants)); + return hilight(slotName.getName(constants, fullyQualifiedNames)); } } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/GetSuperTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/GetSuperTreeItem.java index a7f0efd32..27b6d2012 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/GetSuperTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/GetSuperTreeItem.java @@ -20,6 +20,7 @@ import com.jpexs.asdec.abc.avm2.ConstantPool; import com.jpexs.asdec.abc.avm2.instructions.AVM2Instruction; import com.jpexs.asdec.helpers.Highlighting; import java.util.HashMap; +import java.util.List; public class GetSuperTreeItem extends TreeItem { @@ -33,11 +34,11 @@ public class GetSuperTreeItem extends TreeItem { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { - String calee = object.toString(constants, localRegNames) + "."; + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { + String calee = object.toString(constants, localRegNames, fullyQualifiedNames) + "."; if (Highlighting.stripHilights(calee).equals("this.")) { calee = ""; } - return calee + hilight("super.") + propertyName.toString(constants, localRegNames); + return calee + hilight("super.") + propertyName.toString(constants, localRegNames, fullyQualifiedNames); } } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/InTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/InTreeItem.java index a02537d94..7718724f3 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/InTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/InTreeItem.java @@ -19,6 +19,7 @@ package com.jpexs.asdec.abc.avm2.treemodel; import com.jpexs.asdec.abc.avm2.ConstantPool; import com.jpexs.asdec.abc.avm2.instructions.AVM2Instruction; import java.util.HashMap; +import java.util.List; public class InTreeItem extends TreeItem { @@ -32,7 +33,7 @@ public class InTreeItem extends TreeItem { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { - return object.toString(constants, localRegNames) + hilight(" in ") + collection.toString(constants, localRegNames); + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { + return object.toString(constants, localRegNames, fullyQualifiedNames) + hilight(" in ") + collection.toString(constants, localRegNames, fullyQualifiedNames); } } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/IncLocalTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/IncLocalTreeItem.java index 30cff7c32..afcc3abc3 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/IncLocalTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/IncLocalTreeItem.java @@ -19,6 +19,7 @@ package com.jpexs.asdec.abc.avm2.treemodel; import com.jpexs.asdec.abc.avm2.ConstantPool; import com.jpexs.asdec.abc.avm2.instructions.AVM2Instruction; import java.util.HashMap; +import java.util.List; public class IncLocalTreeItem extends TreeItem { @@ -30,7 +31,7 @@ public class IncLocalTreeItem extends TreeItem { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { return localRegName(localRegNames, regIndex) + hilight("++"); } } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/IncrementTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/IncrementTreeItem.java index 34ff7732e..d7f135a48 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/IncrementTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/IncrementTreeItem.java @@ -19,6 +19,7 @@ package com.jpexs.asdec.abc.avm2.treemodel; import com.jpexs.asdec.abc.avm2.ConstantPool; import com.jpexs.asdec.abc.avm2.instructions.AVM2Instruction; import java.util.HashMap; +import java.util.List; public class IncrementTreeItem extends TreeItem { @@ -30,7 +31,7 @@ public class IncrementTreeItem extends TreeItem { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { - return object.toString(constants, localRegNames) + hilight("+1"); + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { + return object.toString(constants, localRegNames, fullyQualifiedNames) + hilight("+1"); } } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/InitPropertyTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/InitPropertyTreeItem.java index 60bb6eba6..866ee4de6 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/InitPropertyTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/InitPropertyTreeItem.java @@ -20,6 +20,7 @@ import com.jpexs.asdec.abc.avm2.ConstantPool; import com.jpexs.asdec.abc.avm2.instructions.AVM2Instruction; import com.jpexs.asdec.abc.avm2.treemodel.clauses.AssignmentTreeItem; import java.util.HashMap; +import java.util.List; public class InitPropertyTreeItem extends TreeItem implements SetTypeTreeItem, AssignmentTreeItem { @@ -35,8 +36,8 @@ public class InitPropertyTreeItem extends TreeItem implements SetTypeTreeItem, A } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { - return formatProperty(constants, object, propertyName, localRegNames) + hilight("=") + value.toString(constants, localRegNames); + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { + return formatProperty(constants, object, propertyName, localRegNames, fullyQualifiedNames) + hilight("=") + value.toString(constants, localRegNames, fullyQualifiedNames); } public TreeItem getObject() { diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/IntegerValueTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/IntegerValueTreeItem.java index 2fff76875..756a33588 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/IntegerValueTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/IntegerValueTreeItem.java @@ -19,6 +19,7 @@ package com.jpexs.asdec.abc.avm2.treemodel; import com.jpexs.asdec.abc.avm2.ConstantPool; import com.jpexs.asdec.abc.avm2.instructions.AVM2Instruction; import java.util.HashMap; +import java.util.List; public class IntegerValueTreeItem extends NumberValueTreeItem { @@ -30,7 +31,7 @@ public class IntegerValueTreeItem extends NumberValueTreeItem { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { return hilight("" + value); } } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/LocalRegTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/LocalRegTreeItem.java index e15e22c0b..643802baf 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/LocalRegTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/LocalRegTreeItem.java @@ -19,6 +19,7 @@ package com.jpexs.asdec.abc.avm2.treemodel; import com.jpexs.asdec.abc.avm2.ConstantPool; import com.jpexs.asdec.abc.avm2.instructions.AVM2Instruction; import java.util.HashMap; +import java.util.List; public class LocalRegTreeItem extends TreeItem { @@ -35,7 +36,7 @@ public class LocalRegTreeItem extends TreeItem { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { return hilight(localRegName(localRegNames, regIndex)); } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/NameSpaceTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/NameSpaceTreeItem.java index b6d468f29..6201b2d58 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/NameSpaceTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/NameSpaceTreeItem.java @@ -19,6 +19,7 @@ package com.jpexs.asdec.abc.avm2.treemodel; import com.jpexs.asdec.abc.avm2.ConstantPool; import com.jpexs.asdec.abc.avm2.instructions.AVM2Instruction; import java.util.HashMap; +import java.util.List; public class NameSpaceTreeItem extends TreeItem { @@ -29,7 +30,7 @@ public class NameSpaceTreeItem extends TreeItem { this.namespaceIndex = namespaceIndex; } - public String toString(ConstantPool constants, HashMap localRegNames) { + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { if (namespaceIndex == 0) { return "*"; } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/NameValuePair.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/NameValuePair.java index 7e5bd14e3..dc663a8c9 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/NameValuePair.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/NameValuePair.java @@ -18,6 +18,7 @@ package com.jpexs.asdec.abc.avm2.treemodel; import com.jpexs.asdec.abc.avm2.ConstantPool; import java.util.HashMap; +import java.util.List; public class NameValuePair extends TreeItem { @@ -31,10 +32,10 @@ public class NameValuePair extends TreeItem { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { if (name instanceof StringTreeItem) { - return ((StringTreeItem) name).value + ":" + value.toString(constants, localRegNames); + return ((StringTreeItem) name).value + ":" + value.toString(constants, localRegNames, fullyQualifiedNames); } - return name.toString(constants, localRegNames) + ":" + value.toString(constants, localRegNames); + return name.toString(constants, localRegNames, fullyQualifiedNames) + ":" + value.toString(constants, localRegNames, fullyQualifiedNames); } } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/NanTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/NanTreeItem.java index 096b7e4a8..a7151b72f 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/NanTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/NanTreeItem.java @@ -19,6 +19,7 @@ package com.jpexs.asdec.abc.avm2.treemodel; import com.jpexs.asdec.abc.avm2.ConstantPool; import com.jpexs.asdec.abc.avm2.instructions.AVM2Instruction; import java.util.HashMap; +import java.util.List; public class NanTreeItem extends TreeItem { @@ -27,7 +28,7 @@ public class NanTreeItem extends TreeItem { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { return hilight("NaN"); } } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/NewActivationTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/NewActivationTreeItem.java index 455eca9df..27fa96b48 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/NewActivationTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/NewActivationTreeItem.java @@ -19,6 +19,7 @@ package com.jpexs.asdec.abc.avm2.treemodel; import com.jpexs.asdec.abc.avm2.ConstantPool; import com.jpexs.asdec.abc.avm2.instructions.AVM2Instruction; import java.util.HashMap; +import java.util.List; public class NewActivationTreeItem extends TreeItem { @@ -27,7 +28,7 @@ public class NewActivationTreeItem extends TreeItem { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { return hilight("newactivation()"); } } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/NewArrayTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/NewArrayTreeItem.java index 571967522..53f1f56b8 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/NewArrayTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/NewArrayTreeItem.java @@ -31,13 +31,13 @@ public class NewArrayTreeItem extends TreeItem { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { String args = ""; for (int a = 0; a < values.size(); a++) { if (a > 0) { args = args + ","; } - args = args + values.get(a).toString(constants, localRegNames); + args = args + values.get(a).toString(constants, localRegNames, fullyQualifiedNames); } return hilight("[") + args + hilight("]"); } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/NewFunctionTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/NewFunctionTreeItem.java index ed3b3d406..5aa6e5b52 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/NewFunctionTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/NewFunctionTreeItem.java @@ -19,6 +19,7 @@ package com.jpexs.asdec.abc.avm2.treemodel; import com.jpexs.asdec.abc.avm2.ConstantPool; import com.jpexs.asdec.abc.avm2.instructions.AVM2Instruction; import java.util.HashMap; +import java.util.List; public class NewFunctionTreeItem extends TreeItem { @@ -34,7 +35,7 @@ public class NewFunctionTreeItem extends TreeItem { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { return hilight("new function(" + paramStr + "):" + returnStr + "\r\n{\r\n") + functionBody + "\r\n" + hilight("}"); } } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/NewObjectTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/NewObjectTreeItem.java index e5d712597..8587ea6c7 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/NewObjectTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/NewObjectTreeItem.java @@ -31,13 +31,13 @@ public class NewObjectTreeItem extends TreeItem { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { String params = ""; for (int n = 0; n < pairs.size(); n++) { if (n > 0) { params += ",\r\n"; } - params += pairs.get(n).toString(constants, localRegNames); + params += pairs.get(n).toString(constants, localRegNames, fullyQualifiedNames); } return hilight("{") + params + hilight("}"); } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/NullTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/NullTreeItem.java index de8081f40..e0c406acb 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/NullTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/NullTreeItem.java @@ -19,6 +19,7 @@ package com.jpexs.asdec.abc.avm2.treemodel; import com.jpexs.asdec.abc.avm2.ConstantPool; import com.jpexs.asdec.abc.avm2.instructions.AVM2Instruction; import java.util.HashMap; +import java.util.List; public class NullTreeItem extends TreeItem { @@ -27,7 +28,7 @@ public class NullTreeItem extends TreeItem { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { return hilight("null"); } } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/PostDecrementTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/PostDecrementTreeItem.java index b80d4fe41..7a523d788 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/PostDecrementTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/PostDecrementTreeItem.java @@ -20,6 +20,7 @@ import com.jpexs.asdec.abc.avm2.ConstantPool; import com.jpexs.asdec.abc.avm2.instructions.AVM2Instruction; import com.jpexs.asdec.abc.avm2.treemodel.clauses.AssignmentTreeItem; import java.util.HashMap; +import java.util.List; public class PostDecrementTreeItem extends TreeItem implements AssignmentTreeItem { @@ -31,7 +32,7 @@ public class PostDecrementTreeItem extends TreeItem implements AssignmentTreeIte } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { - return object.toString(constants, localRegNames) + hilight("--"); + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { + return object.toString(constants, localRegNames, fullyQualifiedNames) + hilight("--"); } } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/PostIncrementTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/PostIncrementTreeItem.java index 821cb6c31..1ee7cc03d 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/PostIncrementTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/PostIncrementTreeItem.java @@ -20,6 +20,7 @@ import com.jpexs.asdec.abc.avm2.ConstantPool; import com.jpexs.asdec.abc.avm2.instructions.AVM2Instruction; import com.jpexs.asdec.abc.avm2.treemodel.clauses.AssignmentTreeItem; import java.util.HashMap; +import java.util.List; public class PostIncrementTreeItem extends TreeItem implements AssignmentTreeItem { @@ -31,7 +32,7 @@ public class PostIncrementTreeItem extends TreeItem implements AssignmentTreeIte } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { - return object.toString(constants, localRegNames) + hilight("++"); + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { + return object.toString(constants, localRegNames, fullyQualifiedNames) + hilight("++"); } } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/ReturnValueTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/ReturnValueTreeItem.java index 6bbb0b425..6989eeb30 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/ReturnValueTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/ReturnValueTreeItem.java @@ -19,6 +19,7 @@ package com.jpexs.asdec.abc.avm2.treemodel; import com.jpexs.asdec.abc.avm2.ConstantPool; import com.jpexs.asdec.abc.avm2.instructions.AVM2Instruction; import java.util.HashMap; +import java.util.List; public class ReturnValueTreeItem extends TreeItem { @@ -30,7 +31,7 @@ public class ReturnValueTreeItem extends TreeItem { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { - return hilight("return ") + value.toString(constants, localRegNames); + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { + return hilight("return ") + value.toString(constants, localRegNames, fullyQualifiedNames); } } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/ReturnVoidTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/ReturnVoidTreeItem.java index dcdba426c..1a19d09d2 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/ReturnVoidTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/ReturnVoidTreeItem.java @@ -19,6 +19,7 @@ package com.jpexs.asdec.abc.avm2.treemodel; import com.jpexs.asdec.abc.avm2.ConstantPool; import com.jpexs.asdec.abc.avm2.instructions.AVM2Instruction; import java.util.HashMap; +import java.util.List; public class ReturnVoidTreeItem extends TreeItem { @@ -27,7 +28,7 @@ public class ReturnVoidTreeItem extends TreeItem { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { return hilight("return"); } } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/SetGlobalSlotTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/SetGlobalSlotTreeItem.java index c85b07829..36a4df34d 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/SetGlobalSlotTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/SetGlobalSlotTreeItem.java @@ -19,6 +19,7 @@ package com.jpexs.asdec.abc.avm2.treemodel; import com.jpexs.asdec.abc.avm2.ConstantPool; import com.jpexs.asdec.abc.avm2.instructions.AVM2Instruction; import java.util.HashMap; +import java.util.List; public class SetGlobalSlotTreeItem extends TreeItem { @@ -32,7 +33,7 @@ public class SetGlobalSlotTreeItem extends TreeItem { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { - return hilight("setglobalslot(" + slotId + ",") + value.toString(constants, localRegNames) + hilight(")"); + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { + return hilight("setglobalslot(" + slotId + ",") + value.toString(constants, localRegNames, fullyQualifiedNames) + hilight(")"); } } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/SetLocalTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/SetLocalTreeItem.java index a2cafe384..9d63137f7 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/SetLocalTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/SetLocalTreeItem.java @@ -20,6 +20,7 @@ import com.jpexs.asdec.abc.avm2.ConstantPool; import com.jpexs.asdec.abc.avm2.instructions.AVM2Instruction; import com.jpexs.asdec.abc.avm2.treemodel.clauses.AssignmentTreeItem; import java.util.HashMap; +import java.util.List; public class SetLocalTreeItem extends TreeItem implements SetTypeTreeItem, AssignmentTreeItem { @@ -33,8 +34,8 @@ public class SetLocalTreeItem extends TreeItem implements SetTypeTreeItem, Assig } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { - return hilight(localRegName(localRegNames, regIndex) + "=") + value.toString(constants, localRegNames); + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { + return hilight(localRegName(localRegNames, regIndex) + "=") + value.toString(constants, localRegNames, fullyQualifiedNames); } public TreeItem getObject() { diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/SetPropertyTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/SetPropertyTreeItem.java index 83637af2f..b2cc32a2e 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/SetPropertyTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/SetPropertyTreeItem.java @@ -20,6 +20,7 @@ import com.jpexs.asdec.abc.avm2.ConstantPool; import com.jpexs.asdec.abc.avm2.instructions.AVM2Instruction; import com.jpexs.asdec.abc.avm2.treemodel.clauses.AssignmentTreeItem; import java.util.HashMap; +import java.util.List; public class SetPropertyTreeItem extends TreeItem implements SetTypeTreeItem, AssignmentTreeItem { @@ -35,8 +36,8 @@ public class SetPropertyTreeItem extends TreeItem implements SetTypeTreeItem, As } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { - return formatProperty(constants, object, propertyName, localRegNames) + hilight("=") + value.toString(constants, localRegNames); + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { + return formatProperty(constants, object, propertyName, localRegNames, fullyQualifiedNames) + hilight("=") + value.toString(constants, localRegNames, fullyQualifiedNames); } public TreeItem getObject() { diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/SetSlotTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/SetSlotTreeItem.java index 6273f8aaa..42244f41a 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/SetSlotTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/SetSlotTreeItem.java @@ -21,6 +21,7 @@ import com.jpexs.asdec.abc.avm2.instructions.AVM2Instruction; import com.jpexs.asdec.abc.avm2.treemodel.clauses.AssignmentTreeItem; import com.jpexs.asdec.abc.types.Multiname; import java.util.HashMap; +import java.util.List; public class SetSlotTreeItem extends TreeItem implements SetTypeTreeItem, AssignmentTreeItem { @@ -36,12 +37,12 @@ public class SetSlotTreeItem extends TreeItem implements SetTypeTreeItem, Assign } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { - return getName(constants, localRegNames) + hilight("=") + value.toString(constants, localRegNames); + return getName(constants, localRegNames, fullyQualifiedNames) + hilight("=") + value.toString(constants, localRegNames, fullyQualifiedNames); } - public String getName(ConstantPool constants, HashMap localRegNames) { + public String getName(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { String ret = ""; /*ret = scope.toString(constants, localRegNames) + "."; @@ -55,7 +56,7 @@ public class SetSlotTreeItem extends TreeItem implements SetTypeTreeItem, Assign } } }*/ - return ret + hilight(slotName.getName(constants)); + return ret + hilight(slotName.getName(constants, fullyQualifiedNames)); } public TreeItem getObject() { diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/SetSuperTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/SetSuperTreeItem.java index df0368c68..80d895d05 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/SetSuperTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/SetSuperTreeItem.java @@ -20,6 +20,7 @@ import com.jpexs.asdec.abc.avm2.ConstantPool; import com.jpexs.asdec.abc.avm2.instructions.AVM2Instruction; import com.jpexs.asdec.helpers.Highlighting; import java.util.HashMap; +import java.util.List; public class SetSuperTreeItem extends TreeItem { @@ -35,11 +36,11 @@ public class SetSuperTreeItem extends TreeItem { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { - String calee = object.toString(constants, localRegNames) + "."; + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { + String calee = object.toString(constants, localRegNames, fullyQualifiedNames) + "."; if (Highlighting.stripHilights(calee).equals("this.")) { calee = ""; } - return calee + hilight("super.") + propertyName.toString(constants, localRegNames) + hilight("=") + value.toString(constants, localRegNames); + return calee + hilight("super.") + propertyName.toString(constants, localRegNames, fullyQualifiedNames) + hilight("=") + value.toString(constants, localRegNames, fullyQualifiedNames); } } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/StringTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/StringTreeItem.java index ccc046ff6..522512d08 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/StringTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/StringTreeItem.java @@ -20,6 +20,7 @@ import com.jpexs.asdec.abc.avm2.ConstantPool; import com.jpexs.asdec.abc.avm2.instructions.AVM2Instruction; import com.jpexs.asdec.helpers.Helper; import java.util.HashMap; +import java.util.List; public class StringTreeItem extends TreeItem { @@ -31,7 +32,7 @@ public class StringTreeItem extends TreeItem { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { return hilight("\"" + Helper.escapeString(value) + "\""); } } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/ThisTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/ThisTreeItem.java index 28e5aea7a..e485ee756 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/ThisTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/ThisTreeItem.java @@ -19,6 +19,7 @@ package com.jpexs.asdec.abc.avm2.treemodel; import com.jpexs.asdec.abc.avm2.ConstantPool; import com.jpexs.asdec.abc.types.Multiname; import java.util.HashMap; +import java.util.List; public class ThisTreeItem extends TreeItem { @@ -30,7 +31,7 @@ public class ThisTreeItem extends TreeItem { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { return "this"; } } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/ThrowTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/ThrowTreeItem.java index ed7e62a13..4399782e5 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/ThrowTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/ThrowTreeItem.java @@ -19,6 +19,7 @@ package com.jpexs.asdec.abc.avm2.treemodel; import com.jpexs.asdec.abc.avm2.ConstantPool; import com.jpexs.asdec.abc.avm2.instructions.AVM2Instruction; import java.util.HashMap; +import java.util.List; public class ThrowTreeItem extends TreeItem { @@ -30,7 +31,7 @@ public class ThrowTreeItem extends TreeItem { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { - return hilight("throw ") + value.toString(constants, localRegNames); + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { + return hilight("throw ") + value.toString(constants, localRegNames, fullyQualifiedNames); } } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/TreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/TreeItem.java index 3e0f76f69..81edc43a8 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/TreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/TreeItem.java @@ -20,6 +20,7 @@ import com.jpexs.asdec.abc.avm2.ConstantPool; import com.jpexs.asdec.abc.avm2.instructions.AVM2Instruction; import com.jpexs.asdec.helpers.Highlighting; import java.util.HashMap; +import java.util.List; public abstract class TreeItem { @@ -48,14 +49,14 @@ public abstract class TreeItem { this.precedence = precedence; } - public abstract String toString(ConstantPool constants, HashMap localRegNames); + public abstract String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames); - public String toStringNoH(ConstantPool constants, HashMap localRegNames) { - return Highlighting.stripHilights(toString(constants, localRegNames)); + public String toStringNoH(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { + return Highlighting.stripHilights(toString(constants, localRegNames, fullyQualifiedNames)); } - public String toStringSemicoloned(ConstantPool constants, HashMap localRegNames) { - return toString(constants, localRegNames) + (needsSemicolon() ? ";" : ""); + public String toStringSemicoloned(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { + return toString(constants, localRegNames, fullyQualifiedNames) + (needsSemicolon() ? ";" : ""); } public boolean needsSemicolon() { @@ -77,8 +78,8 @@ public abstract class TreeItem { return false; } - protected String formatProperty(ConstantPool constants, TreeItem object, TreeItem propertyName, HashMap localRegNames) { - String obStr = object.toString(constants, localRegNames); + protected String formatProperty(ConstantPool constants, TreeItem object, TreeItem propertyName, HashMap localRegNames, List fullyQualifiedNames) { + String obStr = object.toString(constants, localRegNames, fullyQualifiedNames); if (object.precedence > PRECEDENCE_PRIMARY) { obStr = "(" + obStr + ")"; } @@ -88,27 +89,27 @@ public abstract class TreeItem { } } if (obStr.equals("")) { - return propertyName.toString(constants, localRegNames); + return propertyName.toString(constants, localRegNames, fullyQualifiedNames); } if (propertyName instanceof FullMultinameTreeItem) { if (((FullMultinameTreeItem) propertyName).isRuntime()) { - return joinProperty(obStr ,propertyName.toString(constants, localRegNames)); + return joinProperty(obStr, propertyName.toString(constants, localRegNames, fullyQualifiedNames)); } else { - return joinProperty(obStr,((FullMultinameTreeItem) propertyName).toString(constants, localRegNames)); + return joinProperty(obStr, ((FullMultinameTreeItem) propertyName).toString(constants, localRegNames, fullyQualifiedNames)); } } else { - return obStr + "[" + propertyName.toString(constants, localRegNames) + "]"; + return obStr + "[" + propertyName.toString(constants, localRegNames, fullyQualifiedNames) + "]"; } } - - private String joinProperty(String prefix,String name){ - if(prefix.endsWith(".")){ - prefix=prefix.substring(0,prefix.length()-1); + + private String joinProperty(String prefix, String name) { + if (prefix.endsWith(".")) { + prefix = prefix.substring(0, prefix.length() - 1); } - if(!Highlighting.stripHilights(name).startsWith("[")){ - return prefix+"."+name; + if (!Highlighting.stripHilights(name).startsWith("[")) { + return prefix + "." + name; } - return prefix+name; + return prefix + name; } public TreeItem getNotCoerced() { diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/UndefinedTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/UndefinedTreeItem.java index c40fafe0b..b40326ee0 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/UndefinedTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/UndefinedTreeItem.java @@ -19,6 +19,7 @@ package com.jpexs.asdec.abc.avm2.treemodel; import com.jpexs.asdec.abc.avm2.ConstantPool; import com.jpexs.asdec.abc.avm2.instructions.AVM2Instruction; import java.util.HashMap; +import java.util.List; public class UndefinedTreeItem extends TreeItem { @@ -27,7 +28,7 @@ public class UndefinedTreeItem extends TreeItem { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { return hilight("undefined"); } } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/UnparsedTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/UnparsedTreeItem.java index 189f3276a..41d84c7aa 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/UnparsedTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/UnparsedTreeItem.java @@ -19,6 +19,7 @@ package com.jpexs.asdec.abc.avm2.treemodel; import com.jpexs.asdec.abc.avm2.ConstantPool; import com.jpexs.asdec.abc.avm2.instructions.AVM2Instruction; import java.util.HashMap; +import java.util.List; public class UnparsedTreeItem extends TreeItem { @@ -30,7 +31,7 @@ public class UnparsedTreeItem extends TreeItem { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { return hilight(value); } } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/WithTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/WithTreeItem.java index 504e1fcd1..b6e4bdbed 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/WithTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/WithTreeItem.java @@ -40,11 +40,11 @@ public class WithTreeItem extends TreeItem { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { String ret; - ret = hilight("with(") + scope.toString(constants, localRegNames) + hilight(")\r\n{\r\n"); + ret = hilight("with(") + scope.toString(constants, localRegNames, fullyQualifiedNames) + hilight(")\r\n{\r\n"); for (TreeItem ti : items) { - ret += ti.toString(constants, localRegNames) + "\r\n"; + ret += ti.toString(constants, localRegNames, fullyQualifiedNames) + "\r\n"; } ret += hilight("}"); return ret; diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/clauses/DeclarationTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/clauses/DeclarationTreeItem.java index ff0b1b477..c7b740255 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/clauses/DeclarationTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/clauses/DeclarationTreeItem.java @@ -24,6 +24,7 @@ import com.jpexs.asdec.abc.avm2.treemodel.SetLocalTreeItem; import com.jpexs.asdec.abc.avm2.treemodel.SetSlotTreeItem; import com.jpexs.asdec.abc.avm2.treemodel.TreeItem; import java.util.HashMap; +import java.util.List; /** * @@ -45,7 +46,7 @@ public class DeclarationTreeItem extends TreeItem { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { if (assignment instanceof SetLocalTreeItem) { SetLocalTreeItem lti = (SetLocalTreeItem) assignment; String type = "*"; @@ -55,12 +56,12 @@ public class DeclarationTreeItem extends TreeItem { if (lti.value instanceof ConvertTreeItem) { type = ((ConvertTreeItem) lti.value).type; } - return "var " + hilight(localRegName(localRegNames, lti.regIndex) + ":" + type + " = ") + lti.value.toString(constants, localRegNames); + return "var " + hilight(localRegName(localRegNames, lti.regIndex) + ":" + type + " = ") + lti.value.toString(constants, localRegNames, fullyQualifiedNames); } if (assignment instanceof SetSlotTreeItem) { SetSlotTreeItem ssti = (SetSlotTreeItem) assignment; - return "var " + ssti.getName(constants, localRegNames) + ":" + type + hilight(" = ") + ssti.value.toString(constants, localRegNames); + return "var " + ssti.getName(constants, localRegNames, fullyQualifiedNames) + ":" + type + hilight(" = ") + ssti.value.toString(constants, localRegNames, fullyQualifiedNames); } - return "var " + assignment.toString(constants, localRegNames); + return "var " + assignment.toString(constants, localRegNames, fullyQualifiedNames); } } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/clauses/DoWhileTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/clauses/DoWhileTreeItem.java index a25e5d022..7aade123e 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/clauses/DoWhileTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/clauses/DoWhileTreeItem.java @@ -41,14 +41,14 @@ public class DoWhileTreeItem extends LoopTreeItem implements Block { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { String ret = ""; ret += "loop" + loopBreak + ":\r\n"; ret += hilight("do\r\n{") + "\r\n"; for (TreeItem ti : commands) { - ret += ti.toStringSemicoloned(constants, localRegNames) + "\r\n"; + ret += ti.toStringSemicoloned(constants, localRegNames, fullyQualifiedNames) + "\r\n"; } - ret += hilight("}\r\nwhile(") + expression.toString(constants, localRegNames) + hilight(");") + "\r\n"; + ret += hilight("}\r\nwhile(") + expression.toString(constants, localRegNames, fullyQualifiedNames) + hilight(");") + "\r\n"; ret += ":loop" + loopBreak; return ret; diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/clauses/ExceptionTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/clauses/ExceptionTreeItem.java index df449339e..cebe35512 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/clauses/ExceptionTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/clauses/ExceptionTreeItem.java @@ -20,6 +20,7 @@ import com.jpexs.asdec.abc.avm2.ConstantPool; import com.jpexs.asdec.abc.avm2.treemodel.TreeItem; import com.jpexs.asdec.abc.types.ABCException; import java.util.HashMap; +import java.util.List; public class ExceptionTreeItem extends TreeItem { @@ -31,7 +32,7 @@ public class ExceptionTreeItem extends TreeItem { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { - return exception.getVarName(constants); + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { + return exception.getVarName(constants, fullyQualifiedNames); } } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/clauses/ForEachInTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/clauses/ForEachInTreeItem.java index 4ac8cfa25..44a63c2ce 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/clauses/ForEachInTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/clauses/ForEachInTreeItem.java @@ -55,12 +55,12 @@ public class ForEachInTreeItem extends LoopTreeItem implements Block { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { String ret = ""; ret += "loop" + loopBreak + ":\r\n"; - ret += hilight("for each (") + expression.toString(constants, localRegNames) + ")\r\n{\r\n"; + ret += hilight("for each (") + expression.toString(constants, localRegNames, fullyQualifiedNames) + ")\r\n{\r\n"; for (TreeItem ti : commands) { - ret += ti.toStringSemicoloned(constants, localRegNames) + "\r\n"; + ret += ti.toStringSemicoloned(constants, localRegNames, fullyQualifiedNames) + "\r\n"; } ret += hilight("}") + "\r\n"; ret += ":loop" + loopBreak; diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/clauses/ForInTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/clauses/ForInTreeItem.java index 1e2ebb3d6..c8d75b58d 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/clauses/ForInTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/clauses/ForInTreeItem.java @@ -55,12 +55,12 @@ public class ForInTreeItem extends LoopTreeItem implements Block { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { String ret = ""; ret += "loop" + loopBreak + ":\r\n"; - ret += hilight("for (") + expression.toString(constants, localRegNames) + hilight(")") + "\r\n{\r\n"; + ret += hilight("for (") + expression.toString(constants, localRegNames, fullyQualifiedNames) + hilight(")") + "\r\n{\r\n"; for (TreeItem ti : commands) { - ret += ti.toStringSemicoloned(constants, localRegNames) + "\r\n"; + ret += ti.toStringSemicoloned(constants, localRegNames, fullyQualifiedNames) + "\r\n"; } ret += hilight("}") + "\r\n"; ret += ":loop" + loopBreak; diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/clauses/ForTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/clauses/ForTreeItem.java index 305fbd776..2c817ec48 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/clauses/ForTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/clauses/ForTreeItem.java @@ -47,7 +47,7 @@ public class ForTreeItem extends LoopTreeItem implements Block { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { String ret = ""; ret += "loop" + loopBreak + ":\r\n"; ret += hilight("for("); @@ -55,20 +55,20 @@ public class ForTreeItem extends LoopTreeItem implements Block { if (i > 0) { ret += ","; } - ret += stripSemicolon(firstCommands.get(i).toString(constants, localRegNames)); + ret += stripSemicolon(firstCommands.get(i).toString(constants, localRegNames, fullyQualifiedNames)); } ret += ";"; - ret += expression.toString(constants, localRegNames); + ret += expression.toString(constants, localRegNames, fullyQualifiedNames); ret += ";"; for (int i = 0; i < finalCommands.size(); i++) { if (i > 0) { ret += ","; } - ret += stripSemicolon(finalCommands.get(i).toString(constants, localRegNames)); + ret += stripSemicolon(finalCommands.get(i).toString(constants, localRegNames, fullyQualifiedNames)); } ret += hilight(")") + "\r\n{\r\n"; for (TreeItem ti : commands) { - ret += ti.toStringSemicoloned(constants, localRegNames) + "\r\n"; + ret += ti.toStringSemicoloned(constants, localRegNames, fullyQualifiedNames) + "\r\n"; } ret += hilight("}") + "\r\n"; ret += ":loop" + loopBreak; diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/clauses/IfTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/clauses/IfTreeItem.java index 563a20237..95592615d 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/clauses/IfTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/clauses/IfTreeItem.java @@ -38,17 +38,17 @@ public class IfTreeItem extends TreeItem implements Block { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { String ret; - ret = hilight("if(") + expression.toString(constants, localRegNames) + hilight(")") + "\r\n{\r\n"; + ret = hilight("if(") + expression.toString(constants, localRegNames, fullyQualifiedNames) + hilight(")") + "\r\n{\r\n"; for (TreeItem ti : onTrue) { - ret += ti.toStringSemicoloned(constants, localRegNames) + "\r\n"; + ret += ti.toStringSemicoloned(constants, localRegNames, fullyQualifiedNames) + "\r\n"; } ret += hilight("}"); if (onFalse.size() > 0) { ret += hilight("\r\nelse\r\n{\r\n"); for (TreeItem ti : onFalse) { - ret += ti.toStringSemicoloned(constants, localRegNames) + "\r\n"; + ret += ti.toStringSemicoloned(constants, localRegNames, fullyQualifiedNames) + "\r\n"; } ret += hilight("}"); } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/clauses/SwitchTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/clauses/SwitchTreeItem.java index 21790d682..3fc43b0e1 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/clauses/SwitchTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/clauses/SwitchTreeItem.java @@ -41,15 +41,15 @@ public class SwitchTreeItem extends LoopTreeItem implements Block { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { String ret = ""; ret += "loop" + loopBreak + ":\r\n"; - ret += hilight("switch(") + switchedObject.toString(constants, localRegNames) + hilight(")") + "\r\n{\r\n"; + ret += hilight("switch(") + switchedObject.toString(constants, localRegNames, fullyQualifiedNames) + hilight(")") + "\r\n{\r\n"; for (int i = 0; i < caseValues.size(); i++) { - ret += "case " + caseValues.get(i).toString(constants, localRegNames) + ":\r\n"; + ret += "case " + caseValues.get(i).toString(constants, localRegNames, fullyQualifiedNames) + ":\r\n"; ret += AVM2Code.IDENTOPEN + "\r\n"; for (int j = 0; j < caseCommands.get(i).size(); j++) { - ret += caseCommands.get(i).get(j).toStringSemicoloned(constants, localRegNames) + "\r\n"; + ret += caseCommands.get(i).get(j).toStringSemicoloned(constants, localRegNames, fullyQualifiedNames) + "\r\n"; } ret += AVM2Code.IDENTCLOSE + "\r\n"; } @@ -57,7 +57,7 @@ public class SwitchTreeItem extends LoopTreeItem implements Block { ret += hilight("default") + ":\r\n"; ret += AVM2Code.IDENTOPEN + "\r\n"; for (int j = 0; j < defaultCommands.size(); j++) { - ret += defaultCommands.get(j).toStringSemicoloned(constants, localRegNames) + "\r\n"; + ret += defaultCommands.get(j).toStringSemicoloned(constants, localRegNames, fullyQualifiedNames) + "\r\n"; } ret += AVM2Code.IDENTCLOSE + "\r\n"; } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/clauses/TernarOpTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/clauses/TernarOpTreeItem.java index 999a55205..36d86f410 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/clauses/TernarOpTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/clauses/TernarOpTreeItem.java @@ -20,6 +20,7 @@ import com.jpexs.asdec.abc.avm2.ConstantPool; import com.jpexs.asdec.abc.avm2.instructions.AVM2Instruction; import com.jpexs.asdec.abc.avm2.treemodel.TreeItem; import java.util.HashMap; +import java.util.List; public class TernarOpTreeItem extends TreeItem { @@ -35,7 +36,7 @@ public class TernarOpTreeItem extends TreeItem { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { - return expression.toString(constants, localRegNames) + hilight("?") + onTrue.toString(constants, localRegNames) + hilight(":") + onFalse.toString(constants, localRegNames); + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { + return expression.toString(constants, localRegNames, fullyQualifiedNames) + hilight("?") + onTrue.toString(constants, localRegNames, fullyQualifiedNames) + hilight(":") + onFalse.toString(constants, localRegNames, fullyQualifiedNames); } } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/clauses/TryTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/clauses/TryTreeItem.java index d69e9462c..226aa8be3 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/clauses/TryTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/clauses/TryTreeItem.java @@ -40,25 +40,25 @@ public class TryTreeItem extends TreeItem implements Block { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { String ret = ""; ret += "try\r\n{\r\n"; for (TreeItem ti : tryCommands) { - ret += ti.toStringSemicoloned(constants, localRegNames) + "\r\n"; + ret += ti.toStringSemicoloned(constants, localRegNames, fullyQualifiedNames) + "\r\n"; } ret += "}"; for (int e = 0; e < catchExceptions.size(); e++) { - ret += "\r\ncatch(" + catchExceptions.get(e).getVarName(constants) + ":" + catchExceptions.get(e).getTypeName(constants) + ")\r\n{\r\n"; + ret += "\r\ncatch(" + catchExceptions.get(e).getVarName(constants, fullyQualifiedNames) + ":" + catchExceptions.get(e).getTypeName(constants, fullyQualifiedNames) + ")\r\n{\r\n"; List commands = catchCommands.get(e); for (TreeItem ti : commands) { - ret += ti.toStringSemicoloned(constants, localRegNames) + "\r\n"; + ret += ti.toStringSemicoloned(constants, localRegNames, fullyQualifiedNames) + "\r\n"; } ret += "}"; } if (finallyCommands.size() > 0) { ret += "\r\nfinally\r\n{\r\n"; for (TreeItem ti : finallyCommands) { - ret += ti.toStringSemicoloned(constants, localRegNames) + "\r\n"; + ret += ti.toStringSemicoloned(constants, localRegNames, fullyQualifiedNames) + "\r\n"; } ret += "}"; } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/clauses/WhileTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/clauses/WhileTreeItem.java index 926c733fa..b5d2729e8 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/clauses/WhileTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/clauses/WhileTreeItem.java @@ -36,12 +36,12 @@ public class WhileTreeItem extends LoopTreeItem implements Block { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { String ret = ""; ret += "loop" + loopBreak + ":\r\n"; - ret += hilight("while(") + expression.toString(constants, localRegNames) + hilight(")") + "\r\n{\r\n"; + ret += hilight("while(") + expression.toString(constants, localRegNames, fullyQualifiedNames) + hilight(")") + "\r\n{\r\n"; for (TreeItem ti : commands) { - ret += ti.toStringSemicoloned(constants, localRegNames) + "\r\n"; + ret += ti.toStringSemicoloned(constants, localRegNames, fullyQualifiedNames) + "\r\n"; } ret += hilight("}") + "\r\n"; ret += ":loop" + loopBreak; diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/operations/BinaryOpTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/operations/BinaryOpTreeItem.java index 03d6648ef..33a5f0497 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/operations/BinaryOpTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/operations/BinaryOpTreeItem.java @@ -20,6 +20,7 @@ import com.jpexs.asdec.abc.avm2.ConstantPool; import com.jpexs.asdec.abc.avm2.instructions.AVM2Instruction; import com.jpexs.asdec.abc.avm2.treemodel.TreeItem; import java.util.HashMap; +import java.util.List; public abstract class BinaryOpTreeItem extends TreeItem { @@ -35,18 +36,18 @@ public abstract class BinaryOpTreeItem extends TreeItem { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { String ret = ""; if (leftSide.precedence > precedence) { - ret += "(" + leftSide.toString(constants, localRegNames) + ")"; + ret += "(" + leftSide.toString(constants, localRegNames, fullyQualifiedNames) + ")"; } else { - ret += leftSide.toString(constants, localRegNames); + ret += leftSide.toString(constants, localRegNames, fullyQualifiedNames); } ret += hilight(operator); if (rightSide.precedence > precedence) { - ret += "(" + rightSide.toString(constants, localRegNames) + ")"; + ret += "(" + rightSide.toString(constants, localRegNames, fullyQualifiedNames) + ")"; } else { - ret += rightSide.toString(constants, localRegNames); + ret += rightSide.toString(constants, localRegNames, fullyQualifiedNames); } return ret; } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/operations/DeletePropertyTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/operations/DeletePropertyTreeItem.java index 63cc3c3f0..f12e646e6 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/operations/DeletePropertyTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/operations/DeletePropertyTreeItem.java @@ -21,6 +21,7 @@ import com.jpexs.asdec.abc.avm2.instructions.AVM2Instruction; import com.jpexs.asdec.abc.avm2.treemodel.FullMultinameTreeItem; import com.jpexs.asdec.abc.avm2.treemodel.TreeItem; import java.util.HashMap; +import java.util.List; public class DeletePropertyTreeItem extends TreeItem { @@ -34,7 +35,7 @@ public class DeletePropertyTreeItem extends TreeItem { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { - return hilight("delete ") + object.toString(constants, localRegNames) + "[" + propertyName.toString(constants, localRegNames) + "]"; + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { + return hilight("delete ") + object.toString(constants, localRegNames, fullyQualifiedNames) + "[" + propertyName.toString(constants, localRegNames, fullyQualifiedNames) + "]"; } } diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/operations/UnaryOpTreeItem.java b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/operations/UnaryOpTreeItem.java index 897aebad5..591bdb1f6 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/operations/UnaryOpTreeItem.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/treemodel/operations/UnaryOpTreeItem.java @@ -20,6 +20,7 @@ import com.jpexs.asdec.abc.avm2.ConstantPool; import com.jpexs.asdec.abc.avm2.instructions.AVM2Instruction; import com.jpexs.asdec.abc.avm2.treemodel.TreeItem; import java.util.HashMap; +import java.util.List; public abstract class UnaryOpTreeItem extends TreeItem { @@ -33,8 +34,8 @@ public abstract class UnaryOpTreeItem extends TreeItem { } @Override - public String toString(ConstantPool constants, HashMap localRegNames) { - String s = value.toString(constants, localRegNames); + public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { + String s = value.toString(constants, localRegNames, fullyQualifiedNames); if (value.precedence > precedence) { s = "(" + s + ")"; } diff --git a/trunk/src/com/jpexs/asdec/abc/gui/ABCComboBoxModel.java b/trunk/src/com/jpexs/asdec/abc/gui/ABCComboBoxModel.java index 567beee5c..cc25caca8 100644 --- a/trunk/src/com/jpexs/asdec/abc/gui/ABCComboBoxModel.java +++ b/trunk/src/com/jpexs/asdec/abc/gui/ABCComboBoxModel.java @@ -26,7 +26,7 @@ public class ABCComboBoxModel implements ComboBoxModel { public List list; public int itemIndex = 0; - public static final String ROOT=" - all - "; + public static final String ROOT = " - all - "; public ABCComboBoxModel(List list) { this.list = list; @@ -34,14 +34,14 @@ public class ABCComboBoxModel implements ComboBoxModel { } public int getSize() { - return 1+list.size(); + return 1 + list.size(); } public Object getElementAt(int index) { - if(index==0){ + if (index == 0) { return ROOT; } - return list.get(index-1); + return list.get(index - 1); } public void addListDataListener(ListDataListener l) { @@ -51,10 +51,10 @@ public class ABCComboBoxModel implements ComboBoxModel { } public void setSelectedItem(Object anItem) { - if(anItem==ROOT){ - itemIndex=0; - }else{ - itemIndex = 1+list.indexOf(anItem); + if (anItem == ROOT) { + itemIndex = 0; + } else { + itemIndex = 1 + list.indexOf(anItem); } } diff --git a/trunk/src/com/jpexs/asdec/abc/gui/ClassesListTree.java b/trunk/src/com/jpexs/asdec/abc/gui/ClassesListTree.java index 98b65f293..2cd22cf1c 100644 --- a/trunk/src/com/jpexs/asdec/abc/gui/ClassesListTree.java +++ b/trunk/src/com/jpexs/asdec/abc/gui/ClassesListTree.java @@ -17,8 +17,6 @@ package com.jpexs.asdec.abc.gui; import com.jpexs.asdec.Main; -import com.jpexs.asdec.abc.ABC; -import com.jpexs.asdec.abc.types.ScriptInfo; import com.jpexs.asdec.abc.types.traits.Trait; import com.jpexs.asdec.abc.types.traits.TraitClass; import com.jpexs.asdec.tags.DoABCTag; @@ -33,6 +31,7 @@ import javax.swing.tree.TreePath; public class ClassesListTree extends JTree implements TreeSelectionListener { private List abcList; + public void selectClass(int classIndex) { ClassesListTreeModel model = (ClassesListTreeModel) getModel(); TreeElement selectedElement = model.getElementByClassIndex(classIndex); @@ -42,7 +41,7 @@ public class ClassesListTree extends JTree implements TreeSelectionListener { } public ClassesListTree(List list) { - this.abcList=list; + this.abcList = list; setModel(new ClassesListTreeModel(list)); addTreeSelectionListener(this); DefaultTreeCellRenderer treeRenderer = new DefaultTreeCellRenderer(); @@ -54,7 +53,7 @@ public class ClassesListTree extends JTree implements TreeSelectionListener { } public void setDoABCTags(List list) { - this.abcList=list; + this.abcList = list; setModel(new ClassesListTreeModel(list)); } @@ -68,7 +67,7 @@ public class ClassesListTree extends JTree implements TreeSelectionListener { } Object item = tp.getItem(); if (item instanceof TreeLeafScript) { - final TreeLeafScript scriptLeaf = (TreeLeafScript) item; + final TreeLeafScript scriptLeaf = (TreeLeafScript) item; if (!Main.isWorking()) { Main.startWork("Decompiling..."); @@ -83,9 +82,9 @@ public class ClassesListTree extends JTree implements TreeSelectionListener { } } Main.abcMainFrame.navigator.setClassIndex(classIndex); - Main.abcMainFrame.navigator.setABC(abcList,scriptLeaf.abc); + Main.abcMainFrame.navigator.setABC(abcList, scriptLeaf.abc); Main.abcMainFrame.setAbc(scriptLeaf.abc); - Main.abcMainFrame.decompiledTextArea.setScript(scriptLeaf.abc.script_info[scriptLeaf.scriptIndex], scriptLeaf.abc,abcList); + Main.abcMainFrame.decompiledTextArea.setScript(scriptLeaf.abc.script_info[scriptLeaf.scriptIndex], scriptLeaf.abc, abcList); Main.abcMainFrame.detailPanel.methodTraitPanel.methodCodePanel.sourceTextArea.setText(""); Main.stopWork(); } diff --git a/trunk/src/com/jpexs/asdec/abc/gui/ClassesListTreeModel.java b/trunk/src/com/jpexs/asdec/abc/gui/ClassesListTreeModel.java index 07c418a0b..f1cec940c 100644 --- a/trunk/src/com/jpexs/asdec/abc/gui/ClassesListTreeModel.java +++ b/trunk/src/com/jpexs/asdec/abc/gui/ClassesListTreeModel.java @@ -16,8 +16,6 @@ */ package com.jpexs.asdec.abc.gui; -import com.jpexs.asdec.abc.ABC; -import com.jpexs.asdec.abc.types.ScriptInfo; import com.jpexs.asdec.tags.DoABCTag; import java.util.List; import javax.swing.event.TreeModelListener; diff --git a/trunk/src/com/jpexs/asdec/abc/gui/ConstantsListModel.java b/trunk/src/com/jpexs/asdec/abc/gui/ConstantsListModel.java index 85d73c679..350313d5a 100644 --- a/trunk/src/com/jpexs/asdec/abc/gui/ConstantsListModel.java +++ b/trunk/src/com/jpexs/asdec/abc/gui/ConstantsListModel.java @@ -18,6 +18,7 @@ package com.jpexs.asdec.abc.gui; import com.jpexs.asdec.abc.avm2.ConstantPool; import com.jpexs.asdec.helpers.Helper; +import java.util.ArrayList; import javax.swing.ListModel; import javax.swing.event.ListDataListener; @@ -85,7 +86,7 @@ public class ConstantsListModel implements ListModel { case TYPE_NAMESPACESET: return "" + (index + 1) + ":" + constants.constant_namespace_set[index + 1].toString(constants); case TYPE_MULTINAME: - return "" + (index + 1) + ":" + constants.constant_multiname[index + 1].toString(constants); + return "" + (index + 1) + ":" + constants.constant_multiname[index + 1].toString(constants, new ArrayList()); } return null; } diff --git a/trunk/src/com/jpexs/asdec/abc/gui/DecompiledEditorPane.java b/trunk/src/com/jpexs/asdec/abc/gui/DecompiledEditorPane.java index 49d7e85cb..564885252 100644 --- a/trunk/src/com/jpexs/asdec/abc/gui/DecompiledEditorPane.java +++ b/trunk/src/com/jpexs/asdec/abc/gui/DecompiledEditorPane.java @@ -177,10 +177,9 @@ public class DecompiledEditorPane extends LineMarkedEditorPane implements MouseL getCaret().setVisible(true); addCaretListener(this); } - private List abcList; - - public void setScript(ScriptInfo script, ABC abc,List abcList) { + + public void setScript(ScriptInfo script, ABC abc, List abcList) { setText("//Please wait..."); if (script == null) { highlights = new ArrayList(); @@ -192,7 +191,7 @@ public class DecompiledEditorPane extends LineMarkedEditorPane implements MouseL String hilightedCode; if (!bufferedClasses.containsKey(script)) { - hilightedCode = script.convert(abcList,abc, false, true); + hilightedCode = script.convert(abcList, abc, false, true); highlights = Highlighting.getInstrHighlights(hilightedCode); traitHighlights = Highlighting.getTraitHighlights(hilightedCode); methodHighlights = Highlighting.getMethodHighlights(hilightedCode); @@ -216,7 +215,7 @@ public class DecompiledEditorPane extends LineMarkedEditorPane implements MouseL if (bufferedClasses.containsKey(script)) { bufferedClasses.remove(script); } - setScript(script, abc,abcList); + setScript(script, abc, abcList); setNoTrait(); } diff --git a/trunk/src/com/jpexs/asdec/abc/gui/IconListRenderer.java b/trunk/src/com/jpexs/asdec/abc/gui/IconListRenderer.java index da015d4ba..f1e155239 100644 --- a/trunk/src/com/jpexs/asdec/abc/gui/IconListRenderer.java +++ b/trunk/src/com/jpexs/asdec/abc/gui/IconListRenderer.java @@ -52,13 +52,13 @@ public class IconListRenderer // Get icon to use for the list item value String modifiersRegex = "(public |static |final |override |private |protected |package )*"; - if((" "+value.toString()).contains(" const ")){ + if ((" " + value.toString()).contains(" const ")) { label.setIcon(constIcon); } - if((" "+value.toString()).contains(" var ")){ + if ((" " + value.toString()).contains(" var ")) { label.setIcon(variableIcon); } - if((" "+value.toString()).contains(" function ")){ + if ((" " + value.toString()).contains(" function ")) { label.setIcon(functionIcon); } if (value.toString().equals(TraitsListModel.STR_CLASS_INITIALIZER)) { diff --git a/trunk/src/com/jpexs/asdec/abc/gui/MainFrame.java b/trunk/src/com/jpexs/asdec/abc/gui/MainFrame.java index c8a4ee61a..c80d72692 100644 --- a/trunk/src/com/jpexs/asdec/abc/gui/MainFrame.java +++ b/trunk/src/com/jpexs/asdec/abc/gui/MainFrame.java @@ -121,8 +121,6 @@ public class MainFrame extends JFrame implements ActionListener, ItemListener { this.abc = abc; updateConstList(); } - - public void updateConstList() { switch (constantTypeList.getSelectedIndex()) { @@ -156,13 +154,13 @@ public class MainFrame extends JFrame implements ActionListener, ItemListener { } public void switchAbc(int index) { - listIndex = index; + listIndex = index; if (index == -1) { classTree.setDoABCTags(list); } else { List oneList = new ArrayList(); oneList.add(list.get(index)); - this.abc=list.get(index).abc; + this.abc = list.get(index).abc; classTree.setDoABCTags(oneList); } //decompiledTextArea.setABC(abc); @@ -208,7 +206,7 @@ public class MainFrame extends JFrame implements ActionListener, ItemListener { pan2.add((abcComboBox = new JComboBox(new ABCComboBoxModel(list))), BorderLayout.NORTH); navigator = new TraitsList(); - navigator.setABC(list,abc); + navigator.setABC(list, abc); JPanel navPanel = new JPanel(new BorderLayout()); @@ -345,9 +343,9 @@ public class MainFrame extends JFrame implements ActionListener, ItemListener { constantTable = new JTable(); autoResizeColWidth(constantTable, new UIntTableModel(abc)); constantTable.setAutoCreateRowSorter(true); - - final List inlist=list; - + + final List inlist = list; + constantTable.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { @@ -359,7 +357,7 @@ public class MainFrame extends JFrame implements ActionListener, ItemListener { } int multinameIndex = constantTable.convertRowIndexToModel(rowIndex); if (multinameIndex > 0) { - UsageFrame usageFrame = new UsageFrame(inlist,abc, multinameIndex); + UsageFrame usageFrame = new UsageFrame(inlist, abc, multinameIndex); usageFrame.setVisible(true); } } @@ -468,7 +466,7 @@ public class MainFrame extends JFrame implements ActionListener, ItemListener { } public void reload() { - switchAbc(listIndex-1); + switchAbc(listIndex - 1); } public void itemStateChanged(ItemEvent e) { @@ -477,7 +475,7 @@ public class MainFrame extends JFrame implements ActionListener, ItemListener { if (index == -1) { return; } - switchAbc(index-1); + switchAbc(index - 1); } if (e.getSource() == constantTypeList) { int index = ((JComboBox) e.getSource()).getSelectedIndex(); diff --git a/trunk/src/com/jpexs/asdec/abc/gui/MethodInfoPanel.java b/trunk/src/com/jpexs/asdec/abc/gui/MethodInfoPanel.java index 9655239e1..256b9831b 100644 --- a/trunk/src/com/jpexs/asdec/abc/gui/MethodInfoPanel.java +++ b/trunk/src/com/jpexs/asdec/abc/gui/MethodInfoPanel.java @@ -23,6 +23,7 @@ import com.jpexs.asdec.abc.methodinfo_parser.ParseException; import com.jpexs.asdec.abc.types.MethodInfo; import com.jpexs.asdec.helpers.Helper; import java.awt.Dimension; +import java.util.ArrayList; import javax.swing.*; import jsyntaxpane.syntaxkits.Flasm3MethodInfoSyntaxKit; @@ -78,7 +79,7 @@ public class MethodInfoPanel extends JPanel { if (ptype == 0) { ret += "*"; } else { - ret += "m[" + ptype + "]\"" + Helper.escapeString(abc.constants.constant_multiname[ptype].toString(abc.constants)) + "\""; + ret += "m[" + ptype + "]\"" + Helper.escapeString(abc.constants.constant_multiname[ptype].toString(abc.constants, new ArrayList())) + "\""; } if (methodInfo.flagHas_optional()) { if (p >= optParPos) { @@ -94,7 +95,7 @@ public class MethodInfoPanel extends JPanel { if (methodInfo.ret_type == 0) { returnTypeEditor.setText("*"); } else { - returnTypeEditor.setText("m[" + methodInfo.ret_type + "]\"" + Helper.escapeString(abc.constants.constant_multiname[methodInfo.ret_type].toString(abc.constants)) + "\""); + returnTypeEditor.setText("m[" + methodInfo.ret_type + "]\"" + Helper.escapeString(abc.constants.constant_multiname[methodInfo.ret_type].toString(abc.constants, new ArrayList())) + "\""); } } diff --git a/trunk/src/com/jpexs/asdec/abc/gui/SlotConstTraitDetailPanel.java b/trunk/src/com/jpexs/asdec/abc/gui/SlotConstTraitDetailPanel.java index 746b36ca7..16e273b70 100644 --- a/trunk/src/com/jpexs/asdec/abc/gui/SlotConstTraitDetailPanel.java +++ b/trunk/src/com/jpexs/asdec/abc/gui/SlotConstTraitDetailPanel.java @@ -23,6 +23,7 @@ import com.jpexs.asdec.abc.types.ValueKind; import com.jpexs.asdec.abc.types.traits.TraitSlotConst; import com.jpexs.asdec.helpers.Helper; import java.awt.BorderLayout; +import java.util.ArrayList; import javax.swing.*; import jsyntaxpane.syntaxkits.Flasm3MethodInfoSyntaxKit; @@ -52,7 +53,7 @@ public class SlotConstTraitDetailPanel extends JPanel implements TraitDetail { String s; String typeStr; if (trait.type_index > 0) { - typeStr = "m[" + trait.type_index + "]\"" + Helper.escapeString(abc.constants.constant_multiname[trait.type_index].toString(abc.constants)) + "\""; + typeStr = "m[" + trait.type_index + "]\"" + Helper.escapeString(abc.constants.constant_multiname[trait.type_index].toString(abc.constants, new ArrayList())) + "\""; } else { typeStr = "*"; } diff --git a/trunk/src/com/jpexs/asdec/abc/gui/TraitsList.java b/trunk/src/com/jpexs/asdec/abc/gui/TraitsList.java index e12ebc04f..343295a22 100644 --- a/trunk/src/com/jpexs/asdec/abc/gui/TraitsList.java +++ b/trunk/src/com/jpexs/asdec/abc/gui/TraitsList.java @@ -40,9 +40,9 @@ public class TraitsList extends JList implements ListSelectionListener { setCellRenderer(new IconListRenderer()); } - public void setABC(List abcTags,ABC abc) { + public void setABC(List abcTags, ABC abc) { this.abc = abc; - this.abcTags=abcTags; + this.abcTags = abcTags; setModel(new DefaultListModel()); setClassIndex(-1); } @@ -53,7 +53,7 @@ public class TraitsList extends JList implements ListSelectionListener { setModel(new DefaultListModel()); } else { if (abc != null) { - setModel(new TraitsListModel(abcTags,abc, classIndex)); + setModel(new TraitsListModel(abcTags, abc, classIndex)); } } } diff --git a/trunk/src/com/jpexs/asdec/abc/gui/TraitsListModel.java b/trunk/src/com/jpexs/asdec/abc/gui/TraitsListModel.java index 43cc45447..0984805c6 100644 --- a/trunk/src/com/jpexs/asdec/abc/gui/TraitsListModel.java +++ b/trunk/src/com/jpexs/asdec/abc/gui/TraitsListModel.java @@ -18,6 +18,7 @@ package com.jpexs.asdec.abc.gui; import com.jpexs.asdec.abc.ABC; import com.jpexs.asdec.tags.DoABCTag; +import java.util.ArrayList; import java.util.List; import javax.swing.ListModel; import javax.swing.event.ListDataListener; @@ -30,9 +31,9 @@ public class TraitsListModel implements ListModel { public static final String STR_CLASS_INITIALIZER = "class initializer"; private List abcTags; - public TraitsListModel(List abcTags,ABC abc, int classIndex) { + public TraitsListModel(List abcTags, ABC abc, int classIndex) { this.abc = abc; - this.abcTags=abcTags; + this.abcTags = abcTags; this.classIndex = classIndex; } @@ -45,9 +46,9 @@ public class TraitsListModel implements ListModel { public Object getElementAt(int index) { if (index < abc.class_info[classIndex].static_traits.traits.length) { - return abc.class_info[classIndex].static_traits.traits[index].convertHeader(abcTags,abc, true, false, classIndex, false); + return abc.class_info[classIndex].static_traits.traits[index].convertHeader(abcTags, abc, true, false, classIndex, false, new ArrayList()); } else if (index < abc.class_info[classIndex].static_traits.traits.length + abc.instance_info[classIndex].instance_traits.traits.length) { - return abc.instance_info[classIndex].instance_traits.traits[index - abc.class_info[classIndex].static_traits.traits.length].convertHeader(abcTags,abc, false, false, classIndex, false); + return abc.instance_info[classIndex].instance_traits.traits[index - abc.class_info[classIndex].static_traits.traits.length].convertHeader(abcTags, abc, false, false, classIndex, false, new ArrayList()); } else if (index == abc.class_info[classIndex].static_traits.traits.length + abc.instance_info[classIndex].instance_traits.traits.length) { return STR_INSTANCE_INITIALIZER; } else { diff --git a/trunk/src/com/jpexs/asdec/abc/gui/TreeLeafScript.java b/trunk/src/com/jpexs/asdec/abc/gui/TreeLeafScript.java index cd74f6cd0..31349fa17 100644 --- a/trunk/src/com/jpexs/asdec/abc/gui/TreeLeafScript.java +++ b/trunk/src/com/jpexs/asdec/abc/gui/TreeLeafScript.java @@ -31,6 +31,4 @@ public class TreeLeafScript { this.abc = abc; this.scriptIndex = scriptIndex; } - - } diff --git a/trunk/src/com/jpexs/asdec/abc/gui/UsageFrame.java b/trunk/src/com/jpexs/asdec/abc/gui/UsageFrame.java index 2d32b849d..44650743f 100644 --- a/trunk/src/com/jpexs/asdec/abc/gui/UsageFrame.java +++ b/trunk/src/com/jpexs/asdec/abc/gui/UsageFrame.java @@ -46,10 +46,10 @@ public class UsageFrame extends JFrame implements ActionListener, MouseListener private UsageListModel usageListModel; private ABC abc; - public UsageFrame(List abcTags,ABC abc, int multinameIndex) { + public UsageFrame(List abcTags, ABC abc, int multinameIndex) { List usages = abc.findMultinameUsage(multinameIndex); this.abc = abc; - usageListModel = new UsageListModel(abcTags,abc); + usageListModel = new UsageListModel(abcTags, abc); for (MultinameUsage u : usages) { usageListModel.addElement(u); } diff --git a/trunk/src/com/jpexs/asdec/abc/gui/UsageListModel.java b/trunk/src/com/jpexs/asdec/abc/gui/UsageListModel.java index 9c3b6b65a..59814ea2b 100644 --- a/trunk/src/com/jpexs/asdec/abc/gui/UsageListModel.java +++ b/trunk/src/com/jpexs/asdec/abc/gui/UsageListModel.java @@ -31,19 +31,19 @@ public class UsageListModel extends DefaultListModel { private ABC abc; private List abcTags; - public UsageListModel(List abcTags,ABC abc) { + public UsageListModel(List abcTags, ABC abc) { this.abc = abc; - this.abcTags=abcTags; + this.abcTags = abcTags; } @Override public Object get(int index) { - return ((MultinameUsage) super.get(index)).toString(abcTags,abc); + return ((MultinameUsage) super.get(index)).toString(abcTags, abc); } @Override public Object getElementAt(int index) { - return ((MultinameUsage) super.getElementAt(index)).toString(abcTags,abc); + return ((MultinameUsage) super.getElementAt(index)).toString(abcTags, abc); } public MultinameUsage getUsage(int index) { diff --git a/trunk/src/com/jpexs/asdec/abc/gui/tablemodels/MultinameTableModel.java b/trunk/src/com/jpexs/asdec/abc/gui/tablemodels/MultinameTableModel.java index e8842b56e..48547477d 100644 --- a/trunk/src/com/jpexs/asdec/abc/gui/tablemodels/MultinameTableModel.java +++ b/trunk/src/com/jpexs/asdec/abc/gui/tablemodels/MultinameTableModel.java @@ -17,6 +17,7 @@ package com.jpexs.asdec.abc.gui.tablemodels; import com.jpexs.asdec.abc.ABC; +import java.util.ArrayList; import javax.swing.event.TableModelListener; import javax.swing.table.TableModel; @@ -122,7 +123,7 @@ public class MultinameTableModel implements TableModel { if (abc.constants.constant_multiname[rowIndex].name_index == -1) { return ""; } - return abc.constants.constant_multiname[rowIndex].getName(abc.constants); + return abc.constants.constant_multiname[rowIndex].getName(abc.constants, new ArrayList()); case 3: if (rowIndex == 0) { return ""; diff --git a/trunk/src/com/jpexs/asdec/abc/types/ABCException.java b/trunk/src/com/jpexs/asdec/abc/types/ABCException.java index da49dc608..c6efe2bb1 100644 --- a/trunk/src/com/jpexs/asdec/abc/types/ABCException.java +++ b/trunk/src/com/jpexs/asdec/abc/types/ABCException.java @@ -20,6 +20,7 @@ import com.jpexs.asdec.abc.avm2.AVM2Code; import com.jpexs.asdec.abc.avm2.ConstantPool; import com.jpexs.asdec.abc.avm2.ConvertException; import com.jpexs.asdec.helpers.Helper; +import java.util.List; public class ABCException { @@ -34,13 +35,13 @@ public class ABCException { return "Exception: startServer=" + Helper.formatAddress(start) + " end=" + Helper.formatAddress(end) + " target=" + target + " type_index=" + type_index + " name_index=" + name_index; } - public String toString(ConstantPool constants) { - return "Exception: startServer=" + Helper.formatAddress(start) + " end=" + Helper.formatAddress(end) + " target=" + target + " type=\"" + getTypeName(constants) + "\" name=\"" + getVarName(constants) + "\""; + public String toString(ConstantPool constants, List fullyQualifiedNames) { + return "Exception: startServer=" + Helper.formatAddress(start) + " end=" + Helper.formatAddress(end) + " target=" + target + " type=\"" + getTypeName(constants, fullyQualifiedNames) + "\" name=\"" + getVarName(constants, fullyQualifiedNames) + "\""; } - public String toString(ConstantPool constants, AVM2Code code) { + public String toString(ConstantPool constants, AVM2Code code, List fullyQualifiedNames) { try { - return "Exception: startServer=" + code.adr2pos(start) + ":" + code.code.get(code.adr2pos(start)).toStringNoAddress(constants) + " end=" + code.adr2pos(end) + ":" + code.code.get(code.adr2pos(end)).toStringNoAddress(constants) + " target=" + code.adr2pos(target) + ":" + code.code.get(code.adr2pos(target)).toStringNoAddress(constants) + " type=\"" + getTypeName(constants) + "\" name=\"" + getVarName(constants) + "\""; + return "Exception: startServer=" + code.adr2pos(start) + ":" + code.code.get(code.adr2pos(start)).toStringNoAddress(constants, fullyQualifiedNames) + " end=" + code.adr2pos(end) + ":" + code.code.get(code.adr2pos(end)).toStringNoAddress(constants, fullyQualifiedNames) + " target=" + code.adr2pos(target) + ":" + code.code.get(code.adr2pos(target)).toStringNoAddress(constants, fullyQualifiedNames) + " type=\"" + getTypeName(constants, fullyQualifiedNames) + "\" name=\"" + getVarName(constants, fullyQualifiedNames) + "\""; } catch (ConvertException ex) { return ""; } @@ -50,17 +51,17 @@ public class ABCException { return (name_index == 0) && (type_index == 0); } - public String getVarName(ConstantPool constants) { + public String getVarName(ConstantPool constants, List fullyQualifiedNames) { if (name_index == 0) { return ""; } - return constants.constant_multiname[name_index].getName(constants); + return constants.constant_multiname[name_index].getName(constants, fullyQualifiedNames); } - public String getTypeName(ConstantPool constants) { + public String getTypeName(ConstantPool constants, List fullyQualifiedNames) { if (type_index == 0) { return "*"; } - return constants.constant_multiname[type_index].getName(constants); + return constants.constant_multiname[type_index].getName(constants, fullyQualifiedNames); } } diff --git a/trunk/src/com/jpexs/asdec/abc/types/ClassInfo.java b/trunk/src/com/jpexs/asdec/abc/types/ClassInfo.java index dfb56a0f5..f7a67c7fe 100644 --- a/trunk/src/com/jpexs/asdec/abc/types/ClassInfo.java +++ b/trunk/src/com/jpexs/asdec/abc/types/ClassInfo.java @@ -18,6 +18,7 @@ package com.jpexs.asdec.abc.types; import com.jpexs.asdec.abc.ABC; import com.jpexs.asdec.abc.types.traits.Traits; +import java.util.List; public class ClassInfo { @@ -29,7 +30,7 @@ public class ClassInfo { return "method_index=" + cinit_index + "\r\n" + static_traits.toString(); } - public String toString(ABC abc) { - return "method_index=" + cinit_index + "\r\n" + static_traits.toString(abc); + public String toString(ABC abc, List fullyQualifiedNames) { + return "method_index=" + cinit_index + "\r\n" + static_traits.toString(abc, fullyQualifiedNames); } } diff --git a/trunk/src/com/jpexs/asdec/abc/types/InstanceInfo.java b/trunk/src/com/jpexs/asdec/abc/types/InstanceInfo.java index f50a126f6..e50a46511 100644 --- a/trunk/src/com/jpexs/asdec/abc/types/InstanceInfo.java +++ b/trunk/src/com/jpexs/asdec/abc/types/InstanceInfo.java @@ -20,6 +20,8 @@ import com.jpexs.asdec.abc.ABC; import com.jpexs.asdec.abc.avm2.ConstantPool; import com.jpexs.asdec.abc.types.traits.Traits; import com.jpexs.asdec.helpers.Helper; +import java.util.ArrayList; +import java.util.List; public class InstanceInfo { @@ -40,18 +42,18 @@ public class InstanceInfo { return "name_index=" + name_index + " super_index=" + super_index + " flags=" + flags + " protectedNS=" + protectedNS + " interfaces=" + Helper.intArrToString(interfaces) + " method_index=" + iinit_index + "\r\n" + instance_traits.toString(); } - public String toString(ABC abc) { + public String toString(ABC abc, List fullyQualifiedNames) { String supIndexStr = "[nothing]"; if (super_index > 0) { - supIndexStr = abc.constants.constant_multiname[super_index].toString(abc.constants); + supIndexStr = abc.constants.constant_multiname[super_index].toString(abc.constants, fullyQualifiedNames); } - return "name_index=" + abc.constants.constant_multiname[name_index].toString(abc.constants) + " super_index=" + supIndexStr + " flags=" + flags + " protectedNS=" + protectedNS + " interfaces=" + Helper.intArrToString(interfaces) + " method_index=" + iinit_index + "\r\n" + instance_traits.toString(abc); + return "name_index=" + abc.constants.constant_multiname[name_index].toString(abc.constants, fullyQualifiedNames) + " super_index=" + supIndexStr + " flags=" + flags + " protectedNS=" + protectedNS + " interfaces=" + Helper.intArrToString(interfaces) + " method_index=" + iinit_index + "\r\n" + instance_traits.toString(abc, fullyQualifiedNames); } - public String getClassHeaderStr(ABC abc) { + public String getClassHeaderStr(ABC abc, List fullyQualifiedNames) { String supIndexStr = ""; if (super_index > 0) { - supIndexStr = " extends " + abc.constants.constant_multiname[super_index].getName(abc.constants);////+" flags="+flags+" protectedNS="+protectedNS+" interfaces="+Helper.intArrToString(interfaces)+" method_index="+iinit_index + supIndexStr = " extends " + abc.constants.constant_multiname[super_index].getName(abc.constants, fullyQualifiedNames);////+" flags="+flags+" protectedNS="+protectedNS+" interfaces="+Helper.intArrToString(interfaces)+" method_index="+iinit_index } String implStr = ""; if (interfaces.length > 0) { @@ -64,7 +66,7 @@ public class InstanceInfo { if (i > 0) { implStr += ", "; } - implStr += abc.constants.constant_multiname[interfaces[i]].getName(abc.constants); + implStr += abc.constants.constant_multiname[interfaces[i]].getName(abc.constants, fullyQualifiedNames); } } String modifiers; @@ -84,7 +86,7 @@ public class InstanceInfo { if (isInterface()) { objType = "interface "; } - return modifiers + objType + abc.constants.constant_multiname[name_index].getName(abc.constants) + supIndexStr + implStr; + return modifiers + objType + abc.constants.constant_multiname[name_index].getName(abc.constants, new ArrayList()/* No full names here*/) + supIndexStr + implStr; } public Multiname getName(ConstantPool constants) { diff --git a/trunk/src/com/jpexs/asdec/abc/types/MethodBody.java b/trunk/src/com/jpexs/asdec/abc/types/MethodBody.java index 91b8d0d2b..da4940ec9 100644 --- a/trunk/src/com/jpexs/asdec/abc/types/MethodBody.java +++ b/trunk/src/com/jpexs/asdec/abc/types/MethodBody.java @@ -25,6 +25,7 @@ import com.jpexs.asdec.abc.avm2.treemodel.TreeItem; import com.jpexs.asdec.abc.types.traits.Traits; import com.jpexs.asdec.helpers.Highlighting; import java.util.HashMap; +import java.util.List; import java.util.Stack; public class MethodBody implements Cloneable { @@ -76,7 +77,7 @@ public class MethodBody implements Cloneable { /*public String toString(boolean pcode, boolean isStatic, int classIndex, ABC abc, ConstantPool constants, MethodInfo method_info[], Stack scopeStack, boolean isStaticInitializer) { return toString(pcode, isStatic, classIndex, abc, constants, method_info, scopeStack, isStaticInitializer,false); }*/ - public String toString(boolean pcode, boolean isStatic, int classIndex, ABC abc, ConstantPool constants, MethodInfo method_info[], Stack scopeStack, boolean isStaticInitializer, boolean hilight) { + public String toString(boolean pcode, boolean isStatic, int classIndex, ABC abc, ConstantPool constants, MethodInfo method_info[], Stack scopeStack, boolean isStaticInitializer, boolean hilight, List fullyQualifiedNames) { String s = ""; //s+="method_info="+method_info+" max_stack="+max_stack+" max_regs="+max_regs+" scope_depth="+scope_depth+" max_scope="+max_scope; @@ -85,7 +86,7 @@ public class MethodBody implements Cloneable { s += code.toASMSource(constants, this); } else { try { - s += code.toSource(isStatic, classIndex, abc, constants, method_info, this, hilight, getLocalRegNames(abc), scopeStack, isStaticInitializer); + s += code.toSource(isStatic, classIndex, abc, constants, method_info, this, hilight, getLocalRegNames(abc), scopeStack, isStaticInitializer, fullyQualifiedNames); s = s.trim(); if (hilight) { s = Highlighting.hilighMethod(s, this.method_info); diff --git a/trunk/src/com/jpexs/asdec/abc/types/MethodInfo.java b/trunk/src/com/jpexs/asdec/abc/types/MethodInfo.java index 436c5e3c6..1048e98ba 100644 --- a/trunk/src/com/jpexs/asdec/abc/types/MethodInfo.java +++ b/trunk/src/com/jpexs/asdec/abc/types/MethodInfo.java @@ -21,6 +21,7 @@ import com.jpexs.asdec.abc.ABC; import com.jpexs.asdec.abc.avm2.ConstantPool; import com.jpexs.asdec.helpers.Helper; import java.util.HashMap; +import java.util.List; public class MethodInfo { @@ -179,7 +180,7 @@ public class MethodInfo { return "MethodInfo: param_types=" + Helper.intArrToString(param_types) + " ret_type=" + ret_type + " name_index=" + name_index + " flags=" + flags + " optional=" + optionalStr + " paramNames=" + Helper.intArrToString(paramNames); } - public String toString(ConstantPool constants) { + public String toString(ConstantPool constants, List fullyQualifiedNames) { String optionalStr = "["; if (optional != null) { for (int i = 0; i < optional.length; i++) { @@ -199,7 +200,7 @@ public class MethodInfo { if (param_types[i] == 0) { param_typesStr += "*"; } else { - param_typesStr += constants.constant_multiname[param_types[i]].toString(constants); + param_typesStr += constants.constant_multiname[param_types[i]].toString(constants, fullyQualifiedNames); } } @@ -215,7 +216,7 @@ public class MethodInfo { if (ret_type == 0) { ret_typeStr += "*"; } else { - ret_typeStr += constants.constant_multiname[ret_type].toString(constants); + ret_typeStr += constants.constant_multiname[ret_type].toString(constants, fullyQualifiedNames); } return "param_types=" + param_typesStr + " ret_type=" + ret_typeStr + " name=\"" + constants.constant_string[name_index] + "\" flags=" + flags + " optional=" + optionalStr + " paramNames=" + paramNamesStr; @@ -228,7 +229,7 @@ public class MethodInfo { return constants.constant_string[name_index]; } - public String getParamStr(ConstantPool constants, MethodBody body, ABC abc) { + public String getParamStr(ConstantPool constants, MethodBody body, ABC abc, List fullyQualifiedNames) { HashMap localRegNames = new HashMap(); if (body != null) { localRegNames = body.code.getLocalRegNamesFromDebug(abc); @@ -249,7 +250,7 @@ public class MethodInfo { if (param_types[i] == 0) { paramStr += "*"; } else { - paramStr += constants.constant_multiname[param_types[i]].getName(constants); + paramStr += constants.constant_multiname[param_types[i]].getName(constants, fullyQualifiedNames); } if (optional != null) { if (i >= param_types.length - optional.length) { @@ -272,11 +273,11 @@ public class MethodInfo { return paramStr; } - public String getReturnTypeStr(ConstantPool constants) { + public String getReturnTypeStr(ConstantPool constants, List fullyQualifiedNames) { if (ret_type == 0) { return "*"; } - return constants.constant_multiname[ret_type].getName(constants); + return constants.constant_multiname[ret_type].getName(constants, fullyQualifiedNames); } public void setBody(MethodBody body) { diff --git a/trunk/src/com/jpexs/asdec/abc/types/Multiname.java b/trunk/src/com/jpexs/asdec/abc/types/Multiname.java index ad4343974..159f9ac30 100644 --- a/trunk/src/com/jpexs/asdec/abc/types/Multiname.java +++ b/trunk/src/com/jpexs/asdec/abc/types/Multiname.java @@ -135,7 +135,7 @@ public class Multiname { } - public String toString(ConstantPool constants) { + public String toString(ConstantPool constants, List fullyQualifiedNames) { String kindStr = "?"; for (int k = 0; k < multinameKinds.length; k++) { if (multinameKinds[k] == kind) { @@ -166,15 +166,15 @@ public class Multiname { } String typeNameStr = ""; if (kind == TYPENAME) { - typeNameStr = typeNameToStr(constants); + typeNameStr = typeNameToStr(constants, fullyQualifiedNames); } return namespaceStr + nameStr + namespaceSetStr + typeNameStr; } - private String typeNameToStr(ConstantPool constants) { - String typeNameStr = constants.constant_multiname[qname_index].getName(constants); + private String typeNameToStr(ConstantPool constants, List fullyQualifiedNames) { + String typeNameStr = constants.constant_multiname[qname_index].getName(constants, fullyQualifiedNames); if (!params.isEmpty()) { typeNameStr += ".<"; for (int i = 0; i < params.size(); i++) { @@ -182,7 +182,7 @@ public class Multiname { typeNameStr += ","; } if (params.get(i) != 0) { //What does value 0 mean? - typeNameStr += constants.constant_multiname[params.get(i)].getName(constants); + typeNameStr += constants.constant_multiname[params.get(i)].getName(constants, fullyQualifiedNames); } } typeNameStr += ">"; @@ -190,9 +190,9 @@ public class Multiname { return typeNameStr; } - public String getName(ConstantPool constants) { + public String getName(ConstantPool constants, List fullyQualifiedNames) { if (kind == TYPENAME) { - return typeNameToStr(constants); + return typeNameToStr(constants, fullyQualifiedNames); } if (name_index == -1) { return ""; @@ -200,7 +200,11 @@ public class Multiname { if (name_index == 0) { return "*"; } else { - return (isAttribute() ? "@" : "") + constants.constant_string[name_index]; + String name = constants.constant_string[name_index]; + if ((fullyQualifiedNames != null) && fullyQualifiedNames.contains(name)) { + return getNameWithNamespace(constants); + } + return (isAttribute() ? "@" : "") + name; } } @@ -213,7 +217,7 @@ public class Multiname { ret += nsname + "."; } } - ret += getName(constants); + ret += getName(constants, null); return ret; } diff --git a/trunk/src/com/jpexs/asdec/abc/types/ScriptInfo.java b/trunk/src/com/jpexs/asdec/abc/types/ScriptInfo.java index d26127956..02b12a28d 100644 --- a/trunk/src/com/jpexs/asdec/abc/types/ScriptInfo.java +++ b/trunk/src/com/jpexs/asdec/abc/types/ScriptInfo.java @@ -20,6 +20,7 @@ import com.jpexs.asdec.abc.ABC; import com.jpexs.asdec.abc.types.traits.Trait; import com.jpexs.asdec.abc.types.traits.Traits; import com.jpexs.asdec.tags.DoABCTag; +import java.util.ArrayList; import java.util.List; public class ScriptInfo { @@ -32,8 +33,8 @@ public class ScriptInfo { return "method_index=" + init_index + "\r\n" + traits.toString(); } - public String toString(ABC abc) { - return "method_index=" + init_index + "\r\n" + traits.toString(abc); + public String toString(ABC abc, List fullyQualifiedNames) { + return "method_index=" + init_index + "\r\n" + traits.toString(abc, fullyQualifiedNames); } public String getPath(ABC abc) { @@ -41,13 +42,13 @@ public class ScriptInfo { Multiname name = t.getName(abc); Namespace ns = name.getNamespace(abc.constants); if (ns.kind == Namespace.KIND_PACKAGE) { - return ns.getName(abc.constants) + "." + name.getName(abc.constants); + return ns.getName(abc.constants) + "." + name.getName(abc.constants, new ArrayList()); } } return ""; } - public String convert(List abcTags,ABC abc, boolean pcode, boolean highlighting) { - return traits.convert(abcTags,abc, false, pcode, true, -1, highlighting); + public String convert(List abcTags, ABC abc, boolean pcode, boolean highlighting) { + return traits.convert(abcTags, abc, false, pcode, true, -1, highlighting, new ArrayList()); } } diff --git a/trunk/src/com/jpexs/asdec/abc/types/traits/Trait.java b/trunk/src/com/jpexs/asdec/abc/types/traits/Trait.java index 56abe2a8a..5f1bc2127 100644 --- a/trunk/src/com/jpexs/asdec/abc/types/traits/Trait.java +++ b/trunk/src/com/jpexs/asdec/abc/types/traits/Trait.java @@ -103,20 +103,20 @@ public abstract class Trait { return "name_index=" + name_index + " kind=" + kindType + " metadata=" + Helper.intArrToString(metadata); } - public String toString(ABC abc) { - return abc.constants.constant_multiname[name_index].toString(abc.constants) + " kind=" + kindType + " metadata=" + Helper.intArrToString(metadata); + public String toString(ABC abc, List fullyQualifiedNames) { + return abc.constants.constant_multiname[name_index].toString(abc.constants, fullyQualifiedNames) + " kind=" + kindType + " metadata=" + Helper.intArrToString(metadata); } - public String convert(List abcTags, ABC abc, boolean isStatic, boolean pcode, int classIndex, boolean highlight) { - return abc.constants.constant_multiname[name_index].toString(abc.constants) + " kind=" + kindType + " metadata=" + Helper.intArrToString(metadata); + public String convert(List abcTags, ABC abc, boolean isStatic, boolean pcode, 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(List abcTags, ABC abc, boolean isStatic, boolean pcod, int classIndex, boolean highlight) { - return makePackageFromIndex(abc, name_index, convert(abcTags, abc, isStatic, pcod, classIndex, highlight)); + public String convertPackaged(List abcTags, ABC abc, boolean isStatic, boolean pcod, int classIndex, boolean highlight, List fullyQualifiedNames) { + return makePackageFromIndex(abc, name_index, convert(abcTags, abc, isStatic, pcod, classIndex, highlight, fullyQualifiedNames)); } - public String convertHeader(List abcTags, ABC abc, boolean isStatic, boolean pcode, int classIndex, boolean highlight) { - return convert(abcTags, abc, isStatic, pcode, classIndex, highlight).trim(); + public String convertHeader(List abcTags, ABC abc, boolean isStatic, boolean pcode, int classIndex, boolean highlight, List fullyQualifiedNames) { + return convert(abcTags, abc, isStatic, pcode, classIndex, highlight, fullyQualifiedNames).trim(); } protected String makePackageFromIndex(ABC abc, int name_index, String value) { diff --git a/trunk/src/com/jpexs/asdec/abc/types/traits/TraitClass.java b/trunk/src/com/jpexs/asdec/abc/types/traits/TraitClass.java index 95cb0cb4a..8315c878c 100644 --- a/trunk/src/com/jpexs/asdec/abc/types/traits/TraitClass.java +++ b/trunk/src/com/jpexs/asdec/abc/types/traits/TraitClass.java @@ -28,6 +28,7 @@ import com.jpexs.asdec.abc.types.MethodBody; import com.jpexs.asdec.abc.types.Multiname; import com.jpexs.asdec.abc.types.Namespace; import com.jpexs.asdec.abc.types.NamespaceSet; +import com.jpexs.asdec.abc.types.ScriptInfo; import com.jpexs.asdec.helpers.Helper; import com.jpexs.asdec.helpers.Highlighting; import com.jpexs.asdec.tags.DoABCTag; @@ -44,8 +45,8 @@ public class TraitClass extends Trait { public int class_info; @Override - public String toString(ABC abc) { - return "Class " + abc.constants.constant_multiname[name_index].toString(abc.constants) + " slot=" + slot_id + " class_info=" + class_info + " metadata=" + Helper.intArrToString(metadata); + public String toString(ABC abc, List fullyQualifiedNames) { + return "Class " + abc.constants.constant_multiname[name_index].toString(abc.constants, fullyQualifiedNames) + " slot=" + slot_id + " class_info=" + class_info + " metadata=" + Helper.intArrToString(metadata); } private void parseImportsUsagesFromNS(List abcTags, ABC abc, List imports, List uses, int namespace_index, String ignorePackage, String name) { @@ -76,14 +77,14 @@ public class TraitClass extends Trait { if (newimport.contains(".")) { pkg = newimport.substring(0, newimport.lastIndexOf(".")); } - String usname=newimport; - if(usname.contains(".")){ - usname=usname.substring(usname.lastIndexOf(".")+1); + String usname = newimport; + if (usname.contains(".")) { + usname = usname.substring(usname.lastIndexOf(".") + 1); } if (!pkg.equals(ignorePackage)) { - imports.add(newimport); + imports.add(newimport); } - if(!uses.contains(usname)){ + if (!uses.contains(usname)) { uses.add(usname); } } @@ -95,133 +96,188 @@ public class TraitClass extends Trait { if (newimport.equals("-")) { newimport = ""; } - if (!newimport.equals("")) { - newimport += "." + name; - if (newimport.contains(":")) { - return; - } - if (!imports.contains(newimport)) { - String pkg = newimport.substring(0, newimport.lastIndexOf(".")); - if (!pkg.equals(ignorePackage)) { - imports.add(newimport); - } + //if (!newimport.equals("")) { + newimport += "." + name; + if (newimport.contains(":")) { + return; + } + if (!imports.contains(newimport)) { + String pkg = newimport.substring(0, newimport.lastIndexOf(".")); + if (!pkg.equals(ignorePackage)) { + imports.add(newimport); } } + //} } - private void parseImportsUsagesFromMultiname(List abcTags, ABC abc, List imports, List uses, Multiname m, String ignorePackage) { + private void parseImportsUsagesFromMultiname(List abcTags, ABC abc, List imports, List uses, Multiname m, String ignorePackage, List fullyQualifiedNames) { if (m != null) { Namespace ns = m.getNamespace(abc.constants); - String name = m.getName(abc.constants); + String name = m.getName(abc.constants, fullyQualifiedNames); NamespaceSet nss = m.getNamespaceSet(abc.constants); if (ns != null) { - parseImportsUsagesFromNS(abcTags, abc, imports,uses, m.namespace_index, ignorePackage, name); + parseImportsUsagesFromNS(abcTags, abc, imports, uses, m.namespace_index, ignorePackage, name); } if (nss != null) { for (int ni : nss.namespaces) { - parseImportsUsagesFromNS(abcTags, abc, imports,uses, ni, ignorePackage, name); + parseImportsUsagesFromNS(abcTags, abc, imports, uses, ni, ignorePackage, name); } } } } - private void parseImportsUsagesFromMethodInfo(List abcTags, ABC abc, int method_index, List imports, List uses, String ignorePackage) { + private void parseImportsUsagesFromMethodInfo(List abcTags, ABC abc, int method_index, List imports, List uses, String ignorePackage, List fullyQualifiedNames) { if (abc.method_info[method_index].ret_type != 0) { - parseImportsUsagesFromMultiname(abcTags, abc, imports,uses, abc.constants.constant_multiname[abc.method_info[method_index].ret_type], ignorePackage); + parseImportsUsagesFromMultiname(abcTags, abc, imports, uses, abc.constants.constant_multiname[abc.method_info[method_index].ret_type], ignorePackage, fullyQualifiedNames); } for (int t : abc.method_info[method_index].param_types) { if (t != 0) { - parseImportsUsagesFromMultiname(abcTags, abc, imports,uses, abc.constants.constant_multiname[t], ignorePackage); + parseImportsUsagesFromMultiname(abcTags, abc, imports, uses, abc.constants.constant_multiname[t], ignorePackage, fullyQualifiedNames); } } MethodBody body = abc.findBody(method_index); if (body != null) { for (ABCException ex : body.exceptions) { - parseImportsUsagesFromMultiname(abcTags, abc, imports,uses, abc.constants.constant_multiname[ex.type_index], ignorePackage); + parseImportsUsagesFromMultiname(abcTags, abc, imports, uses, abc.constants.constant_multiname[ex.type_index], ignorePackage, fullyQualifiedNames); } for (AVM2Instruction ins : body.code.code) { if (ins.definition instanceof NewFunctionIns) { - parseImportsUsagesFromMethodInfo(abcTags, abc, ins.operands[0], imports,uses, ignorePackage); + parseImportsUsagesFromMethodInfo(abcTags, abc, ins.operands[0], imports, uses, ignorePackage, fullyQualifiedNames); } for (int k = 0; k < ins.definition.operands.length; k++) { if (ins.definition.operands[k] == AVM2Code.DAT_MULTINAME_INDEX) { int multinameIndex = ins.operands[k]; - parseImportsUsagesFromMultiname(abcTags, abc, imports,uses, abc.constants.constant_multiname[multinameIndex], ignorePackage); + parseImportsUsagesFromMultiname(abcTags, abc, imports, uses, abc.constants.constant_multiname[multinameIndex], ignorePackage, fullyQualifiedNames); } } } } } - private void parseImportsUsagesFromTrait(List abcTags, ABC abc, Trait t, List imports, List uses, String ignorePackage) { + private void parseImportsUsagesFromTrait(List abcTags, ABC abc, Trait t, List imports, List uses, String ignorePackage, List fullyQualifiedNames) { if (t instanceof TraitMethodGetterSetter) { TraitMethodGetterSetter tm = (TraitMethodGetterSetter) t; + parseImportsUsagesFromMultiname(abcTags, abc, imports, uses, abc.constants.constant_multiname[tm.name_index], ignorePackage, fullyQualifiedNames); if (tm.method_info != 0) { - parseImportsUsagesFromMethodInfo(abcTags, abc, tm.method_info, imports,uses, ignorePackage); + parseImportsUsagesFromMethodInfo(abcTags, abc, tm.method_info, imports, uses, ignorePackage, fullyQualifiedNames); } } - parseImportsUsagesFromMultiname(abcTags, abc, imports,uses, t.getName(abc), ignorePackage); + parseImportsUsagesFromMultiname(abcTags, abc, imports, uses, t.getName(abc), ignorePackage, fullyQualifiedNames); if (t instanceof TraitSlotConst) { TraitSlotConst ts = (TraitSlotConst) t; - parseImportsUsagesFromMultiname(abcTags, abc, imports,uses, abc.constants.constant_multiname[ts.type_index], ignorePackage); + parseImportsUsagesFromMultiname(abcTags, abc, imports, uses, abc.constants.constant_multiname[ts.name_index], ignorePackage, fullyQualifiedNames); + parseImportsUsagesFromMultiname(abcTags, abc, imports, uses, abc.constants.constant_multiname[ts.type_index], ignorePackage, fullyQualifiedNames); } } - private List getImportsUsages(List abcTags, ABC abc,List imports,List uses) { + private List getImportsUsages(List abcTags, ABC abc, List imports, List uses, List fullyQualifiedNames) { //constructor - //parseImportFromMultiname(imports, constants.constant_multiname[instance_info[instanceIndex].name_index]); String packageName = abc.instance_info[class_info].getName(abc.constants).getNamespace(abc.constants).getName(abc.constants); + parseImportsUsagesFromMultiname(abcTags, abc, imports, uses, abc.constants.constant_multiname[abc.instance_info[class_info].name_index], packageName, fullyQualifiedNames); + if (abc.instance_info[class_info].super_index > 0) { - parseImportsUsagesFromMultiname(abcTags, abc, imports,uses, abc.constants.constant_multiname[abc.instance_info[class_info].super_index], packageName); + parseImportsUsagesFromMultiname(abcTags, abc, imports, uses, abc.constants.constant_multiname[abc.instance_info[class_info].super_index], packageName, fullyQualifiedNames); } for (int i : abc.instance_info[class_info].interfaces) { - parseImportsUsagesFromMultiname(abcTags, abc, imports,uses, abc.constants.constant_multiname[i], packageName); + parseImportsUsagesFromMultiname(abcTags, abc, imports, uses, abc.constants.constant_multiname[i], packageName, fullyQualifiedNames); } //static for (Trait t : abc.class_info[class_info].static_traits.traits) { - parseImportsUsagesFromTrait(abcTags, abc, t, imports, uses, packageName); + parseImportsUsagesFromTrait(abcTags, abc, t, imports, uses, packageName, fullyQualifiedNames); } //static initializer - parseImportsUsagesFromMethodInfo(abcTags, abc, abc.class_info[class_info].cinit_index, imports, uses, packageName); + parseImportsUsagesFromMethodInfo(abcTags, abc, abc.class_info[class_info].cinit_index, imports, uses, packageName, fullyQualifiedNames); //instance for (Trait t : abc.instance_info[class_info].instance_traits.traits) { - parseImportsUsagesFromTrait(abcTags, abc, t, imports, uses, packageName); + parseImportsUsagesFromTrait(abcTags, abc, t, imports, uses, packageName, fullyQualifiedNames); } //instance initializer - parseImportsUsagesFromMethodInfo(abcTags, abc, abc.instance_info[class_info].iinit_index, imports, uses, packageName); + parseImportsUsagesFromMethodInfo(abcTags, abc, abc.instance_info[class_info].iinit_index, imports, uses, packageName, fullyQualifiedNames); return imports; } @Override - public String convert(List abcTags, ABC abc, boolean isStatic, boolean pcode, int classIndex, boolean highlight) { + public String convert(List abcTags, ABC abc, boolean isStatic, boolean pcode, int classIndex, boolean highlight, List fullyQualifiedNames) { if (!highlight) { Highlighting.doHighlight = false; } ByteArrayOutputStream baos = new ByteArrayOutputStream(); PrintStream out = new PrintStream(baos); + String packageName = abc.instance_info[class_info].getName(abc.constants).getNamespace(abc.constants).getName(abc.constants); + + List namesInThisPackage = new ArrayList(); + for (DoABCTag tag : abcTags) { + for (ScriptInfo si : tag.abc.script_info) { + String path = si.getPath(tag.abc); + String pkg = ""; + String name = path; + if (path.contains(".")) { + pkg = path.substring(0, path.lastIndexOf(".")); + name = path.substring(path.lastIndexOf(".") + 1); + } + if (pkg.equals(packageName)) { + namesInThisPackage.add(name); + } + } + } //imports List imports = new ArrayList(); List uses = new ArrayList(); - getImportsUsages(abcTags, abc,imports,uses); + getImportsUsages(abcTags, abc, imports, uses, new ArrayList()); + + fullyQualifiedNames = new ArrayList(); + + List importnames = new ArrayList(); + importnames.addAll(namesInThisPackage); + for (String path : imports) { + String name = path; + String pkg = ""; + if (name.contains(".")) { + pkg = name.substring(0, name.lastIndexOf(".")); + name = name.substring(name.lastIndexOf(".") + 1); + } + if (importnames.contains(name)) { + fullyQualifiedNames.add(name); + } else { + importnames.add(name); + } + } + List imports2 = new ArrayList(); + for (String path : imports) { + String name = path; + String pkg = ""; + if (name.contains(".")) { + pkg = name.substring(0, name.lastIndexOf(".")); + name = name.substring(name.lastIndexOf(".") + 1); + } + + if ((!packageName.equals(pkg)) && (!fullyQualifiedNames.contains(name))) { + imports2.add(path); + } + } + imports = imports2; + for (String imp : imports) { - out.println(ABC.IDENT_STRING + "import " + imp + ";"); + if (!imp.startsWith(".")) { + out.println(ABC.IDENT_STRING + "import " + imp + ";"); + } } out.println(); for (String us : uses) { out.println(ABC.IDENT_STRING + "use namespace " + us + ";"); } out.println(); - + //class header - String classHeader = abc.instance_info[class_info].getClassHeaderStr(abc); + String classHeader = abc.instance_info[class_info].getClassHeaderStr(abc, fullyQualifiedNames); if (classHeader.startsWith("private ")) { classHeader = classHeader.substring("private ".length()); } @@ -234,7 +290,7 @@ public class TraitClass extends Trait { //if (class_info[i].cinit_index != 0) { if (ABC.AUTOINIT_STATIC_VARIABLES) { int bodyIndex = abc.findBodyIndex(abc.class_info[class_info].cinit_index); - List initializer = abc.bodies[bodyIndex].code.toTree(true, class_info, abc, abc.constants, abc.method_info, abc.bodies[bodyIndex], abc.bodies[bodyIndex].code.getLocalRegNamesFromDebug(abc)); + List initializer = abc.bodies[bodyIndex].code.toTree(true, class_info, abc, abc.constants, abc.method_info, abc.bodies[bodyIndex], abc.bodies[bodyIndex].code.getLocalRegNamesFromDebug(abc), fullyQualifiedNames); for (TreeItem ti : initializer) { if (ti instanceof SetPropertyTreeItem) { int multinameIndex = ((SetPropertyTreeItem) ti).propertyName.multinameIndex; @@ -263,7 +319,7 @@ public class TraitClass extends Trait { String bodyStr = ""; int bodyIndex = abc.findBodyIndex(abc.class_info[class_info].cinit_index); if (bodyIndex != -1) { - bodyStr = abc.bodies[bodyIndex].toString(pcode, true, class_info, abc, abc.constants, abc.method_info, new Stack(), true, highlight); + bodyStr = abc.bodies[bodyIndex].toString(pcode, true, class_info, abc, abc.constants, abc.method_info, new Stack(), true, highlight, fullyQualifiedNames); } if (Highlighting.stripHilights(bodyStr).equals("")) { toPrint = ABC.addTabs(bodyStr, 3); @@ -298,12 +354,12 @@ 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(pcode, false, class_info, abc, abc.constants, abc.method_info, new Stack(), false, highlight), 3); - constructorParams = abc.method_info[abc.instance_info[class_info].iinit_index].getParamStr(abc.constants, abc.bodies[bodyIndex], abc); + bodyStr = ABC.addTabs(abc.bodies[bodyIndex].toString(pcode, false, class_info, abc, abc.constants, abc.method_info, new Stack(), false, highlight, fullyQualifiedNames), 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); + constructorParams = abc.method_info[abc.instance_info[class_info].iinit_index].getParamStr(abc.constants, null, abc, fullyQualifiedNames); } - toPrint = ABC.IDENT_STRING + ABC.IDENT_STRING + modifier + "function " + abc.constants.constant_multiname[abc.instance_info[class_info].name_index].getName(abc.constants) + "(" + constructorParams + ") {\r\n" + bodyStr + "\r\n" + ABC.IDENT_STRING + ABC.IDENT_STRING + "}"; + toPrint = ABC.IDENT_STRING + ABC.IDENT_STRING + modifier + "function " + abc.constants.constant_multiname[abc.instance_info[class_info].name_index].getName(abc.constants, new ArrayList()/*do not want full names here*/) + "(" + constructorParams + ") {\r\n" + bodyStr + "\r\n" + ABC.IDENT_STRING + ABC.IDENT_STRING + "}"; if (highlight) { toPrint = Highlighting.hilighTrait(toPrint, abc.class_info[class_info].static_traits.traits.length + abc.instance_info[class_info].instance_traits.traits.length); } @@ -312,9 +368,9 @@ public class TraitClass extends Trait { //} //static variables,constants & methods - outTraits.add(abc.class_info[class_info].static_traits.convert(abcTags, abc, true, pcode, false, class_info, highlight)); + outTraits.add(abc.class_info[class_info].static_traits.convert(abcTags, abc, true, pcode, false, class_info, highlight, fullyQualifiedNames)); - outTraits.add(abc.instance_info[class_info].instance_traits.convert(abcTags, abc, false, pcode, false, class_info, highlight)); + outTraits.add(abc.instance_info[class_info].instance_traits.convert(abcTags, abc, false, pcode, false, 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/asdec/abc/types/traits/TraitFunction.java b/trunk/src/com/jpexs/asdec/abc/types/traits/TraitFunction.java index 4d2dfe365..87e0105ae 100644 --- a/trunk/src/com/jpexs/asdec/abc/types/traits/TraitFunction.java +++ b/trunk/src/com/jpexs/asdec/abc/types/traits/TraitFunction.java @@ -30,27 +30,27 @@ public class TraitFunction extends Trait { public int method_info; @Override - public String toString(ABC abc) { - return "Function " + abc.constants.constant_multiname[name_index].toString(abc.constants) + " slot=" + slot_index + " method_info=" + method_info + " metadata=" + Helper.intArrToString(metadata); + public String toString(ABC abc, List fullyQualifiedNames) { + return "Function " + abc.constants.constant_multiname[name_index].toString(abc.constants, fullyQualifiedNames) + " slot=" + slot_index + " method_info=" + method_info + " metadata=" + Helper.intArrToString(metadata); } @Override - public String convertHeader(List abcTags,ABC abc, boolean isStatic, boolean pcode, int classIndex, boolean highlight) { - String modifier = getModifiers(abcTags,abc, isStatic) + " "; + public String convertHeader(List abcTags, ABC abc, boolean isStatic, boolean pcode, int classIndex, boolean highlight, List fullyQualifiedNames) { + String modifier = getModifiers(abcTags, abc, isStatic) + " "; if (modifier.equals(" ")) { modifier = ""; } MethodBody body = abc.findBody(method_info); - return modifier + "function " + abc.constants.constant_multiname[name_index].getName(abc.constants) + "(" + abc.method_info[method_info].getParamStr(abc.constants, body, abc) + ") : " + abc.method_info[method_info].getReturnTypeStr(abc.constants); + return modifier + "function " + abc.constants.constant_multiname[name_index].getName(abc.constants, fullyQualifiedNames) + "(" + abc.method_info[method_info].getParamStr(abc.constants, body, abc, fullyQualifiedNames) + ") : " + abc.method_info[method_info].getReturnTypeStr(abc.constants, fullyQualifiedNames); } @Override - public String convert(List abcTags,ABC abc, boolean isStatic, boolean pcode, int classIndex, boolean highlight) { - String header = convertHeader(abcTags,abc, isStatic, pcode, classIndex, highlight); + public String convert(List abcTags, ABC abc, boolean isStatic, boolean pcode, int classIndex, boolean highlight, List fullyQualifiedNames) { + String header = convertHeader(abcTags, abc, isStatic, pcode, classIndex, highlight, fullyQualifiedNames); String bodyStr = ""; int bodyIndex = abc.findBodyIndex(method_info); if (bodyIndex != -1) { - bodyStr = ABC.addTabs(abc.bodies[bodyIndex].toString(pcode, isStatic, classIndex, abc, abc.constants, abc.method_info, new Stack(), false, highlight), 3); + bodyStr = ABC.addTabs(abc.bodies[bodyIndex].toString(pcode, isStatic, classIndex, abc, abc.constants, abc.method_info, new Stack(), false, highlight, fullyQualifiedNames), 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/asdec/abc/types/traits/TraitMethodGetterSetter.java b/trunk/src/com/jpexs/asdec/abc/types/traits/TraitMethodGetterSetter.java index 88c85e6fe..d8a4e3bf6 100644 --- a/trunk/src/com/jpexs/asdec/abc/types/traits/TraitMethodGetterSetter.java +++ b/trunk/src/com/jpexs/asdec/abc/types/traits/TraitMethodGetterSetter.java @@ -30,13 +30,13 @@ public class TraitMethodGetterSetter extends Trait { public int method_info; @Override - public String toString(ABC abc) { - return "0x" + Helper.formatAddress(fileOffset) + " " + Helper.byteArrToString(bytes) + " MethodGetterSetter " + abc.constants.constant_multiname[name_index].toString(abc.constants) + " disp_id=" + disp_id + " method_info=" + method_info + " metadata=" + Helper.intArrToString(metadata); + public String toString(ABC abc, List fullyQualifiedNames) { + return "0x" + Helper.formatAddress(fileOffset) + " " + Helper.byteArrToString(bytes) + " MethodGetterSetter " + abc.constants.constant_multiname[name_index].toString(abc.constants, fullyQualifiedNames) + " disp_id=" + disp_id + " method_info=" + method_info + " metadata=" + Helper.intArrToString(metadata); } @Override - public String convertHeader(List abcTags,ABC abc, boolean isStatic, boolean pcode, int classIndex, boolean highlight) { - String modifier = getModifiers(abcTags,abc, isStatic) + " "; + public String convertHeader(List abcTags, ABC abc, boolean isStatic, boolean pcode, int classIndex, boolean highlight, List fullyQualifiedNames) { + String modifier = getModifiers(abcTags, abc, isStatic) + " "; if (modifier.equals(" ")) { modifier = ""; } @@ -48,18 +48,18 @@ public class TraitMethodGetterSetter extends Trait { addKind = "set "; } MethodBody body = abc.findBody(method_info); - return modifier + "function " + addKind + getName(abc).getName(abc.constants) + "(" + abc.method_info[method_info].getParamStr(abc.constants, body, abc) + ") : " + abc.method_info[method_info].getReturnTypeStr(abc.constants); + return modifier + "function " + addKind + getName(abc).getName(abc.constants, fullyQualifiedNames) + "(" + abc.method_info[method_info].getParamStr(abc.constants, body, abc, fullyQualifiedNames) + ") : " + abc.method_info[method_info].getReturnTypeStr(abc.constants, fullyQualifiedNames); } @Override - public String convert(List abcTags,ABC abc, boolean isStatic, boolean pcode, int classIndex, boolean highlight) { - String header = convertHeader(abcTags,abc, isStatic, pcode, classIndex, highlight); + public String convert(List abcTags, ABC abc, boolean isStatic, boolean pcode, int classIndex, boolean highlight, List fullyQualifiedNames) { + String header = convertHeader(abcTags, abc, isStatic, pcode, classIndex, highlight, fullyQualifiedNames); String bodyStr = ""; int bodyIndex = abc.findBodyIndex(method_info); if (bodyIndex != -1) { - bodyStr = ABC.addTabs(abc.bodies[bodyIndex].toString(pcode, isStatic, classIndex, abc, abc.constants, abc.method_info, new Stack(), false, highlight), 3); + bodyStr = ABC.addTabs(abc.bodies[bodyIndex].toString(pcode, isStatic, classIndex, abc, abc.constants, abc.method_info, new Stack(), false, highlight, fullyQualifiedNames), 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/asdec/abc/types/traits/TraitSlotConst.java b/trunk/src/com/jpexs/asdec/abc/types/traits/TraitSlotConst.java index 64f4954ec..0dd1d46a0 100644 --- a/trunk/src/com/jpexs/asdec/abc/types/traits/TraitSlotConst.java +++ b/trunk/src/com/jpexs/asdec/abc/types/traits/TraitSlotConst.java @@ -35,25 +35,25 @@ public class TraitSlotConst extends Trait { public TreeItem assignedValue; @Override - public String toString(ABC abc) { + public String toString(ABC abc, List fullyQualifiedNames) { String typeStr = "*"; if (type_index > 0) { - typeStr = abc.constants.constant_multiname[type_index].toString(abc.constants); + typeStr = abc.constants.constant_multiname[type_index].toString(abc.constants, fullyQualifiedNames); } - return "0x" + Helper.formatAddress(fileOffset) + " " + Helper.byteArrToString(bytes) + " SlotConst " + abc.constants.constant_multiname[name_index].toString(abc.constants) + " slot=" + slot_id + " type=" + typeStr + " value=" + (new ValueKind(value_index, value_kind)).toString(abc.constants) + " metadata=" + Helper.intArrToString(metadata); + return "0x" + Helper.formatAddress(fileOffset) + " " + Helper.byteArrToString(bytes) + " SlotConst " + abc.constants.constant_multiname[name_index].toString(abc.constants, fullyQualifiedNames) + " slot=" + slot_id + " type=" + typeStr + " value=" + (new ValueKind(value_index, value_kind)).toString(abc.constants) + " metadata=" + Helper.intArrToString(metadata); } - public String getType(ConstantPool constants) { + public String getType(ConstantPool constants, List fullyQualifiedNames) { String typeStr = "*"; if (type_index > 0) { - typeStr = constants.constant_multiname[type_index].getName(constants); + typeStr = constants.constant_multiname[type_index].getName(constants, fullyQualifiedNames); } return typeStr; } - public String getNameValueStr(ABC abc) { + public String getNameValueStr(ABC abc, List fullyQualifiedNames) { - String typeStr = getType(abc.constants); + String typeStr = getType(abc.constants, fullyQualifiedNames); if (typeStr.equals("*")) { typeStr = ""; } else { @@ -67,7 +67,7 @@ public class TraitSlotConst extends Trait { } if (assignedValue != null) { - valueStr = " = " + Highlighting.stripHilights(assignedValue.toString(abc.constants, new HashMap())); + valueStr = " = " + Highlighting.stripHilights(assignedValue.toString(abc.constants, new HashMap(), fullyQualifiedNames)); } String slotconst = "var"; if (kindType == TRAIT_CONST) { @@ -76,24 +76,24 @@ public class TraitSlotConst extends Trait { if (val != null && val.isNamespace()) { slotconst = "namespace"; } - return slotconst + " " + getName(abc).getName(abc.constants) + typeStr + valueStr + ";"; + return slotconst + " " + getName(abc).getName(abc.constants, fullyQualifiedNames) + typeStr + valueStr + ";"; } - public boolean isNamespace(){ + public boolean isNamespace() { if (value_kind != 0) { ValueKind val = new ValueKind(value_index, value_kind); return val.isNamespace(); } return false; } - + @Override - public String convert(List abcTags,ABC abc, boolean isStatic, boolean pcode, int classIndex, boolean highlight) { - String modifier = getModifiers(abcTags,abc, isStatic) + " "; + public String convert(List abcTags, ABC abc, boolean isStatic, boolean pcode, int classIndex, boolean highlight, List fullyQualifiedNames) { + String modifier = getModifiers(abcTags, abc, isStatic) + " "; if (modifier.equals(" ")) { modifier = ""; } - return ABC.IDENT_STRING + ABC.IDENT_STRING + modifier + getNameValueStr(abc); + return ABC.IDENT_STRING + ABC.IDENT_STRING + modifier + getNameValueStr(abc, fullyQualifiedNames); } public boolean isConst() { diff --git a/trunk/src/com/jpexs/asdec/abc/types/traits/Traits.java b/trunk/src/com/jpexs/asdec/abc/types/traits/Traits.java index 1ad3248be..0d12147cb 100644 --- a/trunk/src/com/jpexs/asdec/abc/types/traits/Traits.java +++ b/trunk/src/com/jpexs/asdec/abc/types/traits/Traits.java @@ -37,18 +37,18 @@ public class Traits { return s; } - public String toString(ABC abc) { + public String toString(ABC abc, List fullyQualifiedNames) { String s = ""; for (int t = 0; t < traits.length; t++) { if (t > 0) { s += "\r\n"; } - s += traits[t].toString(abc); + s += traits[t].toString(abc, fullyQualifiedNames); } return s; } - public String convert(List abcTags,ABC abc, boolean isStatic, boolean pcode, boolean makePackages, int classIndex, boolean highlighting) { + public String convert(List abcTags, ABC abc, boolean isStatic, boolean pcode, boolean makePackages, int classIndex, boolean highlighting, List fullyQualifiedNames) { String s = ""; for (int t = 0; t < traits.length; t++) { if (t > 0) { @@ -56,9 +56,9 @@ public class Traits { } String plus; if (makePackages) { - plus = traits[t].convertPackaged(abcTags,abc, isStatic, pcode, classIndex, highlighting); + plus = traits[t].convertPackaged(abcTags, abc, isStatic, pcode, classIndex, highlighting, fullyQualifiedNames); } else { - plus = traits[t].convert(abcTags,abc, isStatic, pcode, classIndex, highlighting); + plus = traits[t].convert(abcTags, abc, isStatic, pcode, classIndex, highlighting, fullyQualifiedNames); } if (highlighting) { int h = t; diff --git a/trunk/src/com/jpexs/asdec/abc/usages/ClassNameMultinameUsage.java b/trunk/src/com/jpexs/asdec/abc/usages/ClassNameMultinameUsage.java index 156258d30..f2a7b77f2 100644 --- a/trunk/src/com/jpexs/asdec/abc/usages/ClassNameMultinameUsage.java +++ b/trunk/src/com/jpexs/asdec/abc/usages/ClassNameMultinameUsage.java @@ -31,7 +31,7 @@ public class ClassNameMultinameUsage extends InsideClassMultinameUsage { } @Override - public String toString(List abcTags,ABC abc) { + public String toString(List abcTags, ABC abc) { return "class " + abc.constants.constant_multiname[abc.instance_info[classIndex].name_index].getNameWithNamespace(abc.constants); } } diff --git a/trunk/src/com/jpexs/asdec/abc/usages/ConstVarMultinameUsage.java b/trunk/src/com/jpexs/asdec/abc/usages/ConstVarMultinameUsage.java index c2d153310..4864134d2 100644 --- a/trunk/src/com/jpexs/asdec/abc/usages/ConstVarMultinameUsage.java +++ b/trunk/src/com/jpexs/asdec/abc/usages/ConstVarMultinameUsage.java @@ -21,6 +21,7 @@ import com.jpexs.asdec.abc.types.traits.TraitMethodGetterSetter; import com.jpexs.asdec.abc.types.traits.TraitSlotConst; import com.jpexs.asdec.abc.types.traits.Traits; import com.jpexs.asdec.tags.DoABCTag; +import java.util.ArrayList; import java.util.List; /** @@ -34,14 +35,14 @@ public abstract class ConstVarMultinameUsage extends TraitMultinameUsage { } @Override - public String toString(List abcTags,ABC abc) { - return super.toString(abcTags,abc) + " " + public String toString(List abcTags, ABC abc) { + return super.toString(abcTags, abc) + " " + (parentTraitIndex > -1 ? (isStatic - ? (((TraitMethodGetterSetter) abc.class_info[classIndex].static_traits.traits[parentTraitIndex]).convertHeader(abcTags,abc, isStatic, false, classIndex, false)) - : (((TraitMethodGetterSetter) abc.instance_info[classIndex].instance_traits.traits[parentTraitIndex]).convertHeader(abcTags,abc, isStatic, false, classIndex, false))) + ? (((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()))) : "") - + ((TraitSlotConst) traits.traits[traitIndex]).convertHeader(abcTags,abc, isStatic, false, classIndex, false); + + ((TraitSlotConst) traits.traits[traitIndex]).convertHeader(abcTags, abc, isStatic, false, classIndex, false, new ArrayList()); } public int getTraitIndex() { diff --git a/trunk/src/com/jpexs/asdec/abc/usages/ConstVarNameMultinameUsage.java b/trunk/src/com/jpexs/asdec/abc/usages/ConstVarNameMultinameUsage.java index 2dac6edb9..c9cb432c4 100644 --- a/trunk/src/com/jpexs/asdec/abc/usages/ConstVarNameMultinameUsage.java +++ b/trunk/src/com/jpexs/asdec/abc/usages/ConstVarNameMultinameUsage.java @@ -32,7 +32,7 @@ public class ConstVarNameMultinameUsage extends ConstVarMultinameUsage { } @Override - public String toString(List abcTags,ABC abc) { - return super.toString(abcTags,abc) + " name"; + public String toString(List abcTags, ABC abc) { + return super.toString(abcTags, abc) + " name"; } } diff --git a/trunk/src/com/jpexs/asdec/abc/usages/ConstVarTypeMultinameUsage.java b/trunk/src/com/jpexs/asdec/abc/usages/ConstVarTypeMultinameUsage.java index 1e8c1809a..a94e7c179 100644 --- a/trunk/src/com/jpexs/asdec/abc/usages/ConstVarTypeMultinameUsage.java +++ b/trunk/src/com/jpexs/asdec/abc/usages/ConstVarTypeMultinameUsage.java @@ -32,7 +32,7 @@ public class ConstVarTypeMultinameUsage extends ConstVarMultinameUsage { } @Override - public String toString(List abcTags,ABC abc) { - return super.toString(abcTags,abc) + " type"; + public String toString(List abcTags, ABC abc) { + return super.toString(abcTags, abc) + " type"; } } diff --git a/trunk/src/com/jpexs/asdec/abc/usages/ExtendsMultinameUsage.java b/trunk/src/com/jpexs/asdec/abc/usages/ExtendsMultinameUsage.java index cb98f1242..417c873e3 100644 --- a/trunk/src/com/jpexs/asdec/abc/usages/ExtendsMultinameUsage.java +++ b/trunk/src/com/jpexs/asdec/abc/usages/ExtendsMultinameUsage.java @@ -31,7 +31,7 @@ public class ExtendsMultinameUsage extends InsideClassMultinameUsage { } @Override - public String toString(List abcTags,ABC abc) { - return super.toString(abcTags,abc) + " extends"; + public String toString(List abcTags, ABC abc) { + return super.toString(abcTags, abc) + " extends"; } } diff --git a/trunk/src/com/jpexs/asdec/abc/usages/ImplementsMultinameUsage.java b/trunk/src/com/jpexs/asdec/abc/usages/ImplementsMultinameUsage.java index a588838fc..00d0cbb90 100644 --- a/trunk/src/com/jpexs/asdec/abc/usages/ImplementsMultinameUsage.java +++ b/trunk/src/com/jpexs/asdec/abc/usages/ImplementsMultinameUsage.java @@ -31,7 +31,7 @@ public class ImplementsMultinameUsage extends InsideClassMultinameUsage { } @Override - public String toString(List abcTags,ABC abc) { - return super.toString(abcTags,abc) + " implements"; + public String toString(List abcTags, ABC abc) { + return super.toString(abcTags, abc) + " implements"; } } diff --git a/trunk/src/com/jpexs/asdec/abc/usages/InsideClassMultinameUsage.java b/trunk/src/com/jpexs/asdec/abc/usages/InsideClassMultinameUsage.java index 164a76a20..2dd5cad3f 100644 --- a/trunk/src/com/jpexs/asdec/abc/usages/InsideClassMultinameUsage.java +++ b/trunk/src/com/jpexs/asdec/abc/usages/InsideClassMultinameUsage.java @@ -34,7 +34,7 @@ public abstract class InsideClassMultinameUsage extends MultinameUsage { this.classIndex = classIndex; } - public String toString(List abcTags,ABC abc) { + public String toString(List abcTags, ABC abc) { return "class " + abc.constants.constant_multiname[abc.instance_info[classIndex].name_index].getNameWithNamespace(abc.constants); } diff --git a/trunk/src/com/jpexs/asdec/abc/usages/MethodBodyMultinameUsage.java b/trunk/src/com/jpexs/asdec/abc/usages/MethodBodyMultinameUsage.java index 39a56a9a2..fd6448a84 100644 --- a/trunk/src/com/jpexs/asdec/abc/usages/MethodBodyMultinameUsage.java +++ b/trunk/src/com/jpexs/asdec/abc/usages/MethodBodyMultinameUsage.java @@ -32,7 +32,7 @@ public class MethodBodyMultinameUsage extends MethodMultinameUsage { } @Override - public String toString(List abcTags,ABC abc) { - return super.toString(abcTags,abc) + " body"; + public String toString(List abcTags, ABC abc) { + return super.toString(abcTags, abc) + " body"; } } diff --git a/trunk/src/com/jpexs/asdec/abc/usages/MethodMultinameUsage.java b/trunk/src/com/jpexs/asdec/abc/usages/MethodMultinameUsage.java index 18ceac248..a7ede60ee 100644 --- a/trunk/src/com/jpexs/asdec/abc/usages/MethodMultinameUsage.java +++ b/trunk/src/com/jpexs/asdec/abc/usages/MethodMultinameUsage.java @@ -20,6 +20,7 @@ import com.jpexs.asdec.abc.ABC; import com.jpexs.asdec.abc.types.traits.TraitMethodGetterSetter; import com.jpexs.asdec.abc.types.traits.Traits; import com.jpexs.asdec.tags.DoABCTag; +import java.util.ArrayList; import java.util.List; /** @@ -40,17 +41,17 @@ public abstract class MethodMultinameUsage extends TraitMultinameUsage { } @Override - public String toString(List abcTags,ABC abc) { - return super.toString(abcTags,abc) + " " + (isInitializer + public String toString(List abcTags, ABC abc) { + return super.toString(abcTags, abc) + " " + (isInitializer ? (isStatic ? "class initializer" : "instance initializer") : ((parentTraitIndex > -1 ? (isStatic - ? (((TraitMethodGetterSetter) abc.class_info[classIndex].static_traits.traits[parentTraitIndex]).convertHeader(abcTags,abc, isStatic, false, classIndex, false)) - : (((TraitMethodGetterSetter) abc.instance_info[classIndex].instance_traits.traits[parentTraitIndex]).convertHeader(abcTags,abc, isStatic, false, classIndex, false))) + " " + ? (((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) traits.traits[traitIndex]).convertHeader(abcTags,abc, isStatic, false, classIndex, false)))); + + (((TraitMethodGetterSetter) traits.traits[traitIndex]).convertHeader(abcTags, abc, isStatic, false, classIndex, false, new ArrayList())))); } public int getTraitIndex() { diff --git a/trunk/src/com/jpexs/asdec/abc/usages/MethodNameMultinameUsage.java b/trunk/src/com/jpexs/asdec/abc/usages/MethodNameMultinameUsage.java index d4a9d62f5..b256c578e 100644 --- a/trunk/src/com/jpexs/asdec/abc/usages/MethodNameMultinameUsage.java +++ b/trunk/src/com/jpexs/asdec/abc/usages/MethodNameMultinameUsage.java @@ -32,7 +32,7 @@ public class MethodNameMultinameUsage extends MethodMultinameUsage { } @Override - public String toString(List abcTags,ABC abc) { - return super.toString(abcTags,abc) + " name"; + public String toString(List abcTags, ABC abc) { + return super.toString(abcTags, abc) + " name"; } } diff --git a/trunk/src/com/jpexs/asdec/abc/usages/MethodParamsMultinameUsage.java b/trunk/src/com/jpexs/asdec/abc/usages/MethodParamsMultinameUsage.java index a96c18cc6..6bc184590 100644 --- a/trunk/src/com/jpexs/asdec/abc/usages/MethodParamsMultinameUsage.java +++ b/trunk/src/com/jpexs/asdec/abc/usages/MethodParamsMultinameUsage.java @@ -32,7 +32,7 @@ public class MethodParamsMultinameUsage extends MethodMultinameUsage { } @Override - public String toString(List abcTags,ABC abc) { - return super.toString(abcTags,abc) + " params"; + public String toString(List abcTags, ABC abc) { + return super.toString(abcTags, abc) + " params"; } } diff --git a/trunk/src/com/jpexs/asdec/abc/usages/MethodReturnTypeMultinameUsage.java b/trunk/src/com/jpexs/asdec/abc/usages/MethodReturnTypeMultinameUsage.java index b287ddab1..38c5a4311 100644 --- a/trunk/src/com/jpexs/asdec/abc/usages/MethodReturnTypeMultinameUsage.java +++ b/trunk/src/com/jpexs/asdec/abc/usages/MethodReturnTypeMultinameUsage.java @@ -32,7 +32,7 @@ public class MethodReturnTypeMultinameUsage extends MethodMultinameUsage { } @Override - public String toString(List abcTags,ABC abc) { - return super.toString(abcTags,abc) + " return type"; + public String toString(List abcTags, ABC abc) { + return super.toString(abcTags, abc) + " return type"; } } diff --git a/trunk/src/com/jpexs/asdec/abc/usages/MultinameUsage.java b/trunk/src/com/jpexs/asdec/abc/usages/MultinameUsage.java index c64788c17..b34e29e21 100644 --- a/trunk/src/com/jpexs/asdec/abc/usages/MultinameUsage.java +++ b/trunk/src/com/jpexs/asdec/abc/usages/MultinameUsage.java @@ -26,5 +26,5 @@ import java.util.List; */ public abstract class MultinameUsage { - public abstract String toString(List abcTags,ABC abc); + public abstract String toString(List abcTags, ABC abc); } diff --git a/trunk/src/com/jpexs/asdec/abc/usages/TypeNameMultinameUsage.java b/trunk/src/com/jpexs/asdec/abc/usages/TypeNameMultinameUsage.java index 8f6676120..d96777100 100644 --- a/trunk/src/com/jpexs/asdec/abc/usages/TypeNameMultinameUsage.java +++ b/trunk/src/com/jpexs/asdec/abc/usages/TypeNameMultinameUsage.java @@ -18,6 +18,7 @@ package com.jpexs.asdec.abc.usages; import com.jpexs.asdec.abc.ABC; import com.jpexs.asdec.tags.DoABCTag; +import java.util.ArrayList; import java.util.List; /** @@ -33,7 +34,7 @@ public class TypeNameMultinameUsage extends MultinameUsage { } @Override - public String toString(List abcTags,ABC abc) { - return "TypeName " + abc.constants.constant_multiname[typename_index].toString(abc.constants); + public String toString(List abcTags, ABC abc) { + return "TypeName " + abc.constants.constant_multiname[typename_index].toString(abc.constants, new ArrayList()); } }