mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-24 22:11:39 +00:00
AS3: better imports
AS3: Types with same name shown with namespace
This commit is contained in:
@@ -297,18 +297,18 @@ public class SWF {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
List<DoABCTag> abcTags=new ArrayList<DoABCTag>();
|
List<DoABCTag> abcTags = new ArrayList<DoABCTag>();
|
||||||
for (Tag t : tags) {
|
for (Tag t : tags) {
|
||||||
if (t instanceof DoABCTag) {
|
if (t instanceof DoABCTag) {
|
||||||
abcTags.add((DoABCTag)t);
|
abcTags.add((DoABCTag) t);
|
||||||
asV3Found = true;
|
asV3Found = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for(DoABCTag t:abcTags){
|
for (DoABCTag t : abcTags) {
|
||||||
t.abc.addEventListener(evl);
|
t.abc.addEventListener(evl);
|
||||||
t.abc.export(outdir, isPcode,abcTags);
|
t.abc.export(outdir, isPcode, abcTags);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!asV3Found) {
|
if (!asV3Found) {
|
||||||
List<Object> list2 = new ArrayList<Object>();
|
List<Object> list2 = new ArrayList<Object>();
|
||||||
list2.addAll(tags);
|
list2.addAll(tags);
|
||||||
|
|||||||
@@ -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.TraitSlotConst;
|
||||||
import com.jpexs.asdec.abc.types.traits.Traits;
|
import com.jpexs.asdec.abc.types.traits.Traits;
|
||||||
import com.jpexs.asdec.abc.usages.*;
|
import com.jpexs.asdec.abc.usages.*;
|
||||||
import com.jpexs.asdec.helpers.Helper;
|
|
||||||
import com.jpexs.asdec.tags.DoABCTag;
|
import com.jpexs.asdec.tags.DoABCTag;
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -382,11 +381,11 @@ public class ABC {
|
|||||||
|
|
||||||
public MethodBody findBodyByClassAndName(String className, String methodName) {
|
public MethodBody findBodyByClassAndName(String className, String methodName) {
|
||||||
for (int i = 0; i < instance_info.length; i++) {
|
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<String>()))) {
|
||||||
for (Trait t : instance_info[i].instance_traits.traits) {
|
for (Trait t : instance_info[i].instance_traits.traits) {
|
||||||
if (t instanceof TraitMethodGetterSetter) {
|
if (t instanceof TraitMethodGetterSetter) {
|
||||||
TraitMethodGetterSetter t2 = (TraitMethodGetterSetter) t;
|
TraitMethodGetterSetter t2 = (TraitMethodGetterSetter) t;
|
||||||
if (methodName.equals(t2.getName(this).getName(constants))) {
|
if (methodName.equals(t2.getName(this).getName(constants, new ArrayList<String>()))) {
|
||||||
for (MethodBody body : bodies) {
|
for (MethodBody body : bodies) {
|
||||||
if (body.method_info == t2.method_info) {
|
if (body.method_info == t2.method_info) {
|
||||||
return body;
|
return body;
|
||||||
@@ -399,11 +398,11 @@ public class ABC {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (int i = 0; i < class_info.length; i++) {
|
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<String>()))) {
|
||||||
for (Trait t : class_info[i].static_traits.traits) {
|
for (Trait t : class_info[i].static_traits.traits) {
|
||||||
if (t instanceof TraitMethodGetterSetter) {
|
if (t instanceof TraitMethodGetterSetter) {
|
||||||
TraitMethodGetterSetter t2 = (TraitMethodGetterSetter) t;
|
TraitMethodGetterSetter t2 = (TraitMethodGetterSetter) t;
|
||||||
if (methodName.equals(t2.getName(this).getName(constants))) {
|
if (methodName.equals(t2.getName(this).getName(constants, new ArrayList<String>()))) {
|
||||||
for (MethodBody body : bodies) {
|
for (MethodBody body : bodies) {
|
||||||
if (body.method_info == t2.method_info) {
|
if (body.method_info == t2.method_info) {
|
||||||
return body;
|
return body;
|
||||||
@@ -484,8 +483,8 @@ public class ABC {
|
|||||||
if (t instanceof TraitSlotConst) {
|
if (t instanceof TraitSlotConst) {
|
||||||
TraitSlotConst s = ((TraitSlotConst) t);
|
TraitSlotConst s = ((TraitSlotConst) t);
|
||||||
if (s.isNamespace()) {
|
if (s.isNamespace()) {
|
||||||
String key=constants.constant_namespace[s.value_index].getName(constants);
|
String key = constants.constant_namespace[s.value_index].getName(constants);
|
||||||
String val=constants.constant_multiname[s.name_index].getNameWithNamespace(constants);
|
String val = constants.constant_multiname[s.name_index].getNameWithNamespace(constants);
|
||||||
namespaceMap.put(key, val);
|
namespaceMap.put(key, val);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -497,7 +496,7 @@ public class ABC {
|
|||||||
if (ns.equals("http://www.adobe.com/2006/actionscript/flash/proxy")) {
|
if (ns.equals("http://www.adobe.com/2006/actionscript/flash/proxy")) {
|
||||||
return "flash.utils.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 "-";
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
@@ -507,16 +506,16 @@ public class ABC {
|
|||||||
if (namespaceMap.containsKey(value)) {
|
if (namespaceMap.containsKey(value)) {
|
||||||
return namespaceMap.get(value);
|
return namespaceMap.get(value);
|
||||||
} else {
|
} else {
|
||||||
String ns=builtInNs(value);
|
String ns = builtInNs(value);
|
||||||
if(ns==null){
|
if (ns == null) {
|
||||||
return "";
|
return "";
|
||||||
}else{
|
} else {
|
||||||
return ns;
|
return ns;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void export(String directory, boolean pcode,List<DoABCTag> abcList) throws IOException {
|
public void export(String directory, boolean pcode, List<DoABCTag> abcList) throws IOException {
|
||||||
for (int i = 0; i < script_info.length; i++) {
|
for (int i = 0; i < script_info.length; i++) {
|
||||||
String path = script_info[i].getPath(this);
|
String path = script_info[i].getPath(this);
|
||||||
String packageName = path.substring(0, path.lastIndexOf("."));
|
String packageName = path.substring(0, path.lastIndexOf("."));
|
||||||
@@ -533,7 +532,7 @@ public class ABC {
|
|||||||
}
|
}
|
||||||
String fileName = outDir.toString() + File.separator + className + ".as";
|
String fileName = outDir.toString() + File.separator + className + ".as";
|
||||||
FileOutputStream fos = new FileOutputStream(fileName);
|
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();
|
fos.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -542,19 +541,19 @@ public class ABC {
|
|||||||
PrintStream output = new PrintStream(os);
|
PrintStream output = new PrintStream(os);
|
||||||
constants.dump(output);
|
constants.dump(output);
|
||||||
for (int i = 0; i < method_info.length; i++) {
|
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<String>()));
|
||||||
}
|
}
|
||||||
for (int i = 0; i < metadata_info.length; i++) {
|
for (int i = 0; i < metadata_info.length; i++) {
|
||||||
output.println("MetadataInfo[" + i + "]:" + metadata_info[i].toString(constants));
|
output.println("MetadataInfo[" + i + "]:" + metadata_info[i].toString(constants));
|
||||||
}
|
}
|
||||||
for (int i = 0; i < instance_info.length; i++) {
|
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<String>()));
|
||||||
}
|
}
|
||||||
for (int i = 0; i < class_info.length; i++) {
|
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<String>()));
|
||||||
}
|
}
|
||||||
for (int i = 0; i < script_info.length; i++) {
|
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<String>()));
|
||||||
}
|
}
|
||||||
for (int i = 0; i < bodies.length; i++) {
|
for (int i = 0; i < bodies.length; i++) {
|
||||||
output.println("MethodBody[" + i + "]:"); //+ bodies[i].toString(this, constants, method_info));
|
output.println("MethodBody[" + i + "]:"); //+ bodies[i].toString(this, constants, method_info));
|
||||||
|
|||||||
@@ -683,7 +683,7 @@ public class AVM2Code {
|
|||||||
String s = "";
|
String s = "";
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (AVM2Instruction instruction : code) {
|
for (AVM2Instruction instruction : code) {
|
||||||
s += Helper.formatAddress(i) + " " + instruction.toString(constants) + "\r\n";
|
s += Helper.formatAddress(i) + " " + instruction.toString(constants, new ArrayList<String>()) + "\r\n";
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
@@ -703,8 +703,8 @@ public class AVM2Code {
|
|||||||
public String toASMSource(ConstantPool constants, MethodBody body) {
|
public String toASMSource(ConstantPool constants, MethodBody body) {
|
||||||
String ret = "";
|
String ret = "";
|
||||||
for (int e = 0; e < body.exceptions.length; e++) {
|
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)) + "\" "
|
ret += "exception " + e + " m[" + body.exceptions[e].name_index + "]\"" + Helper.escapeString(body.exceptions[e].getVarName(constants, new ArrayList<String>())) + "\" "
|
||||||
+ "m[" + body.exceptions[e].type_index + "]\"" + Helper.escapeString(body.exceptions[e].getTypeName(constants)) + "\"\n";
|
+ "m[" + body.exceptions[e].type_index + "]\"" + Helper.escapeString(body.exceptions[e].getTypeName(constants, new ArrayList<String>())) + "\"\n";
|
||||||
}
|
}
|
||||||
List<Long> offsets = new ArrayList<Long>();
|
List<Long> offsets = new ArrayList<Long>();
|
||||||
for (AVM2Instruction ins : code) {
|
for (AVM2Instruction ins : code) {
|
||||||
@@ -726,7 +726,7 @@ public class AVM2Code {
|
|||||||
ret += "exceptiontarget " + e + ":";
|
ret += "exceptiontarget " + e + ":";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ret += ins.toStringNoAddress(constants) + "\n";
|
ret += ins.toStringNoAddress(constants, new ArrayList<String>()) + "\n";
|
||||||
ofs += ins.getBytes().length;
|
ofs += ins.getBytes().length;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -764,11 +764,11 @@ public class AVM2Code {
|
|||||||
return posCache.get(pos).intValue();
|
return posCache.get(pos).intValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String listToString(List<TreeItem> stack, ConstantPool constants, HashMap<Integer, String> localRegNames) {
|
private static String listToString(List<TreeItem> stack, ConstantPool constants, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
String ret = "";
|
String ret = "";
|
||||||
for (int d = 0; d < stack.size(); d++) {
|
for (int d = 0; d < stack.size(); d++) {
|
||||||
TreeItem o = stack.get(d);
|
TreeItem o = stack.get(d);
|
||||||
ret += o.toStringSemicoloned(constants, localRegNames) + "\r\n";
|
ret += o.toStringSemicoloned(constants, localRegNames, fullyQualifiedNames) + "\r\n";
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@@ -973,7 +973,7 @@ public class AVM2Code {
|
|||||||
return pos2adr(fixIPAfterDebugLine(adr2pos(addr)));
|
return pos2adr(fixIPAfterDebugLine(adr2pos(addr)));
|
||||||
}
|
}
|
||||||
|
|
||||||
private ConvertOutput toSource(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, Stack<TreeItem> scopeStack, ABC abc, ConstantPool constants, MethodInfo method_info[], MethodBody body, int start, int end, HashMap<Integer, String> localRegNames) throws ConvertException {
|
private ConvertOutput toSource(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, Stack<TreeItem> scopeStack, ABC abc, ConstantPool constants, MethodInfo method_info[], MethodBody body, int start, int end, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) throws ConvertException {
|
||||||
boolean debugMode = false;
|
boolean debugMode = false;
|
||||||
if (debugMode) {
|
if (debugMode) {
|
||||||
System.out.println("OPEN SubSource:" + start + "-" + end + " " + code.get(start).toString() + " to " + code.get(end).toString());
|
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.length >= 3) {
|
||||||
if (swins.operands[0] == swins.getBytes().length) {
|
if (swins.operands[0] == swins.getBytes().length) {
|
||||||
if (adr2pos(pos2adr(f) + swins.operands[2]) < finStart) {
|
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;
|
returnPos = f + 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1081,10 +1081,10 @@ public class AVM2Code {
|
|||||||
}
|
}
|
||||||
Stack<TreeItem> substack = new Stack<TreeItem>();
|
Stack<TreeItem> substack = new Stack<TreeItem>();
|
||||||
substack.add(new ExceptionTreeItem(catchedExceptions.get(e)));
|
substack.add(new ExceptionTreeItem(catchedExceptions.get(e)));
|
||||||
catchedCommands.add(toSource(isStatic, classIndex, localRegs, substack, new Stack<TreeItem>(), abc, constants, method_info, body, adr2pos(fixAddrAfterDebugLine(catchedExceptions.get(e).target)), eendpos, localRegNames).output);
|
catchedCommands.add(toSource(isStatic, classIndex, localRegs, substack, new Stack<TreeItem>(), abc, constants, method_info, body, adr2pos(fixAddrAfterDebugLine(catchedExceptions.get(e).target)), eendpos, localRegNames, fullyQualifiedNames).output);
|
||||||
}
|
}
|
||||||
|
|
||||||
List<TreeItem> tryCommands = toSource(isStatic, classIndex, localRegs, stack, scopeStack, abc, constants, method_info, body, ip, endpos - 1, localRegNames).output;
|
List<TreeItem> 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));
|
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 ((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 + 1).definition instanceof DupIns) {
|
||||||
if (code.get(ip + 2).definition instanceof SetLocalTypeIns) {
|
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;
|
ip += 3;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -1249,7 +1249,7 @@ public class AVM2Code {
|
|||||||
throw new ConvertException("Unknown pattern: no setlocal before lookupswitch", switchPos);
|
throw new ConvertException("Unknown pattern: no setlocal before lookupswitch", switchPos);
|
||||||
}
|
}
|
||||||
loopList.add(new Loop(ip, switchPos + 1));
|
loopList.add(new Loop(ip, switchPos + 1));
|
||||||
Stack<TreeItem> substack = toSource(isStatic, classIndex, localRegs, new Stack<TreeItem>(), scopeStack, abc, constants, method_info, body, jumpPos, evalTo - 1, localRegNames).stack;
|
Stack<TreeItem> substack = toSource(isStatic, classIndex, localRegs, new Stack<TreeItem>(), scopeStack, abc, constants, method_info, body, jumpPos, evalTo - 1, localRegNames, fullyQualifiedNames).stack;
|
||||||
TreeItem switchedValue = substack.pop();
|
TreeItem switchedValue = substack.pop();
|
||||||
//output.add("loop" + (switchPos + 1) + ":");
|
//output.add("loop" + (switchPos + 1) + ":");
|
||||||
int switchBreak = switchPos + 1;
|
int switchBreak = switchPos + 1;
|
||||||
@@ -1284,7 +1284,7 @@ public class AVM2Code {
|
|||||||
|
|
||||||
|
|
||||||
if (evalTo > -1) {
|
if (evalTo > -1) {
|
||||||
substack = toSource(isStatic, classIndex, localRegs, new Stack<TreeItem>(), scopeStack, abc, constants, method_info, body, curPos, evalTo - 1, localRegNames).stack;
|
substack = toSource(isStatic, classIndex, localRegs, new Stack<TreeItem>(), scopeStack, abc, constants, method_info, body, curPos, evalTo - 1, localRegNames, fullyQualifiedNames).stack;
|
||||||
casesList.add(substack.pop());
|
casesList.add(substack.pop());
|
||||||
}
|
}
|
||||||
int substart = adr2pos(code.get(switchPos).operands[2 + casePos] + pos2adr(switchPos));
|
int substart = adr2pos(code.get(switchPos).operands[2 + casePos] + pos2adr(switchPos));
|
||||||
@@ -1296,7 +1296,7 @@ public class AVM2Code {
|
|||||||
if (evalTo == -1) {
|
if (evalTo == -1) {
|
||||||
subend--;
|
subend--;
|
||||||
}
|
}
|
||||||
List commands = toSource(isStatic, classIndex, localRegs, new Stack<TreeItem>(), scopeStack, abc, constants, method_info, body, substart, subend, localRegNames).output;
|
List commands = toSource(isStatic, classIndex, localRegs, new Stack<TreeItem>(), scopeStack, abc, constants, method_info, body, substart, subend, localRegNames, fullyQualifiedNames).output;
|
||||||
if ((evalTo == -1) && (casePos + 1 < code.get(switchPos).operands.length - 2)) {
|
if ((evalTo == -1) && (casePos + 1 < code.get(switchPos).operands.length - 2)) {
|
||||||
if (commands.size() == 1) {
|
if (commands.size() == 1) {
|
||||||
commands.remove(0);
|
commands.remove(0);
|
||||||
@@ -1340,16 +1340,16 @@ public class AVM2Code {
|
|||||||
loopList.add(currentLoop);
|
loopList.add(currentLoop);
|
||||||
|
|
||||||
|
|
||||||
ConvertOutput co = toSource(isStatic, classIndex, localRegs, new Stack<TreeItem>(), scopeStack, abc, constants, method_info, body, jumpPos, adr2pos(afterBackJumpAddr) - 2, localRegNames);
|
ConvertOutput co = toSource(isStatic, classIndex, localRegs, new Stack<TreeItem>(), scopeStack, abc, constants, method_info, body, jumpPos, adr2pos(afterBackJumpAddr) - 2, localRegNames, fullyQualifiedNames);
|
||||||
Stack<TreeItem> substack = co.stack;
|
Stack<TreeItem> 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();
|
TreeItem expression = substack.pop();
|
||||||
List<TreeItem> subins = new ArrayList<TreeItem>();
|
List<TreeItem> subins = new ArrayList<TreeItem>();
|
||||||
boolean isFor = false;
|
boolean isFor = false;
|
||||||
List<TreeItem> finalExpression = new ArrayList<TreeItem>();
|
List<TreeItem> finalExpression = new ArrayList<TreeItem>();
|
||||||
try {
|
try {
|
||||||
subins = toSource(isStatic, classIndex, localRegs, new Stack<TreeItem>(), scopeStack, abc, constants, method_info, body, adr2pos(secondAddr) + 1/*label*/, jumpPos - 1, localRegNames).output;
|
subins = toSource(isStatic, classIndex, localRegs, new Stack<TreeItem>(), scopeStack, abc, constants, method_info, body, adr2pos(secondAddr) + 1/*label*/, jumpPos - 1, localRegNames, fullyQualifiedNames).output;
|
||||||
} catch (UnknownJumpException uje) {
|
} catch (UnknownJumpException uje) {
|
||||||
if ((uje.ip >= start) && (uje.ip <= end)) {
|
if ((uje.ip >= start) && (uje.ip <= end)) {
|
||||||
currentLoop.loopContinue = uje.ip;
|
currentLoop.loopContinue = uje.ip;
|
||||||
@@ -1374,7 +1374,7 @@ public class AVM2Code {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
finalExpression = toSource(isStatic, classIndex, localRegs, new Stack<TreeItem>(), scopeStack, abc, constants, method_info, body, uje.ip, jumpPos - 1, localRegNames).output;
|
finalExpression = toSource(isStatic, classIndex, localRegs, new Stack<TreeItem>(), scopeStack, abc, constants, method_info, body, uje.ip, jumpPos - 1, localRegNames, fullyQualifiedNames).output;
|
||||||
isFor = true;
|
isFor = true;
|
||||||
} else {
|
} else {
|
||||||
throw new ConvertException("Unknown pattern: jump to nowhere", ip);
|
throw new ConvertException("Unknown pattern: jump to nowhere", ip);
|
||||||
@@ -1444,20 +1444,20 @@ public class AVM2Code {
|
|||||||
} else {
|
} else {
|
||||||
throw new ConvertException("Unknown pattern: back jump ", ip);
|
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
|
} 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);
|
AVM2Instruction insAfter = code.get(ip + 1);
|
||||||
if((insAfter.definition instanceof GetLocalTypeIns)&&(((GetLocalTypeIns)insAfter.definition).getRegisterId(insAfter)==((SetLocalTypeIns)ins.definition).getRegisterId(ins))){
|
if ((insAfter.definition instanceof GetLocalTypeIns) && (((GetLocalTypeIns) insAfter.definition).getRegisterId(insAfter) == ((SetLocalTypeIns) ins.definition).getRegisterId(ins))) {
|
||||||
TreeItem before=stack.peek();
|
TreeItem before = stack.peek();
|
||||||
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);
|
||||||
stack.push(before);
|
stack.push(before);
|
||||||
ip+=2;
|
ip += 2;
|
||||||
continue iploop;
|
continue iploop;
|
||||||
}else{
|
} 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++;
|
ip++;
|
||||||
continue iploop;
|
continue iploop;
|
||||||
}
|
}
|
||||||
} else if (ins.definition instanceof DupIns) {
|
} else if (ins.definition instanceof DupIns) {
|
||||||
int nextPos;
|
int nextPos;
|
||||||
do {
|
do {
|
||||||
@@ -1487,7 +1487,7 @@ public class AVM2Code {
|
|||||||
if (((GetLocalTypeIns) code.get(t).definition).getRegisterId(code.get(t)) == reg) {
|
if (((GetLocalTypeIns) code.get(t).definition).getRegisterId(code.get(t)) == reg) {
|
||||||
if (code.get(t + 1).definition instanceof KillIns) {
|
if (code.get(t + 1).definition instanceof KillIns) {
|
||||||
if (code.get(t + 1).operands[0] == reg) {
|
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));
|
stack.push(assignment.output.remove(assignment.output.size() - 1));
|
||||||
ip = t + 2;
|
ip = t + 2;
|
||||||
continue iploop;
|
continue iploop;
|
||||||
@@ -1501,14 +1501,14 @@ public class AVM2Code {
|
|||||||
stack.push(new LocalRegTreeItem(ins, reg, v));
|
stack.push(new LocalRegTreeItem(ins, reg, v));
|
||||||
stack.push(v);
|
stack.push(v);
|
||||||
} else {
|
} 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++;
|
ip++;
|
||||||
break;
|
break;
|
||||||
//}
|
//}
|
||||||
|
|
||||||
} else {
|
} 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++;
|
ip++;
|
||||||
break;
|
break;
|
||||||
//throw new ConvertException("Unknown pattern after DUP:" + insComparsion.toString());
|
//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];
|
addr = addr + ins.getBytes().length + insAfter.getBytes().length + insAfter.operands[0];
|
||||||
nextPos = adr2pos(addr) - 1;
|
nextPos = adr2pos(addr) - 1;
|
||||||
if (isAnd) {
|
if (isAnd) {
|
||||||
stack.add(new AndTreeItem(insAfter, stack.pop(), toSource(isStatic, classIndex, localRegs, new Stack<TreeItem>(), 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<TreeItem>(), scopeStack, abc, constants, method_info, body, ip + 3, nextPos, localRegNames, fullyQualifiedNames).stack.pop()));
|
||||||
} else {
|
} else {
|
||||||
stack.add(new OrTreeItem(insAfter, stack.pop(), toSource(isStatic, classIndex, localRegs, new Stack<TreeItem>(), 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<TreeItem>(), scopeStack, abc, constants, method_info, body, ip + 3, nextPos, localRegNames, fullyQualifiedNames).stack.pop()));
|
||||||
}
|
}
|
||||||
ins = code.get(nextPos + 1);
|
ins = code.get(nextPos + 1);
|
||||||
ip = nextPos + 1;
|
ip = nextPos + 1;
|
||||||
@@ -1571,13 +1571,13 @@ public class AVM2Code {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ConvertOutput onTrue = toSource(isStatic, classIndex, localRegs, new Stack<TreeItem>(), scopeStack, abc, constants, method_info, body, ip + 1, targetIns - 1 - ((hasElse || hasReturn) ? 1 : 0), localRegNames);
|
ConvertOutput onTrue = toSource(isStatic, classIndex, localRegs, new Stack<TreeItem>(), scopeStack, abc, constants, method_info, body, ip + 1, targetIns - 1 - ((hasElse || hasReturn) ? 1 : 0), localRegNames, fullyQualifiedNames);
|
||||||
ip = targetIns;
|
ip = targetIns;
|
||||||
ConvertOutput onFalse = new ConvertOutput(new Stack<TreeItem>(), new ArrayList<TreeItem>());
|
ConvertOutput onFalse = new ConvertOutput(new Stack<TreeItem>(), new ArrayList<TreeItem>());
|
||||||
if (hasElse) {
|
if (hasElse) {
|
||||||
int finalAddr = targetAddr + code.get(targetIns - 1).operands[0];
|
int finalAddr = targetAddr + code.get(targetIns - 1).operands[0];
|
||||||
int finalIns = adr2pos(finalAddr);
|
int finalIns = adr2pos(finalAddr);
|
||||||
onFalse = toSource(isStatic, classIndex, localRegs, new Stack<TreeItem>(), scopeStack, abc, constants, method_info, body, targetIns, finalIns - 1, localRegNames);
|
onFalse = toSource(isStatic, classIndex, localRegs, new Stack<TreeItem>(), scopeStack, abc, constants, method_info, body, targetIns, finalIns - 1, localRegNames, fullyQualifiedNames);
|
||||||
ip = finalIns;
|
ip = finalIns;
|
||||||
}
|
}
|
||||||
if ((onTrue.stack.size() > 0) && (onFalse != null) && (onFalse.stack.size() > 0)) {
|
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)) {
|
} 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;
|
ip = end + 1;
|
||||||
break;
|
break;
|
||||||
} else {
|
} 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;
|
addr += ins.getBytes().length;
|
||||||
ip++;
|
ip++;
|
||||||
@@ -1624,11 +1624,11 @@ public class AVM2Code {
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String toSource(boolean isStatic, int classIndex, ABC abc, ConstantPool constants, MethodInfo method_info[], MethodBody body, HashMap<Integer, String> localRegNames, Stack<TreeItem> scopeStack, boolean isStaticInitializer) {
|
public String toSource(boolean isStatic, int classIndex, ABC abc, ConstantPool constants, MethodInfo method_info[], MethodBody body, HashMap<Integer, String> localRegNames, Stack<TreeItem> scopeStack, boolean isStaticInitializer, List<String> fullyQualifiedNames) {
|
||||||
return toSource(isStatic, classIndex, abc, constants, method_info, body, false, localRegNames, scopeStack, isStaticInitializer);
|
return toSource(isStatic, classIndex, abc, constants, method_info, body, false, localRegNames, scopeStack, isStaticInitializer, fullyQualifiedNames);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<TreeItem> toTree(boolean isStatic, int classIndex, ABC abc, ConstantPool constants, MethodInfo method_info[], MethodBody body, HashMap<Integer, String> localRegNames) {
|
public List<TreeItem> toTree(boolean isStatic, int classIndex, ABC abc, ConstantPool constants, MethodInfo method_info[], MethodBody body, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
toSourceCount = 0;
|
toSourceCount = 0;
|
||||||
loopList = new ArrayList<Loop>();
|
loopList = new ArrayList<Loop>();
|
||||||
unknownJumps = new ArrayList<Integer>();
|
unknownJumps = new ArrayList<Integer>();
|
||||||
@@ -1636,7 +1636,7 @@ public class AVM2Code {
|
|||||||
finallyJumps = new ArrayList<Integer>();
|
finallyJumps = new ArrayList<Integer>();
|
||||||
HashMap<Integer, TreeItem> localRegs = new HashMap<Integer, TreeItem>();
|
HashMap<Integer, TreeItem> localRegs = new HashMap<Integer, TreeItem>();
|
||||||
try {
|
try {
|
||||||
return toSource(isStatic, classIndex, localRegs, new Stack<TreeItem>(), new Stack<TreeItem>(), abc, constants, method_info, body, 0, code.size() - 1, localRegNames).output;
|
return toSource(isStatic, classIndex, localRegs, new Stack<TreeItem>(), new Stack<TreeItem>(), abc, constants, method_info, body, 0, code.size() - 1, localRegNames, fullyQualifiedNames).output;
|
||||||
} catch (ConvertException ex) {
|
} catch (ConvertException ex) {
|
||||||
return new ArrayList<TreeItem>();
|
return new ArrayList<TreeItem>();
|
||||||
}
|
}
|
||||||
@@ -1659,14 +1659,14 @@ public class AVM2Code {
|
|||||||
return maxRegister + 1;
|
return maxRegister + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public HashMap<Integer, String> getLocalRegTypes(ConstantPool constants) {
|
public HashMap<Integer, String> getLocalRegTypes(ConstantPool constants, List<String> fullyQualifiedNames) {
|
||||||
HashMap<Integer, String> ret = new HashMap<Integer, String>();
|
HashMap<Integer, String> ret = new HashMap<Integer, String>();
|
||||||
AVM2Instruction prev = null;
|
AVM2Instruction prev = null;
|
||||||
for (AVM2Instruction ins : code) {
|
for (AVM2Instruction ins : code) {
|
||||||
if (ins.definition instanceof SetLocalTypeIns) {
|
if (ins.definition instanceof SetLocalTypeIns) {
|
||||||
if (prev != null) {
|
if (prev != null) {
|
||||||
if (prev.definition instanceof CoerceOrConvertTypeIns) {
|
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<Integer, String> localRegNames, Stack<TreeItem> scopeStack, boolean isStaticInitializer) {
|
public String toSource(boolean isStatic, int classIndex, ABC abc, ConstantPool constants, MethodInfo method_info[], MethodBody body, boolean hilighted, HashMap<Integer, String> localRegNames, Stack<TreeItem> scopeStack, boolean isStaticInitializer, List<String> fullyQualifiedNames) {
|
||||||
toSourceCount = 0;
|
toSourceCount = 0;
|
||||||
loopList = new ArrayList<Loop>();
|
loopList = new ArrayList<Loop>();
|
||||||
unknownJumps = new ArrayList<Integer>();
|
unknownJumps = new ArrayList<Integer>();
|
||||||
@@ -1725,7 +1725,7 @@ public class AVM2Code {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
list = toSource(isStatic, classIndex, localRegs, new Stack<TreeItem>(), scopeStack, abc, constants, method_info, body, 0, code.size() - 1, localRegNames).output;
|
list = toSource(isStatic, classIndex, localRegs, new Stack<TreeItem>(), scopeStack, abc, constants, method_info, body, 0, code.size() - 1, localRegNames, fullyQualifiedNames).output;
|
||||||
if (isStaticInitializer) {
|
if (isStaticInitializer) {
|
||||||
|
|
||||||
List<TreeItem> newList = new ArrayList<TreeItem>();
|
List<TreeItem> newList = new ArrayList<TreeItem>();
|
||||||
@@ -1766,7 +1766,7 @@ public class AVM2Code {
|
|||||||
for (int t = 0; t < body.traits.traits.length; t++) {
|
for (int t = 0; t < body.traits.traits.length; t++) {
|
||||||
if (body.traits.traits[t].getName(abc) == sl.multiname) {
|
if (body.traits.traits[t].getName(abc) == sl.multiname) {
|
||||||
if (body.traits.traits[t] instanceof TraitSlotConst) {
|
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) {
|
} catch (Exception ex) {
|
||||||
Logger.getLogger(AVM2Code.class.getName()).log(Level.SEVERE, null, 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 */";
|
s = "/*\r\n * Decompilation error\r\n * Code may be obfuscated\r\n * Error Message: " + ex.getMessage() + "\r\n */";
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
package com.jpexs.asdec.abc.avm2;
|
package com.jpexs.asdec.abc.avm2;
|
||||||
|
|
||||||
import com.jpexs.asdec.abc.ABC;
|
import com.jpexs.asdec.abc.ABC;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -31,7 +32,7 @@ public class CodeStats {
|
|||||||
public boolean has_activation = false;
|
public boolean has_activation = false;
|
||||||
public InstructionStats instructionStats[];
|
public InstructionStats instructionStats[];
|
||||||
|
|
||||||
public String toString(ABC abc) {
|
public String toString(ABC abc, List<String> fullyQualifiedNames) {
|
||||||
String ret = "Stats: maxstack=" + maxstack + ", maxscope=" + maxscope + ", maxlocal=" + maxlocal + "\r\n";
|
String ret = "Stats: maxstack=" + maxstack + ", maxscope=" + maxscope + ", maxlocal=" + maxlocal + "\r\n";
|
||||||
int i = 0;
|
int i = 0;
|
||||||
int ms = 0;
|
int ms = 0;
|
||||||
@@ -40,7 +41,7 @@ public class CodeStats {
|
|||||||
if (stats.stackpos > ms) {
|
if (stats.stackpos > ms) {
|
||||||
ms = stats.stackpos;
|
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++;
|
i++;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import com.jpexs.asdec.abc.types.Namespace;
|
|||||||
import com.jpexs.asdec.abc.types.NamespaceSet;
|
import com.jpexs.asdec.abc.types.NamespaceSet;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.io.PrintStream;
|
import java.io.PrintStream;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
public class ConstantPool {
|
public class ConstantPool {
|
||||||
@@ -96,15 +97,6 @@ public class ConstantPool {
|
|||||||
return 0;
|
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) {
|
public int forceGetStringId(String val) {
|
||||||
int id = getStringId(val);
|
int id = getStringId(val);
|
||||||
if (id == 0) {
|
if (id == 0) {
|
||||||
@@ -160,7 +152,7 @@ public class ConstantPool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 1; i < constant_multiname.length; i++) {
|
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<String>()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -146,12 +146,12 @@ public class AVM2Instruction {
|
|||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getParams(ConstantPool constants) {
|
public String getParams(ConstantPool constants, List<String> fullyQualifiedNames) {
|
||||||
String s = "";
|
String s = "";
|
||||||
for (int i = 0; i < definition.operands.length; i++) {
|
for (int i = 0; i < definition.operands.length; i++) {
|
||||||
switch (definition.operands[i]) {
|
switch (definition.operands[i]) {
|
||||||
case AVM2Code.DAT_MULTINAME_INDEX:
|
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;
|
break;
|
||||||
case AVM2Code.DAT_STRING_INDEX:
|
case AVM2Code.DAT_STRING_INDEX:
|
||||||
s += " \"" + Helper.escapeString(constants.constant_string[operands[i]]) + "\"";
|
s += " \"" + Helper.escapeString(constants.constant_string[operands[i]]) + "\"";
|
||||||
@@ -207,15 +207,15 @@ public class AVM2Instruction {
|
|||||||
return " ;" + comment;
|
return " ;" + comment;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String toString(ConstantPool constants) {
|
public String toString(ConstantPool constants, List<String> fullyQualifiedNames) {
|
||||||
String s = Helper.formatAddress(offset) + " " + Helper.padSpaceRight(Helper.byteArrToString(getBytes()), 30) + definition.instructionName;
|
String s = Helper.formatAddress(offset) + " " + Helper.padSpaceRight(Helper.byteArrToString(getBytes()), 30) + definition.instructionName;
|
||||||
s += getParams(constants) + getComment();
|
s += getParams(constants, fullyQualifiedNames) + getComment();
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String toStringNoAddress(ConstantPool constants) {
|
public String toStringNoAddress(ConstantPool constants, List<String> fullyQualifiedNames) {
|
||||||
String s = definition.instructionName;
|
String s = definition.instructionName;
|
||||||
s += getParams(constants) + getComment();
|
s += getParams(constants, fullyQualifiedNames) + getComment();
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ public class InstructionDefinition {
|
|||||||
throw new UnsupportedOperationException("Instruction " + instructionName + " not implemented");
|
throw new UnsupportedOperationException("Instruction " + instructionName + " not implemented");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected FullMultinameTreeItem resolveMultiname(Stack<TreeItem> stack, ConstantPool constants, int multinameIndex, AVM2Instruction ins) {
|
protected FullMultinameTreeItem resolveMultiname(Stack<TreeItem> stack, ConstantPool constants, int multinameIndex, AVM2Instruction ins) {
|
||||||
@@ -97,7 +97,7 @@ public class InstructionDefinition {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String resolveMultinameNoPop(int pos, Stack<TreeItem> stack, ConstantPool constants, int multinameIndex, AVM2Instruction ins) {
|
protected String resolveMultinameNoPop(int pos, Stack<TreeItem> stack, ConstantPool constants, int multinameIndex, AVM2Instruction ins, List<String> fullyQualifiedNames) {
|
||||||
String ns = "";
|
String ns = "";
|
||||||
String name;
|
String name;
|
||||||
if (constants.constant_multiname[multinameIndex].needsNs()) {
|
if (constants.constant_multiname[multinameIndex].needsNs()) {
|
||||||
@@ -107,7 +107,7 @@ public class InstructionDefinition {
|
|||||||
if (constants.constant_multiname[multinameIndex].needsName()) {
|
if (constants.constant_multiname[multinameIndex].needsName()) {
|
||||||
name = stack.get(pos).toString();
|
name = stack.get(pos).toString();
|
||||||
} else {
|
} 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;
|
return name + ns;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,5 +24,5 @@ import java.util.Stack;
|
|||||||
|
|
||||||
public interface SetTypeIns {
|
public interface SetTypeIns {
|
||||||
|
|
||||||
public abstract String getObject(Stack<TreeItem> stack, ABC abc, AVM2Instruction ins, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, HashMap<Integer, String> localRegNames);
|
public abstract String getObject(Stack<TreeItem> stack, ABC abc, AVM2Instruction ins, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public class AddIIns extends AddIns {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
TreeItem v2 = (TreeItem) stack.pop();
|
TreeItem v2 = (TreeItem) stack.pop();
|
||||||
TreeItem v1 = (TreeItem) stack.pop();
|
TreeItem v1 = (TreeItem) stack.pop();
|
||||||
stack.push(new AddTreeItem(ins, v1, v2));
|
stack.push(new AddTreeItem(ins, v1, v2));
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ public class AddIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
TreeItem v2 = (TreeItem) stack.pop();
|
TreeItem v2 = (TreeItem) stack.pop();
|
||||||
TreeItem v1 = (TreeItem) stack.pop();
|
TreeItem v1 = (TreeItem) stack.pop();
|
||||||
stack.push(new AddTreeItem(ins, v1, v2));
|
stack.push(new AddTreeItem(ins, v1, v2));
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ public class DecrementIIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
stack.push(new DecrementTreeItem(ins, (TreeItem) stack.pop()));
|
stack.push(new DecrementTreeItem(ins, (TreeItem) stack.pop()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ public class DecrementIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
stack.push(new DecrementTreeItem(ins, (TreeItem) stack.pop()));
|
stack.push(new DecrementTreeItem(ins, (TreeItem) stack.pop()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ public class DivideIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
TreeItem v2 = (TreeItem) stack.pop();
|
TreeItem v2 = (TreeItem) stack.pop();
|
||||||
TreeItem v1 = (TreeItem) stack.pop();
|
TreeItem v1 = (TreeItem) stack.pop();
|
||||||
stack.push(new DivideTreeItem(ins, v1, v2));
|
stack.push(new DivideTreeItem(ins, v1, v2));
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public class IncrementIIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
stack.push(new IncrementTreeItem(ins, (TreeItem) stack.pop()));
|
stack.push(new IncrementTreeItem(ins, (TreeItem) stack.pop()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public class IncrementIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
stack.push(new IncrementTreeItem(ins, (TreeItem) stack.pop()));
|
stack.push(new IncrementTreeItem(ins, (TreeItem) stack.pop()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ public class ModuloIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
TreeItem v2 = (TreeItem) stack.pop();
|
TreeItem v2 = (TreeItem) stack.pop();
|
||||||
TreeItem v1 = (TreeItem) stack.pop();
|
TreeItem v1 = (TreeItem) stack.pop();
|
||||||
stack.push(new ModuloTreeItem(ins, v1, v2));
|
stack.push(new ModuloTreeItem(ins, v1, v2));
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public class MultiplyIIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
TreeItem v2 = (TreeItem) stack.pop();
|
TreeItem v2 = (TreeItem) stack.pop();
|
||||||
TreeItem v1 = (TreeItem) stack.pop();
|
TreeItem v1 = (TreeItem) stack.pop();
|
||||||
stack.push(new MultiplyTreeItem(ins, v1, v2));
|
stack.push(new MultiplyTreeItem(ins, v1, v2));
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ public class MultiplyIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
TreeItem v2 = (TreeItem) stack.pop();
|
TreeItem v2 = (TreeItem) stack.pop();
|
||||||
TreeItem v1 = (TreeItem) stack.pop();
|
TreeItem v1 = (TreeItem) stack.pop();
|
||||||
stack.push(new MultiplyTreeItem(ins, v1, v2));
|
stack.push(new MultiplyTreeItem(ins, v1, v2));
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public class NegateIIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
TreeItem v = (TreeItem) stack.pop();
|
TreeItem v = (TreeItem) stack.pop();
|
||||||
stack.push(new NegTreeItem(ins, v));
|
stack.push(new NegTreeItem(ins, v));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public class NegateIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
TreeItem v = (TreeItem) stack.pop();
|
TreeItem v = (TreeItem) stack.pop();
|
||||||
stack.push(new NegTreeItem(ins, v));
|
stack.push(new NegTreeItem(ins, v));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public class NotIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
TreeItem v = (TreeItem) stack.pop();
|
TreeItem v = (TreeItem) stack.pop();
|
||||||
stack.push(new NotTreeItem(ins, v));
|
stack.push(new NotTreeItem(ins, v));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public class SubtractIIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
TreeItem v2 = (TreeItem) stack.pop();
|
TreeItem v2 = (TreeItem) stack.pop();
|
||||||
TreeItem v1 = (TreeItem) stack.pop();
|
TreeItem v1 = (TreeItem) stack.pop();
|
||||||
stack.push(new SubtractTreeItem(ins, v1, v2));
|
stack.push(new SubtractTreeItem(ins, v1, v2));
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public class SubtractIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
TreeItem v2 = (TreeItem) stack.pop();
|
TreeItem v2 = (TreeItem) stack.pop();
|
||||||
TreeItem v1 = (TreeItem) stack.pop();
|
TreeItem v1 = (TreeItem) stack.pop();
|
||||||
stack.push(new SubtractTreeItem(ins, v1, v2));
|
stack.push(new SubtractTreeItem(ins, v1, v2));
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ public class BitAndIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
TreeItem v2 = (TreeItem) stack.pop();
|
TreeItem v2 = (TreeItem) stack.pop();
|
||||||
TreeItem v1 = (TreeItem) stack.pop();
|
TreeItem v1 = (TreeItem) stack.pop();
|
||||||
stack.push(new BitAndTreeItem(ins, v1, v2));
|
stack.push(new BitAndTreeItem(ins, v1, v2));
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ public class BitNotIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
TreeItem v = (TreeItem) stack.pop();
|
TreeItem v = (TreeItem) stack.pop();
|
||||||
stack.push(new BitNotTreeItem(ins, v));
|
stack.push(new BitNotTreeItem(ins, v));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ public class BitOrIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
TreeItem v2 = (TreeItem) stack.pop();
|
TreeItem v2 = (TreeItem) stack.pop();
|
||||||
TreeItem v1 = (TreeItem) stack.pop();
|
TreeItem v1 = (TreeItem) stack.pop();
|
||||||
stack.push(new BitOrTreeItem(ins, v1, v2));
|
stack.push(new BitOrTreeItem(ins, v1, v2));
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ public class BitXorIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
TreeItem v2 = (TreeItem) stack.pop();
|
TreeItem v2 = (TreeItem) stack.pop();
|
||||||
TreeItem v1 = (TreeItem) stack.pop();
|
TreeItem v1 = (TreeItem) stack.pop();
|
||||||
stack.push(new BitXorTreeItem(ins, v1, v2));
|
stack.push(new BitXorTreeItem(ins, v1, v2));
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public class LShiftIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
TreeItem v2 = (TreeItem) stack.pop();
|
TreeItem v2 = (TreeItem) stack.pop();
|
||||||
TreeItem v1 = (TreeItem) stack.pop();
|
TreeItem v1 = (TreeItem) stack.pop();
|
||||||
stack.push(new LShiftTreeItem(ins, v1, v2));
|
stack.push(new LShiftTreeItem(ins, v1, v2));
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public class RShiftIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
TreeItem v2 = (TreeItem) stack.pop();
|
TreeItem v2 = (TreeItem) stack.pop();
|
||||||
TreeItem v1 = (TreeItem) stack.pop();
|
TreeItem v1 = (TreeItem) stack.pop();
|
||||||
stack.push(new RShiftTreeItem(ins, v1, v2));
|
stack.push(new RShiftTreeItem(ins, v1, v2));
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public class URShiftIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
TreeItem v2 = (TreeItem) stack.pop();
|
TreeItem v2 = (TreeItem) stack.pop();
|
||||||
TreeItem v1 = (TreeItem) stack.pop();
|
TreeItem v1 = (TreeItem) stack.pop();
|
||||||
stack.push(new URShiftTreeItem(ins, v1, v2));
|
stack.push(new URShiftTreeItem(ins, v1, v2));
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ public class EqualsIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
TreeItem v2 = (TreeItem) stack.pop();
|
TreeItem v2 = (TreeItem) stack.pop();
|
||||||
TreeItem v1 = (TreeItem) stack.pop();
|
TreeItem v1 = (TreeItem) stack.pop();
|
||||||
stack.push(new EqTreeItem(ins, v1, v2));
|
stack.push(new EqTreeItem(ins, v1, v2));
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public class GreaterEqualsIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
TreeItem v2 = (TreeItem) stack.pop();
|
TreeItem v2 = (TreeItem) stack.pop();
|
||||||
TreeItem v1 = (TreeItem) stack.pop();
|
TreeItem v1 = (TreeItem) stack.pop();
|
||||||
stack.push(new GeTreeItem(ins, v1, v2));
|
stack.push(new GeTreeItem(ins, v1, v2));
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public class GreaterThanIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
TreeItem v2 = (TreeItem) stack.pop();
|
TreeItem v2 = (TreeItem) stack.pop();
|
||||||
TreeItem v1 = (TreeItem) stack.pop();
|
TreeItem v1 = (TreeItem) stack.pop();
|
||||||
stack.push(new LtTreeItem(ins, v1, v2));
|
stack.push(new LtTreeItem(ins, v1, v2));
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public class LessEqualsIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
TreeItem v2 = (TreeItem) stack.pop();
|
TreeItem v2 = (TreeItem) stack.pop();
|
||||||
TreeItem v1 = (TreeItem) stack.pop();
|
TreeItem v1 = (TreeItem) stack.pop();
|
||||||
stack.push(new LeTreeItem(ins, v1, v2));
|
stack.push(new LeTreeItem(ins, v1, v2));
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public class LessThanIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
TreeItem v2 = (TreeItem) stack.pop();
|
TreeItem v2 = (TreeItem) stack.pop();
|
||||||
TreeItem v1 = (TreeItem) stack.pop();
|
TreeItem v1 = (TreeItem) stack.pop();
|
||||||
stack.push(new GtTreeItem(ins, v1, v2));
|
stack.push(new GtTreeItem(ins, v1, v2));
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public class StrictEqualsIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
TreeItem v2 = (TreeItem) stack.pop();
|
TreeItem v2 = (TreeItem) stack.pop();
|
||||||
TreeItem v1 = (TreeItem) stack.pop();
|
TreeItem v1 = (TreeItem) stack.pop();
|
||||||
stack.push(new StrictEqTreeItem(ins, v1, v2));
|
stack.push(new StrictEqTreeItem(ins, v1, v2));
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ public class ConstructIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
int argCount = ins.operands[0];
|
int argCount = ins.operands[0];
|
||||||
List<TreeItem> args = new ArrayList<TreeItem>();
|
List<TreeItem> args = new ArrayList<TreeItem>();
|
||||||
for (int a = 0; a < argCount; a++) {
|
for (int a = 0; a < argCount; a++) {
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ public class ConstructPropIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
int multinameIndex = ins.operands[0];
|
int multinameIndex = ins.operands[0];
|
||||||
int argCount = ins.operands[1];
|
int argCount = ins.operands[1];
|
||||||
List<TreeItem> args = new ArrayList<TreeItem>();
|
List<TreeItem> args = new ArrayList<TreeItem>();
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ public class ConstructSuperIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
int argCount = ins.operands[0];
|
int argCount = ins.operands[0];
|
||||||
List<TreeItem> args = new ArrayList<TreeItem>();
|
List<TreeItem> args = new ArrayList<TreeItem>();
|
||||||
for (int a = 0; a < argCount; a++) {
|
for (int a = 0; a < argCount; a++) {
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public class NewActivationIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
stack.push(new NewActivationTreeItem(ins));
|
stack.push(new NewActivationTreeItem(ins));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ public class NewArrayIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
int argCount = ins.operands[0];
|
int argCount = ins.operands[0];
|
||||||
List<TreeItem> args = new ArrayList<TreeItem>();
|
List<TreeItem> args = new ArrayList<TreeItem>();
|
||||||
for (int a = 0; a < argCount; a++) {
|
for (int a = 0; a < argCount; a++) {
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ public class NewCatchIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
int exInfo = ins.operands[0];
|
int exInfo = ins.operands[0];
|
||||||
stack.push(new ExceptionTreeItem(body.exceptions[exInfo]));
|
stack.push(new ExceptionTreeItem(body.exceptions[exInfo]));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,10 +35,10 @@ public class NewClassIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
int clsIndex = ins.operands[0];
|
int clsIndex = ins.operands[0];
|
||||||
String baseType = stack.pop().toString(constants, localRegNames);
|
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) + ".class extends " + baseType));
|
stack.push(new UnparsedTreeItem(ins, "new " + abc.constants.constant_multiname[abc.instance_info[clsIndex].name_index].getName(constants, fullyQualifiedNames) + ".class extends " + baseType));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -37,16 +37,16 @@ public class NewFunctionIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
int methodIndex = ins.operands[0];
|
int methodIndex = ins.operands[0];
|
||||||
MethodBody mybody = abc.findBody(methodIndex);
|
MethodBody mybody = abc.findBody(methodIndex);
|
||||||
String bodyStr = "";
|
String bodyStr = "";
|
||||||
String paramStr = "";
|
String paramStr = "";
|
||||||
if (mybody != null) {
|
if (mybody != null) {
|
||||||
bodyStr = Highlighting.hilighMethodEnd() + mybody.toString(false, isStatic, classIndex, abc, constants, method_info, new Stack<TreeItem>()/*scopeStack*/, false, true) + Highlighting.hilighMethodBegin(body.method_info);
|
bodyStr = Highlighting.hilighMethodEnd() + mybody.toString(false, isStatic, classIndex, abc, constants, method_info, new Stack<TreeItem>()/*scopeStack*/, false, true, fullyQualifiedNames) + Highlighting.hilighMethodBegin(body.method_info);
|
||||||
paramStr = method_info[methodIndex].getParamStr(constants, mybody, abc);
|
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
|
@Override
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ public class NewObjectIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
int argCount = ins.operands[0];
|
int argCount = ins.operands[0];
|
||||||
List<NameValuePair> args = new ArrayList<NameValuePair>();
|
List<NameValuePair> args = new ArrayList<NameValuePair>();
|
||||||
for (int a = 0; a < argCount; a++) {
|
for (int a = 0; a < argCount; a++) {
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ public class CallIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
int argCount = ins.operands[0];
|
int argCount = ins.operands[0];
|
||||||
List<TreeItem> args = new ArrayList<TreeItem>();
|
List<TreeItem> args = new ArrayList<TreeItem>();
|
||||||
for (int a = 0; a < argCount; a++) {
|
for (int a = 0; a < argCount; a++) {
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ public class CallMethodIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
int methodIndex = ins.operands[0];
|
int methodIndex = ins.operands[0];
|
||||||
int argCount = ins.operands[1];
|
int argCount = ins.operands[1];
|
||||||
List<TreeItem> args = new ArrayList<TreeItem>();
|
List<TreeItem> args = new ArrayList<TreeItem>();
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ public class CallPropLexIns extends CallPropertyIns {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
int multinameIndex = ins.operands[0];
|
int multinameIndex = ins.operands[0];
|
||||||
int argCount = ins.operands[1];
|
int argCount = ins.operands[1];
|
||||||
List<TreeItem> args = new ArrayList<TreeItem>();
|
List<TreeItem> args = new ArrayList<TreeItem>();
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ public class CallPropVoidIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
int multinameIndex = ins.operands[0];
|
int multinameIndex = ins.operands[0];
|
||||||
int argCount = ins.operands[1];
|
int argCount = ins.operands[1];
|
||||||
List<TreeItem> args = new ArrayList<TreeItem>();
|
List<TreeItem> args = new ArrayList<TreeItem>();
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ public class CallPropertyIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
int multinameIndex = ins.operands[0];
|
int multinameIndex = ins.operands[0];
|
||||||
int argCount = ins.operands[1];
|
int argCount = ins.operands[1];
|
||||||
List<TreeItem> args = new ArrayList<TreeItem>();
|
List<TreeItem> args = new ArrayList<TreeItem>();
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ public class CallStaticIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
int methodIndex = ins.operands[0];
|
int methodIndex = ins.operands[0];
|
||||||
int argCount = ins.operands[1];
|
int argCount = ins.operands[1];
|
||||||
List<TreeItem> args = new ArrayList<TreeItem>();
|
List<TreeItem> args = new ArrayList<TreeItem>();
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ public class CallSuperIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
int multinameIndex = ins.operands[0];
|
int multinameIndex = ins.operands[0];
|
||||||
int argCount = ins.operands[1];
|
int argCount = ins.operands[1];
|
||||||
List<TreeItem> args = new ArrayList<TreeItem>();
|
List<TreeItem> args = new ArrayList<TreeItem>();
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ public class CallSuperVoidIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
int multinameIndex = ins.operands[0];
|
int multinameIndex = ins.operands[0];
|
||||||
int argCount = ins.operands[1];
|
int argCount = ins.operands[1];
|
||||||
List<TreeItem> args = new ArrayList<TreeItem>();
|
List<TreeItem> args = new ArrayList<TreeItem>();
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ public class IfEqIns extends InstructionDefinition implements IfTypeIns {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
TreeItem v2 = (TreeItem) stack.pop();
|
TreeItem v2 = (TreeItem) stack.pop();
|
||||||
TreeItem v1 = (TreeItem) stack.pop();
|
TreeItem v1 = (TreeItem) stack.pop();
|
||||||
stack.push(new EqTreeItem(ins, v1, v2));
|
stack.push(new EqTreeItem(ins, v1, v2));
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ public class IfFalseIns extends InstructionDefinition implements IfTypeIns {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
TreeItem v1 = (TreeItem) stack.pop();
|
TreeItem v1 = (TreeItem) stack.pop();
|
||||||
stack.push(new NotTreeItem(ins, v1));
|
stack.push(new NotTreeItem(ins, v1));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ public class IfGeIns extends InstructionDefinition implements IfTypeIns {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
TreeItem v2 = (TreeItem) stack.pop();
|
TreeItem v2 = (TreeItem) stack.pop();
|
||||||
TreeItem v1 = (TreeItem) stack.pop();
|
TreeItem v1 = (TreeItem) stack.pop();
|
||||||
stack.push(new GeTreeItem(ins, v1, v2));
|
stack.push(new GeTreeItem(ins, v1, v2));
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ public class IfGtIns extends InstructionDefinition implements IfTypeIns {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
TreeItem v2 = (TreeItem) stack.pop();
|
TreeItem v2 = (TreeItem) stack.pop();
|
||||||
TreeItem v1 = (TreeItem) stack.pop();
|
TreeItem v1 = (TreeItem) stack.pop();
|
||||||
stack.push(new GtTreeItem(ins, v1, v2));
|
stack.push(new GtTreeItem(ins, v1, v2));
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ public class IfLeIns extends InstructionDefinition implements IfTypeIns {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
TreeItem v2 = (TreeItem) stack.pop();
|
TreeItem v2 = (TreeItem) stack.pop();
|
||||||
TreeItem v1 = (TreeItem) stack.pop();
|
TreeItem v1 = (TreeItem) stack.pop();
|
||||||
stack.push(new LeTreeItem(ins, v1, v2));
|
stack.push(new LeTreeItem(ins, v1, v2));
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ public class IfLtIns extends InstructionDefinition implements IfTypeIns {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
TreeItem v2 = (TreeItem) stack.pop();
|
TreeItem v2 = (TreeItem) stack.pop();
|
||||||
TreeItem v1 = (TreeItem) stack.pop();
|
TreeItem v1 = (TreeItem) stack.pop();
|
||||||
stack.push(new LtTreeItem(ins, v1, v2));
|
stack.push(new LtTreeItem(ins, v1, v2));
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ public class IfNGeIns extends InstructionDefinition implements IfTypeIns {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
TreeItem v2 = (TreeItem) stack.pop();
|
TreeItem v2 = (TreeItem) stack.pop();
|
||||||
TreeItem v1 = (TreeItem) stack.pop();
|
TreeItem v1 = (TreeItem) stack.pop();
|
||||||
stack.push(new LtTreeItem(ins, v1, v2));
|
stack.push(new LtTreeItem(ins, v1, v2));
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ public class IfNGtIns extends InstructionDefinition implements IfTypeIns {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
TreeItem v2 = (TreeItem) stack.pop();
|
TreeItem v2 = (TreeItem) stack.pop();
|
||||||
TreeItem v1 = (TreeItem) stack.pop();
|
TreeItem v1 = (TreeItem) stack.pop();
|
||||||
stack.push(new LeTreeItem(ins, v1, v2));
|
stack.push(new LeTreeItem(ins, v1, v2));
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ public class IfNLeIns extends InstructionDefinition implements IfTypeIns {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
TreeItem v2 = (TreeItem) stack.pop();
|
TreeItem v2 = (TreeItem) stack.pop();
|
||||||
TreeItem v1 = (TreeItem) stack.pop();
|
TreeItem v1 = (TreeItem) stack.pop();
|
||||||
stack.push(new GtTreeItem(ins, v1, v2));
|
stack.push(new GtTreeItem(ins, v1, v2));
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ public class IfNLtIns extends InstructionDefinition implements IfTypeIns {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
TreeItem v2 = (TreeItem) stack.pop();
|
TreeItem v2 = (TreeItem) stack.pop();
|
||||||
TreeItem v1 = (TreeItem) stack.pop();
|
TreeItem v1 = (TreeItem) stack.pop();
|
||||||
stack.push(new GeTreeItem(ins, v1, v2));
|
stack.push(new GeTreeItem(ins, v1, v2));
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ public class IfNeIns extends InstructionDefinition implements IfTypeIns {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
TreeItem v2 = (TreeItem) stack.pop();
|
TreeItem v2 = (TreeItem) stack.pop();
|
||||||
TreeItem v1 = (TreeItem) stack.pop();
|
TreeItem v1 = (TreeItem) stack.pop();
|
||||||
stack.push(new NeqTreeItem(ins, v1, v2));
|
stack.push(new NeqTreeItem(ins, v1, v2));
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ public class IfStrictEqIns extends InstructionDefinition implements IfTypeIns {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
TreeItem v2 = (TreeItem) stack.pop();
|
TreeItem v2 = (TreeItem) stack.pop();
|
||||||
TreeItem v1 = (TreeItem) stack.pop();
|
TreeItem v1 = (TreeItem) stack.pop();
|
||||||
stack.push(new StrictEqTreeItem(ins, v1, v2));
|
stack.push(new StrictEqTreeItem(ins, v1, v2));
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ public class IfStrictNeIns extends InstructionDefinition implements IfTypeIns {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
TreeItem v2 = (TreeItem) stack.pop();
|
TreeItem v2 = (TreeItem) stack.pop();
|
||||||
TreeItem v1 = (TreeItem) stack.pop();
|
TreeItem v1 = (TreeItem) stack.pop();
|
||||||
stack.push(new StrictNeqTreeItem(ins, v1, v2));
|
stack.push(new StrictNeqTreeItem(ins, v1, v2));
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ public class IfTrueIns extends InstructionDefinition implements IfTypeIns {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
//String v1 = stack.pop().toString();
|
//String v1 = stack.pop().toString();
|
||||||
//stack.push("(" + v1 + ")");
|
//stack.push("(" + v1 + ")");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ public class JumpIns extends InstructionDefinition implements IfTypeIns {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
stack.push(new BooleanTreeItem(ins, Boolean.TRUE));// + ins.operands[0]);
|
stack.push(new BooleanTreeItem(ins, Boolean.TRUE));// + ins.operands[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public class LookupSwitchIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
int defaultOffset = ins.operands[0];
|
int defaultOffset = ins.operands[0];
|
||||||
int caseCount = ins.operands[1];
|
int caseCount = ins.operands[1];
|
||||||
//stack.push("switch(...)");
|
//stack.push("switch(...)");
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ public class DecLocalIIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
int regIndex = ins.operands[0];
|
int regIndex = ins.operands[0];
|
||||||
output.add(new DecLocalTreeItem(ins, regIndex));
|
output.add(new DecLocalTreeItem(ins, regIndex));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ public class DecLocalIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
int regIndex = ins.operands[0];
|
int regIndex = ins.operands[0];
|
||||||
output.add(new DecLocalTreeItem(ins, regIndex));
|
output.add(new DecLocalTreeItem(ins, regIndex));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ public class GetLocal0Ins extends InstructionDefinition implements GetLocalTypeI
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
if (isStatic) {
|
if (isStatic) {
|
||||||
stack.push(new ClassTreeItem(abc.instance_info[classIndex].getName(constants)));
|
stack.push(new ClassTreeItem(abc.instance_info[classIndex].getName(constants)));
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ public class GetLocal1Ins extends InstructionDefinition implements GetLocalTypeI
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
stack.push(new LocalRegTreeItem(ins, 1, localRegs.get(1)));
|
stack.push(new LocalRegTreeItem(ins, 1, localRegs.get(1)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ public class GetLocal2Ins extends InstructionDefinition implements GetLocalTypeI
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
stack.push(new LocalRegTreeItem(ins, 2, localRegs.get(2)));
|
stack.push(new LocalRegTreeItem(ins, 2, localRegs.get(2)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ public class GetLocal3Ins extends InstructionDefinition implements GetLocalTypeI
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
stack.push(new LocalRegTreeItem(ins, 3, localRegs.get(3)));
|
stack.push(new LocalRegTreeItem(ins, 3, localRegs.get(3)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ public class GetLocalIns extends InstructionDefinition implements GetLocalTypeIn
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
int regIndex = ins.operands[0];
|
int regIndex = ins.operands[0];
|
||||||
stack.push(new LocalRegTreeItem(ins, regIndex, localRegs.get(regIndex)));
|
stack.push(new LocalRegTreeItem(ins, regIndex, localRegs.get(regIndex)));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public class IncLocalIIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
int regIndex = ins.operands[0];
|
int regIndex = ins.operands[0];
|
||||||
output.add(new IncLocalTreeItem(ins, regIndex));
|
output.add(new IncLocalTreeItem(ins, regIndex));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public class IncLocalIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
int regIndex = ins.operands[0];
|
int regIndex = ins.operands[0];
|
||||||
output.add(new IncLocalTreeItem(ins, regIndex));
|
output.add(new IncLocalTreeItem(ins, regIndex));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ public class KillIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
//kill local register
|
//kill local register
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ public abstract class SetLocalTypeIns extends InstructionDefinition implements S
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
int regId = getRegisterId(ins);
|
int regId = getRegisterId(ins);
|
||||||
TreeItem value = (TreeItem) stack.pop();
|
TreeItem value = (TreeItem) stack.pop();
|
||||||
localRegs.put(regId, value);
|
localRegs.put(regId, value);
|
||||||
@@ -105,7 +105,7 @@ public abstract class SetLocalTypeIns extends InstructionDefinition implements S
|
|||||||
output.add(new SetLocalTreeItem(ins, regId, value));
|
output.add(new SetLocalTreeItem(ins, regId, value));
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getObject(Stack<TreeItem> stack, ABC abc, AVM2Instruction ins, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, HashMap<Integer, String> localRegNames) {
|
public String getObject(Stack<TreeItem> stack, ABC abc, AVM2Instruction ins, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
return TreeItem.localRegName(localRegNames, getRegisterId(ins));
|
return TreeItem.localRegName(localRegNames, getRegisterId(ins));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ public class DeletePropertyIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
int multinameIndex = ins.operands[0];
|
int multinameIndex = ins.operands[0];
|
||||||
FullMultinameTreeItem multiname = resolveMultiname(stack, constants, multinameIndex, ins);
|
FullMultinameTreeItem multiname = resolveMultiname(stack, constants, multinameIndex, ins);
|
||||||
TreeItem obj = (TreeItem) stack.pop();
|
TreeItem obj = (TreeItem) stack.pop();
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ public class FindPropertyIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
int multinameIndex = ins.operands[0];
|
int multinameIndex = ins.operands[0];
|
||||||
FullMultinameTreeItem multiname = resolveMultiname(stack, constants, multinameIndex, ins);
|
FullMultinameTreeItem multiname = resolveMultiname(stack, constants, multinameIndex, ins);
|
||||||
stack.push(new FindPropertyTreeItem(ins, multiname)); //resolve right object
|
stack.push(new FindPropertyTreeItem(ins, multiname)); //resolve right object
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ public class FindPropertyStrictIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
int multinameIndex = ins.operands[0];
|
int multinameIndex = ins.operands[0];
|
||||||
FullMultinameTreeItem multiname = resolveMultiname(stack, constants, multinameIndex, ins);
|
FullMultinameTreeItem multiname = resolveMultiname(stack, constants, multinameIndex, ins);
|
||||||
stack.push(new FindPropertyTreeItem(ins, multiname));
|
stack.push(new FindPropertyTreeItem(ins, multiname));
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ public class GetDescendantsIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
int multinameIndex = ins.operands[0];
|
int multinameIndex = ins.operands[0];
|
||||||
FullMultinameTreeItem multiname = resolveMultiname(stack, constants, multinameIndex, ins);
|
FullMultinameTreeItem multiname = resolveMultiname(stack, constants, multinameIndex, ins);
|
||||||
TreeItem obj = (TreeItem) stack.pop();
|
TreeItem obj = (TreeItem) stack.pop();
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ public class GetGlobalScopeIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
if (scopeStack.isEmpty()) {
|
if (scopeStack.isEmpty()) {
|
||||||
stack.push(new ClassTreeItem(abc.instance_info[classIndex].getName(constants)));
|
stack.push(new ClassTreeItem(abc.instance_info[classIndex].getName(constants)));
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ public class GetGlobalSlotIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
int slotIndex = ins.operands[0];
|
int slotIndex = ins.operands[0];
|
||||||
TreeItem obj = (TreeItem) scopeStack.get(0); //scope
|
TreeItem obj = (TreeItem) scopeStack.get(0); //scope
|
||||||
Multiname slotname = null;
|
Multiname slotname = null;
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ public class GetLexIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
int multinameIndex = ins.operands[0];
|
int multinameIndex = ins.operands[0];
|
||||||
Multiname multiname = constants.constant_multiname[multinameIndex];
|
Multiname multiname = constants.constant_multiname[multinameIndex];
|
||||||
stack.push(new GetLexTreeItem(ins, multiname));
|
stack.push(new GetLexTreeItem(ins, multiname));
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ public class GetPropertyIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
int multinameIndex = ins.operands[0];
|
int multinameIndex = ins.operands[0];
|
||||||
FullMultinameTreeItem multiname = resolveMultiname(stack, constants, multinameIndex, ins);
|
FullMultinameTreeItem multiname = resolveMultiname(stack, constants, multinameIndex, ins);
|
||||||
TreeItem obj = (TreeItem) stack.pop();
|
TreeItem obj = (TreeItem) stack.pop();
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public class GetScopeObjectIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
int index = ins.operands[0];
|
int index = ins.operands[0];
|
||||||
/* System.out.println("Getting scope object"+index+":");
|
/* System.out.println("Getting scope object"+index+":");
|
||||||
for(TreeItem ti:scopeStack){
|
for(TreeItem ti:scopeStack){
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ public class GetSlotIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
int slotIndex = ins.operands[0];
|
int slotIndex = ins.operands[0];
|
||||||
TreeItem obj = (TreeItem) stack.pop(); //scope
|
TreeItem obj = (TreeItem) stack.pop(); //scope
|
||||||
Multiname slotname = null;
|
Multiname slotname = null;
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ public class GetSuperIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
int multinameIndex = ins.operands[0];
|
int multinameIndex = ins.operands[0];
|
||||||
FullMultinameTreeItem multiname = resolveMultiname(stack, constants, multinameIndex, ins);
|
FullMultinameTreeItem multiname = resolveMultiname(stack, constants, multinameIndex, ins);
|
||||||
TreeItem obj = (TreeItem) stack.pop();
|
TreeItem obj = (TreeItem) stack.pop();
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ public class HasNext2Ins extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
int objectReg = ins.operands[0];
|
int objectReg = ins.operands[0];
|
||||||
int indexReg = ins.operands[1];
|
int indexReg = ins.operands[1];
|
||||||
//stack.push("_loc_" + objectReg + ".hasNext(cnt=_loc_" + indexReg + ")");
|
//stack.push("_loc_" + objectReg + ".hasNext(cnt=_loc_" + indexReg + ")");
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public class HasNextIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
TreeItem curIndex = (TreeItem) stack.pop();
|
TreeItem curIndex = (TreeItem) stack.pop();
|
||||||
TreeItem obj = (TreeItem) stack.pop();
|
TreeItem obj = (TreeItem) stack.pop();
|
||||||
stack.push(new InTreeItem(ins, curIndex, obj));
|
stack.push(new InTreeItem(ins, curIndex, obj));
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public class InIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
TreeItem obj = (TreeItem) stack.pop();
|
TreeItem obj = (TreeItem) stack.pop();
|
||||||
TreeItem name = (TreeItem) stack.pop();
|
TreeItem name = (TreeItem) stack.pop();
|
||||||
stack.push(new InTreeItem(ins, name, obj));
|
stack.push(new InTreeItem(ins, name, obj));
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ public class InitPropertyIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
int multinameIndex = ins.operands[0];
|
int multinameIndex = ins.operands[0];
|
||||||
|
|
||||||
TreeItem val = (TreeItem) stack.pop();
|
TreeItem val = (TreeItem) stack.pop();
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ public class NextNameIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
TreeItem index = stack.pop();
|
TreeItem index = stack.pop();
|
||||||
TreeItem obj = stack.pop();
|
TreeItem obj = stack.pop();
|
||||||
//stack.push(obj + ".nextName(" + index + ")");
|
//stack.push(obj + ".nextName(" + index + ")");
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ public class NextValueIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
TreeItem index = stack.pop();
|
TreeItem index = stack.pop();
|
||||||
TreeItem obj = stack.pop();
|
TreeItem obj = stack.pop();
|
||||||
//stack.push(obj + ".nextValue(" + index + ")");
|
//stack.push(obj + ".nextValue(" + index + ")");
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public class ReturnValueIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
output.add(new ReturnValueTreeItem(ins, (TreeItem) stack.pop()));
|
output.add(new ReturnValueTreeItem(ins, (TreeItem) stack.pop()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ public class ReturnVoidIns extends InstructionDefinition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
output.add(new ReturnVoidTreeItem(ins));
|
output.add(new ReturnVoidTreeItem(ins));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,11 +36,11 @@ public class SetGlobalSlotIns extends InstructionDefinition implements SetTypeIn
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames) {
|
public void translate(boolean isStatic, int classIndex, java.util.HashMap<Integer, TreeItem> localRegs, Stack<TreeItem> stack, java.util.Stack<TreeItem> scopeStack, ConstantPool constants, AVM2Instruction ins, MethodInfo[] method_info, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, com.jpexs.asdec.abc.ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
output.add(new SetGlobalSlotTreeItem(ins, ins.operands[0], (TreeItem) stack.pop()));
|
output.add(new SetGlobalSlotTreeItem(ins, ins.operands[0], (TreeItem) stack.pop()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getObject(Stack<TreeItem> stack, ABC abc, AVM2Instruction ins, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, HashMap<Integer, String> localRegNames) {
|
public String getObject(Stack<TreeItem> stack, ABC abc, AVM2Instruction ins, List<TreeItem> output, com.jpexs.asdec.abc.types.MethodBody body, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames) {
|
||||||
return "globalslot" + ins.operands[0];
|
return "globalslot" + ins.operands[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user