diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ABCOutputStream.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ABCOutputStream.java index 367323ac7..9b094e5bc 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ABCOutputStream.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ABCOutputStream.java @@ -154,10 +154,10 @@ public class ABCOutputStream extends OutputStream { } public void writeFloat4(Float4 value) throws IOException { - writeFloat(value.value1); - writeFloat(value.value2); - writeFloat(value.value3); - writeFloat(value.value4); + writeFloat(value.values[0]); + writeFloat(value.values[1]); + writeFloat(value.values[2]); + writeFloat(value.values[3]); } public void writeU8(int value) throws IOException { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Code.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Code.java index b3a4e274f..b1b6b7fa7 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Code.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Code.java @@ -29,6 +29,7 @@ import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException; import com.jpexs.decompiler.flash.abc.avm2.graph.AVM2Graph; import com.jpexs.decompiler.flash.abc.avm2.graph.AVM2GraphSource; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instructions; import com.jpexs.decompiler.flash.abc.avm2.instructions.IfTypeIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; @@ -170,6 +171,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.CoerceOIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.CoerceUIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.ConcatIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.ConvertF4Ins; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.ConvertFIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.ConvertMIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.ConvertMPIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.DecLocalPIns; @@ -190,6 +192,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.ModuloPIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.MultiplyPIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.NegatePIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.PrologueIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.PushConstantIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.PushFloatIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.PushDNanIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.PushDecimalIns; @@ -200,6 +203,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.Sf32x4Ins; import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.SubtractPIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.SweepIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.TimestampIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.UnPlusIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.VerifyOpIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.VerifyPassIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.WbIns; @@ -385,6 +389,8 @@ public class AVM2Code implements Cloneable { public static final int DAT_FLOAT4_INDEX = OPT_U30 + 0x16; + public static final int DAT_NAMESPACE_INDEX = OPT_U30 + 0x17; + public static String operandTypeSizeToString(int ot) { int sizeType = ot & 0xff00; switch (sizeType) { @@ -406,22 +412,23 @@ public class AVM2Code implements Cloneable { private static Map operandDataTypeIdentifiers = ReflectionTools.getConstNamesMap(AVM2Code.class, Integer.class, "^DAT_(.*)$"); - public static String operandTypeToString(int ot) { + public static String operandTypeToString(int ot, boolean withTypeSize) { String typeSize = operandTypeSizeToString(ot); if (ot == OPT_CASE_OFFSETS) { - return "numOffsets (U30), offset1 (S24), offset2 (S24), ..."; + return "number" + (withTypeSize ? "(U30)" : "") + ", offset" + (withTypeSize ? "(S24)" : "") + ", offset" + (withTypeSize ? "(S24)" : "") + ", ..."; } if (operandDataTypeIdentifiers.containsKey(ot)) { String dataType = operandDataTypeIdentifiers.get(ot); - return dataType + " (" + typeSize + ")"; + return dataType + (withTypeSize ? "(" + typeSize + ")" : ""); } else { return typeSize; } } - public static final InstructionDefinition[] instructionSet = new InstructionDefinition[]{ - /*0x00*//*0x00*/null, + public static final InstructionDefinition[] instructionSet = new InstructionDefinition[256]; + public static final InstructionDefinition[] allInstructionSet = new InstructionDefinition[]{ + /*0x00*/null, /*0x01*/ new BkptIns(), /*0x02*/ new NopIns(), /*0x03*/ new ThrowIns(), @@ -455,7 +462,8 @@ public class AVM2Code implements Cloneable { /*0x1F*/ new HasNextIns(), /*0x20*/ new PushNullIns(), /*0x21*/ new PushUndefinedIns(), - /*0x22*/ new PushFloatIns(), //major 47+, pushuninitialized(U30) before + /*0x22*/ new PushFloatIns(), //major 47+ + /*0x22*/ new PushConstantIns(), //before major 47 /*0x23*/ new NextValueIns(), /*0x24*/ new PushByteIns(), /*0x25*/ new PushShortIns(), @@ -472,7 +480,7 @@ public class AVM2Code implements Cloneable { /*0x30*/ new PushScopeIns(), /*0x31*/ new PushNamespaceIns(), /*0x32*/ new HasNext2Ins(), - /*0x33*/ new PushDecimalIns(), //pushdecimal(minor 17), lix8 (internal-only) according to Tamarin + /*0x33*/ new PushDecimalIns(), //pushdecimal(minor 17), lix8 (internal-only) according to Tamarin /*0x34*/ new PushDNanIns(), //pushdnan according to Flex SDK, lix16 (internal-only) according to Tamarin /*0x35*/ new Li8Ins(), /*0x36*/ new Li16Ins(), @@ -542,9 +550,11 @@ public class AVM2Code implements Cloneable { /*0x76*/ new ConvertBIns(), /*0x77*/ new ConvertOIns(), /*0x78*/ new CheckFilterIns(), - /*0x79*/ new ConvertMIns(), // convert_m according to Flex (minor 17), convert_f (major 47+) - /*0x7A*/ new ConvertMPIns(), //convert_m_p according to Flex (minor 17), unplus (major 47+) - /*0x7B*/ new ConvertF4Ins(), // (major 47+) + /*0x79*/ new ConvertMIns(), //minor 17 (Flex) + /*0x79*/ new ConvertFIns(), //major 47+, SWF 15+ + /*0x7A*/ new ConvertMPIns(), //minor 17 (Flex) + /*0x7A*/ new UnPlusIns(), //major 47+, SWF 15+ + /*0x7B*/ new ConvertF4Ins(), //major 47+, SWF 15+ /*0x7C*/ null, /*0x7D*/ null, /*0x7E*/ null, @@ -680,24 +690,29 @@ public class AVM2Code implements Cloneable { // endoflist static { - for (int i = 0; i < instructionSet.length; i++) { + + for (int i = 0; i < allInstructionSet.length; i++) { + if (allInstructionSet[i] != null) { + int opCode = allInstructionSet[i].instructionCode; + if (instructionSet[opCode] == null) { + instructionSet[opCode] = allInstructionSet[i]; + } else if (instructionSet[opCode].hasFlag(AVM2InstructionFlag.NO_FLASH_PLAYER) && !allInstructionSet[i].hasFlag(AVM2InstructionFlag.NO_FLASH_PLAYER)) { + instructionSet[opCode] = allInstructionSet[i]; + } //Prefer without decimal: + else if (instructionSet[opCode].hasFlag(AVM2InstructionFlag.ES4_NUMERICS_MINOR) && !allInstructionSet[i].hasFlag(AVM2InstructionFlag.ES4_NUMERICS_MINOR)) { + instructionSet[opCode] = allInstructionSet[i]; + } //Prefer without float: + else if (instructionSet[opCode].hasFlag(AVM2InstructionFlag.FLOAT_MAJOR) && !allInstructionSet[i].hasFlag(AVM2InstructionFlag.FLOAT_MAJOR)) { + instructionSet[opCode] = allInstructionSet[i]; + } + } + } + + for (int i = 0; + i < instructionSet.length; + i++) { if (instructionSet[i] == null) { instructionSet[i] = new UnknownInstruction(i); - } else { - /*System.out.println("instruction." + instructionSet[i].instructionName + ".shortDescription = "); - System.out.println("instruction." + instructionSet[i].instructionName + ".description = "); - System.out.println("instruction." + instructionSet[i].instructionName + ".stackBefore = "); - System.out.println("instruction." + instructionSet[i].instructionName + ".stackAfter = "); - - System.out.print("instruction." + instructionSet[i].instructionName + ".operands = "); - for (int j = 0; j < instructionSet[i].operands.length; j++) { - if (j > 0) { - System.out.print(" "); - } - System.out.print("operand" + (j + 1)); - } - System.out.println(""); - System.out.println("");*/ } } @@ -2145,8 +2160,7 @@ public class AVM2Code implements Cloneable { ins.operands[j] = updater.updateOperandOffset(target, ins.operands[j]); } }*/ //Faster, but not so universal - { - if (ins.definition instanceof IfTypeIns) { + if (ins.definition instanceof IfTypeIns) { long target = ins.getTargetAddress(); try { ins.operands[0] = updater.updateOperandOffset(ins.getAddress(), target, ins.operands[0]); @@ -2154,7 +2168,6 @@ public class AVM2Code implements Cloneable { throw new ConvertException("Invalid offset (" + ins + ")", i); } } - } ins.setAddress(updater.updateInstructionOffset(ins.getAddress())); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/AVM2ConstantPool.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/AVM2ConstantPool.java index b6b8cc8c3..4e11ddc50 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/AVM2ConstantPool.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/AVM2ConstantPool.java @@ -482,6 +482,14 @@ public class AVM2ConstantPool implements Cloneable { return constant_double.indexOf(value); } + private int getFloatId(float value) { + return constant_float.indexOf(value); + } + + private int getFloat4Id(Float4 value) { + return constant_float4.indexOf(value); + } + private int getStringId(String value) { return constant_string.indexOf(value); } @@ -581,6 +589,22 @@ public class AVM2ConstantPool implements Cloneable { return id; } + public int getFloatId(float val, boolean add) { + int id = getFloatId(val); + if (add && id == -1) { + id = addFloat(val); + } + return id; + } + + public int getFloat4Id(Float4 val, boolean add) { + int id = getFloat4Id(val); + if (add && id == -1) { + id = addFloat4(val); + } + return id; + } + public DottedChain getDottedChain(int index) { String str = getString(index); DottedChain chain = dottedChainCache.get(str); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/AVM2Instruction.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/AVM2Instruction.java index 04bacb6f5..dbe49cfdd 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/AVM2Instruction.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/AVM2Instruction.java @@ -26,7 +26,9 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.LookupSwitchIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.other.ReturnValueIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.other.ReturnVoidIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.other.ThrowIns; +import com.jpexs.decompiler.flash.abc.types.Float4; import com.jpexs.decompiler.flash.abc.types.Multiname; +import com.jpexs.decompiler.flash.abc.types.Namespace; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.graph.DottedChain; import com.jpexs.decompiler.graph.GraphSource; @@ -223,6 +225,14 @@ public class AVM2Instruction implements Cloneable, GraphSourceItem { StringBuilder s = new StringBuilder(); for (int i = 0; i < definition.operands.length; i++) { switch (definition.operands[i]) { + case AVM2Code.DAT_NAMESPACE_INDEX: + if (operands[i] == 0) { + s.append(" null"); + } else { + s.append(" "); + s.append(Multiname.namespaceToString(constants, operands[i])); + } + break; case AVM2Code.DAT_MULTINAME_INDEX: if (operands[i] == 0) { s.append(" null"); @@ -279,6 +289,33 @@ public class AVM2Instruction implements Cloneable, GraphSourceItem { s.append(constants.getDouble(operands[i])); } break; + case AVM2Code.DAT_FLOAT_INDEX: + if (operands[i] == 0) { + s.append(" null"); + } else { + s.append(" "); + s.append(constants.getFloat(operands[i])); + } + break; + case AVM2Code.DAT_FLOAT4_INDEX: + if (operands[i] == 0) { + s.append(" null"); + } else { + Float4 f4 = constants.getFloat4(operands[i]); + s.append(" ").append(f4.values[0]); + s.append(" ").append(f4.values[1]); + s.append(" ").append(f4.values[2]); + s.append(" ").append(f4.values[3]); + } + break; + case AVM2Code.DAT_DECIMAL_INDEX: + if (operands[i] == 0) { + s.append(" null"); + } else { + s.append(" "); + s.append(constants.getDecimal(operands[i])); + } + break; case AVM2Code.DAT_OFFSET: s.append(" "); s.append("ofs"); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/AVM2InstructionFlag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/AVM2InstructionFlag.java new file mode 100644 index 000000000..a1bcc46bf --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/AVM2InstructionFlag.java @@ -0,0 +1,16 @@ +package com.jpexs.decompiler.flash.abc.avm2.instructions; + +/** + * + * @author JPEXS + */ +public enum AVM2InstructionFlag { + UNDOCUMENTED, + UNKNOWN_STACK, + ES4_NUMERICS_MINOR, + FLOAT_MAJOR, + UNKNOWN_OPERANDS, + NO_FLASH_PLAYER, + DEPRECATED, + DOMAIN_MEMORY +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/AVM2Instructions.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/AVM2Instructions.java index 99953ec30..bff50c58c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/AVM2Instructions.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/AVM2Instructions.java @@ -90,6 +90,8 @@ public class AVM2Instructions { public static final int PushConstant = 0x22; + public static final int PushFloat = 0x22; + public static final int NextValue = 0x23; public static final int PushByte = 0x24; @@ -264,8 +266,6 @@ public class AVM2Instructions { public static final int ConvertMP = 0x7A; - public static final int ConvertF4 = 0x7B; - public static final int Coerce = 0x80; public static final int CoerceB = 0x81; @@ -426,8 +426,12 @@ public class AVM2Instructions { public static final int SendEnter = 0xFA; + public static final int UnPlus = 0xFA; + public static final int DoubleToAtom = 0xFB; + public static final int ConvertF4 = 0x7B; + public static final int Sweep = 0xFC; public static final int CodeGenOp = 0xFD; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/InstructionDefinition.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/InstructionDefinition.java index 2d740c68d..3db5c3f90 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/InstructionDefinition.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/InstructionDefinition.java @@ -63,11 +63,23 @@ public abstract class InstructionDefinition implements Serializable { public boolean canThrow; - public InstructionDefinition(int instructionCode, String instructionName, int[] operands, boolean canThrow) { + public AVM2InstructionFlag[] flags; + + public InstructionDefinition(int instructionCode, String instructionName, int[] operands, boolean canThrow, AVM2InstructionFlag... flags) { this.instructionCode = instructionCode; this.instructionName = instructionName; this.operands = operands; this.canThrow = canThrow; + this.flags = flags; + } + + public boolean hasFlag(AVM2InstructionFlag flag) { + for (AVM2InstructionFlag f : flags) { + if (f == flag) { + return true; + } + } + return false; } @Override @@ -75,7 +87,7 @@ public abstract class InstructionDefinition implements Serializable { StringBuilder s = new StringBuilder(); s.append(instructionName); for (int i = 0; i < operands.length; i++) { - s.append(AVM2Code.operandTypeToString(operands[i])); + s.append(AVM2Code.operandTypeToString(operands[i], true)); } return s.toString(); } @@ -108,6 +120,26 @@ public abstract class InstructionDefinition implements Serializable { if (idx <= 0 || idx >= constants.getStringCount()) { throw new AVM2VerifyErrorException(AVM2VerifyErrorException.CPOOL_INDEX_OUT_OF_RANGE, lda.isDebug(), new Object[]{idx, constants.getStringCount()}); } + } else if (operand == AVM2Code.DAT_NAMESPACE_INDEX) { + int idx = ins.operands[i]; + if (idx <= 0 || idx >= constants.getNamespaceCount()) { + throw new AVM2VerifyErrorException(AVM2VerifyErrorException.CPOOL_INDEX_OUT_OF_RANGE, lda.isDebug(), new Object[]{idx, constants.getStringCount()}); + } + } else if (operand == AVM2Code.DAT_FLOAT_INDEX) { + int idx = ins.operands[i]; + if (idx <= 0 || idx >= constants.getFloatCount()) { + throw new AVM2VerifyErrorException(AVM2VerifyErrorException.CPOOL_INDEX_OUT_OF_RANGE, lda.isDebug(), new Object[]{idx, constants.getStringCount()}); + } + } else if (operand == AVM2Code.DAT_FLOAT4_INDEX) { + int idx = ins.operands[i]; + if (idx <= 0 || idx >= constants.getFloat4Count()) { + throw new AVM2VerifyErrorException(AVM2VerifyErrorException.CPOOL_INDEX_OUT_OF_RANGE, lda.isDebug(), new Object[]{idx, constants.getStringCount()}); + } + } else if (operand == AVM2Code.DAT_DECIMAL_INDEX) { + int idx = ins.operands[i]; + if (idx <= 0 || idx >= constants.getDecimalCount()) { + throw new AVM2VerifyErrorException(AVM2VerifyErrorException.CPOOL_INDEX_OUT_OF_RANGE, lda.isDebug(), new Object[]{idx, constants.getStringCount()}); + } } } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Lf32Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Lf32Ins.java index ac387ae8d..1acbb550b 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Lf32Ins.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Lf32Ins.java @@ -22,6 +22,7 @@ import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2RangeErrorException; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; import com.jpexs.decompiler.flash.abc.avm2.model.AlchemyLoadAVM2Item; import com.jpexs.decompiler.flash.ecma.EcmaScript; @@ -36,7 +37,7 @@ import java.util.List; public class Lf32Ins extends InstructionDefinition implements AlchemyTypeIns { public Lf32Ins() { - super(0x38, "lf32", new int[]{}, true); + super(0x38, "lf32", new int[]{}, true, AVM2InstructionFlag.DOMAIN_MEMORY); } @Override @@ -55,7 +56,7 @@ public class Lf32Ins extends InstructionDefinition implements AlchemyTypeIns { @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem ofs = stack.pop(); - stack.push(new AlchemyLoadAVM2Item(ins, localData.lineStartInstruction, ofs, 'f', 32)); + stack.push(new AlchemyLoadAVM2Item(ins, localData.lineStartInstruction, ofs, "f", 32)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Lf64Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Lf64Ins.java index 057c91511..df361489e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Lf64Ins.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Lf64Ins.java @@ -22,6 +22,7 @@ import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2RangeErrorException; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; import com.jpexs.decompiler.flash.abc.avm2.model.AlchemyLoadAVM2Item; import com.jpexs.decompiler.flash.ecma.EcmaScript; @@ -36,7 +37,7 @@ import java.util.List; public class Lf64Ins extends InstructionDefinition implements AlchemyTypeIns { public Lf64Ins() { - super(0x39, "lf64", new int[]{}, true); + super(0x39, "lf64", new int[]{}, true, AVM2InstructionFlag.DOMAIN_MEMORY); } @Override @@ -55,7 +56,7 @@ public class Lf64Ins extends InstructionDefinition implements AlchemyTypeIns { @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem ofs = stack.pop(); - stack.push(new AlchemyLoadAVM2Item(ins, localData.lineStartInstruction, ofs, 'f', 64)); + stack.push(new AlchemyLoadAVM2Item(ins, localData.lineStartInstruction, ofs, "f", 64)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Li16Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Li16Ins.java index 2610cabb3..0c478e432 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Li16Ins.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Li16Ins.java @@ -22,6 +22,7 @@ import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2RangeErrorException; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; import com.jpexs.decompiler.flash.abc.avm2.model.AlchemyLoadAVM2Item; import com.jpexs.decompiler.flash.ecma.EcmaScript; @@ -36,7 +37,7 @@ import java.util.List; public class Li16Ins extends InstructionDefinition implements AlchemyTypeIns { public Li16Ins() { - super(0x36, "li16", new int[]{}, true); + super(0x36, "li16", new int[]{}, true, AVM2InstructionFlag.DOMAIN_MEMORY); } @Override @@ -55,7 +56,7 @@ public class Li16Ins extends InstructionDefinition implements AlchemyTypeIns { @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem ofs = stack.pop(); - stack.push(new AlchemyLoadAVM2Item(ins, localData.lineStartInstruction, ofs, 'i', 16)); + stack.push(new AlchemyLoadAVM2Item(ins, localData.lineStartInstruction, ofs, "i", 16)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Li32Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Li32Ins.java index 612658923..1d4eef16f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Li32Ins.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Li32Ins.java @@ -22,6 +22,7 @@ import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2RangeErrorException; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; import com.jpexs.decompiler.flash.abc.avm2.model.AlchemyLoadAVM2Item; import com.jpexs.decompiler.flash.ecma.EcmaScript; @@ -36,7 +37,7 @@ import java.util.List; public class Li32Ins extends InstructionDefinition implements AlchemyTypeIns { public Li32Ins() { - super(0x37, "li32", new int[]{}, true); + super(0x37, "li32", new int[]{}, true, AVM2InstructionFlag.DOMAIN_MEMORY); } @Override @@ -55,7 +56,7 @@ public class Li32Ins extends InstructionDefinition implements AlchemyTypeIns { @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem ofs = stack.pop(); - stack.push(new AlchemyLoadAVM2Item(ins, localData.lineStartInstruction, ofs, 'i', 32)); + stack.push(new AlchemyLoadAVM2Item(ins, localData.lineStartInstruction, ofs, "i", 32)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Li8Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Li8Ins.java index f9e1cad23..970fdf864 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Li8Ins.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Li8Ins.java @@ -22,6 +22,7 @@ import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2RangeErrorException; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; import com.jpexs.decompiler.flash.abc.avm2.model.AlchemyLoadAVM2Item; import com.jpexs.decompiler.flash.ecma.EcmaScript; @@ -36,7 +37,7 @@ import java.util.List; public class Li8Ins extends InstructionDefinition implements AlchemyTypeIns { public Li8Ins() { - super(0x35, "li8", new int[]{}, true); + super(0x35, "li8", new int[]{}, true, AVM2InstructionFlag.DOMAIN_MEMORY); } @Override @@ -54,7 +55,7 @@ public class Li8Ins extends InstructionDefinition implements AlchemyTypeIns { @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem ofs = stack.pop(); - stack.push(new AlchemyLoadAVM2Item(ins, localData.lineStartInstruction, ofs, 'i', 8)); + stack.push(new AlchemyLoadAVM2Item(ins, localData.lineStartInstruction, ofs, "i", 8)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sf32Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sf32Ins.java index c80eec129..9d6bfd526 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sf32Ins.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sf32Ins.java @@ -22,6 +22,7 @@ import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2RangeErrorException; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; import com.jpexs.decompiler.flash.abc.avm2.model.AlchemyStoreAVM2Item; import com.jpexs.decompiler.flash.ecma.EcmaScript; @@ -36,7 +37,7 @@ import java.util.List; public class Sf32Ins extends InstructionDefinition implements AlchemyTypeIns { public Sf32Ins() { - super(0x3D, "sf32", new int[]{}, true); + super(0x3D, "sf32", new int[]{}, true, AVM2InstructionFlag.DOMAIN_MEMORY); } @Override @@ -57,7 +58,7 @@ public class Sf32Ins extends InstructionDefinition implements AlchemyTypeIns { public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem ofs = stack.pop(); GraphTargetItem value = stack.pop(); - output.add(new AlchemyStoreAVM2Item(ins, localData.lineStartInstruction, value, ofs, 'f', 32)); + output.add(new AlchemyStoreAVM2Item(ins, localData.lineStartInstruction, value, ofs, "f", 32)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sf64Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sf64Ins.java index 67c0c91d3..f79bc3848 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sf64Ins.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sf64Ins.java @@ -22,6 +22,7 @@ import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2RangeErrorException; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; import com.jpexs.decompiler.flash.abc.avm2.model.AlchemyStoreAVM2Item; import com.jpexs.decompiler.flash.ecma.EcmaScript; @@ -36,7 +37,7 @@ import java.util.List; public class Sf64Ins extends InstructionDefinition implements AlchemyTypeIns { public Sf64Ins() { - super(0x3E, "sf64", new int[]{}, true); + super(0x3E, "sf64", new int[]{}, true, AVM2InstructionFlag.DOMAIN_MEMORY); } @Override @@ -57,7 +58,7 @@ public class Sf64Ins extends InstructionDefinition implements AlchemyTypeIns { public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem ofs = stack.pop(); GraphTargetItem value = stack.pop(); - output.add(new AlchemyStoreAVM2Item(ins, localData.lineStartInstruction, value, ofs, 'f', 64)); + output.add(new AlchemyStoreAVM2Item(ins, localData.lineStartInstruction, value, ofs, "f", 64)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Si16Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Si16Ins.java index 05494e63c..356d2d415 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Si16Ins.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Si16Ins.java @@ -22,6 +22,7 @@ import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2RangeErrorException; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; import com.jpexs.decompiler.flash.abc.avm2.model.AlchemyStoreAVM2Item; import com.jpexs.decompiler.flash.ecma.EcmaScript; @@ -36,7 +37,7 @@ import java.util.List; public class Si16Ins extends InstructionDefinition implements AlchemyTypeIns { public Si16Ins() { - super(0x3B, "si16", new int[]{}, true); + super(0x3B, "si16", new int[]{}, true, AVM2InstructionFlag.DOMAIN_MEMORY); } @Override @@ -57,7 +58,7 @@ public class Si16Ins extends InstructionDefinition implements AlchemyTypeIns { public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem ofs = stack.pop(); GraphTargetItem value = stack.pop(); - output.add(new AlchemyStoreAVM2Item(ins, localData.lineStartInstruction, value, ofs, 'i', 16)); + output.add(new AlchemyStoreAVM2Item(ins, localData.lineStartInstruction, value, ofs, "i", 16)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Si32Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Si32Ins.java index 1b7601a20..12b272e30 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Si32Ins.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Si32Ins.java @@ -22,6 +22,7 @@ import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2RangeErrorException; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; import com.jpexs.decompiler.flash.abc.avm2.model.AlchemyStoreAVM2Item; import com.jpexs.decompiler.flash.ecma.EcmaScript; @@ -36,7 +37,7 @@ import java.util.List; public class Si32Ins extends InstructionDefinition implements AlchemyTypeIns { public Si32Ins() { - super(0x3C, "si32", new int[]{}, true); + super(0x3C, "si32", new int[]{}, true, AVM2InstructionFlag.DOMAIN_MEMORY); } @Override @@ -57,7 +58,7 @@ public class Si32Ins extends InstructionDefinition implements AlchemyTypeIns { public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem ofs = stack.pop(); GraphTargetItem value = stack.pop(); - output.add(new AlchemyStoreAVM2Item(ins, localData.lineStartInstruction, value, ofs, 'i', 32)); + output.add(new AlchemyStoreAVM2Item(ins, localData.lineStartInstruction, value, ofs, "i", 32)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Si8Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Si8Ins.java index 964a14571..fe657244b 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Si8Ins.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Si8Ins.java @@ -22,6 +22,7 @@ import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2RangeErrorException; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; import com.jpexs.decompiler.flash.abc.avm2.model.AlchemyStoreAVM2Item; import com.jpexs.decompiler.flash.ecma.EcmaScript; @@ -36,7 +37,7 @@ import java.util.List; public class Si8Ins extends InstructionDefinition implements AlchemyTypeIns { public Si8Ins() { - super(0x3A, "si8", new int[]{}, true); + super(0x3A, "si8", new int[]{}, true, AVM2InstructionFlag.DOMAIN_MEMORY); } @Override @@ -57,7 +58,7 @@ public class Si8Ins extends InstructionDefinition implements AlchemyTypeIns { public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem ofs = stack.pop(); GraphTargetItem value = stack.pop(); - output.add(new AlchemyStoreAVM2Item(ins, localData.lineStartInstruction, value, ofs, 'i', 8)); + output.add(new AlchemyStoreAVM2Item(ins, localData.lineStartInstruction, value, ofs, "i", 8)); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sxi16Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sxi16Ins.java index be03b4308..3f2366490 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sxi16Ins.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sxi16Ins.java @@ -21,6 +21,7 @@ import com.jpexs.decompiler.flash.abc.AVM2LocalData; import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; import com.jpexs.decompiler.flash.abc.avm2.model.AlchemySignExtendAVM2Item; import com.jpexs.decompiler.flash.ecma.EcmaScript; @@ -35,7 +36,7 @@ import java.util.List; public class Sxi16Ins extends InstructionDefinition implements AlchemyTypeIns { public Sxi16Ins() { - super(0x52, "sxi16", new int[]{}, false); + super(0x52, "sxi16", new int[]{}, false, AVM2InstructionFlag.DOMAIN_MEMORY); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sxi1Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sxi1Ins.java index 8d90a9457..f5e8e19ef 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sxi1Ins.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sxi1Ins.java @@ -21,6 +21,7 @@ import com.jpexs.decompiler.flash.abc.AVM2LocalData; import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; import com.jpexs.decompiler.flash.abc.avm2.model.AlchemySignExtendAVM2Item; import com.jpexs.decompiler.flash.ecma.EcmaScript; @@ -35,7 +36,7 @@ import java.util.List; public class Sxi1Ins extends InstructionDefinition implements AlchemyTypeIns { public Sxi1Ins() { - super(0x50, "sxi1", new int[]{}, false); + super(0x50, "sxi1", new int[]{}, false, AVM2InstructionFlag.DOMAIN_MEMORY); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sxi8Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sxi8Ins.java index 29638bf3d..bee328aae 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sxi8Ins.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sxi8Ins.java @@ -21,6 +21,7 @@ import com.jpexs.decompiler.flash.abc.AVM2LocalData; import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; import com.jpexs.decompiler.flash.abc.avm2.model.AlchemySignExtendAVM2Item; import com.jpexs.decompiler.flash.ecma.EcmaScript; @@ -35,7 +36,7 @@ import java.util.List; public class Sxi8Ins extends InstructionDefinition implements AlchemyTypeIns { public Sxi8Ins() { - super(0x51, "sxi8", new int[]{}, false); + super(0x51, "sxi8", new int[]{}, false, AVM2InstructionFlag.DOMAIN_MEMORY); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/AbsJumpIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/AbsJumpIns.java index 2313b672e..0ba4d0901 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/AbsJumpIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/AbsJumpIns.java @@ -22,6 +22,7 @@ import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; /** @@ -31,7 +32,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; public class AbsJumpIns extends InstructionDefinition { public AbsJumpIns() { - super(0xEE, "abs_jump", new int[]{}, false /*?*/); + super(0xEE, "abs_jump", new int[]{}, false /*?*/, AVM2InstructionFlag.UNDOCUMENTED, AVM2InstructionFlag.UNKNOWN_OPERANDS, AVM2InstructionFlag.NO_FLASH_PLAYER); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/AddDIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/AddDIns.java index ed313a631..b9c0945df 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/AddDIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/AddDIns.java @@ -22,6 +22,7 @@ import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; /** @@ -31,7 +32,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; public class AddDIns extends InstructionDefinition { public AddDIns() { - super(0x9B, "add_d", new int[]{}, true /*?*/); + super(0x9B, "add_d", new int[]{}, true /*?*/, AVM2InstructionFlag.NO_FLASH_PLAYER, AVM2InstructionFlag.UNKNOWN_OPERANDS, AVM2InstructionFlag.UNKNOWN_STACK); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/AddPIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/AddPIns.java index fcf4d0e6f..075d9088d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/AddPIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/AddPIns.java @@ -22,6 +22,7 @@ import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; /** @@ -31,7 +32,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; public class AddPIns extends InstructionDefinition { public AddPIns() { - super(0xB5, "add_p", new int[]{AVM2Code.DAT_NUMBER_CONTEXT}, true /*?*/); + super(0xB5, "add_p", new int[]{AVM2Code.DAT_NUMBER_CONTEXT}, true /*?*/, AVM2InstructionFlag.ES4_NUMERICS_MINOR, AVM2InstructionFlag.NO_FLASH_PLAYER); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/AllocIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/AllocIns.java index a416c81e3..ae273cd49 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/AllocIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/AllocIns.java @@ -22,6 +22,7 @@ import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; /** @@ -31,7 +32,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; public class AllocIns extends InstructionDefinition { public AllocIns() { - super(0xF6, "alloc", new int[]{}, true /*?*/); + super(0xF6, "alloc", new int[]{}, true /*?*/, AVM2InstructionFlag.NO_FLASH_PLAYER, AVM2InstructionFlag.UNDOCUMENTED, AVM2InstructionFlag.UNKNOWN_OPERANDS, AVM2InstructionFlag.UNKNOWN_STACK); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/BkptLineIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/BkptLineIns.java index 817794727..77e45d722 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/BkptLineIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/BkptLineIns.java @@ -30,7 +30,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; public class BkptLineIns extends InstructionDefinition { public BkptLineIns() { - super(0xF2, "bkptline", new int[]{AVM2Code.OPT_U30}, false /*?*/); + super(0xF2, "bkptline", new int[]{AVM2Code.DAT_LINENUM}, false /*?*/); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/CallInterfaceIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/CallInterfaceIns.java index 1d288ef8c..c332bfd96 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/CallInterfaceIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/CallInterfaceIns.java @@ -22,6 +22,7 @@ import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; /** @@ -31,7 +32,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; public class CallInterfaceIns extends InstructionDefinition { public CallInterfaceIns() { - super(0x4D, "callinterface", new int[]{AVM2Code.DAT_CLASS_INDEX}, true); + super(0x4D, "callinterface", new int[]{AVM2Code.DAT_CLASS_INDEX}, true, AVM2InstructionFlag.NO_FLASH_PLAYER, AVM2InstructionFlag.UNKNOWN_STACK, AVM2InstructionFlag.UNDOCUMENTED); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/CallSuperIdIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/CallSuperIdIns.java index d39002085..4e91c0120 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/CallSuperIdIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/CallSuperIdIns.java @@ -21,6 +21,7 @@ import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; /** @@ -30,7 +31,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; public class CallSuperIdIns extends InstructionDefinition { public CallSuperIdIns() { - super(0x4B, "callsuperid", new int[]{}, true); + super(0x4B, "callsuperid", new int[]{}, true, AVM2InstructionFlag.NO_FLASH_PLAYER, AVM2InstructionFlag.UNDOCUMENTED, AVM2InstructionFlag.UNKNOWN_OPERANDS, AVM2InstructionFlag.UNKNOWN_STACK); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/CodeGenOpIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/CodeGenOpIns.java index e64812be4..8044880d3 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/CodeGenOpIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/CodeGenOpIns.java @@ -22,6 +22,7 @@ import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; /** @@ -31,7 +32,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; public class CodeGenOpIns extends InstructionDefinition { public CodeGenOpIns() { - super(0xFD, "codegenop", new int[]{}, false /*?*/); + super(0xFD, "codegenop", new int[]{}, false /*?*/, AVM2InstructionFlag.UNDOCUMENTED, AVM2InstructionFlag.UNKNOWN_OPERANDS, AVM2InstructionFlag.UNKNOWN_STACK, AVM2InstructionFlag.NO_FLASH_PLAYER); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/CoerceBIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/CoerceBIns.java index 494d0a444..ce4a97e6f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/CoerceBIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/CoerceBIns.java @@ -20,6 +20,7 @@ import com.jpexs.decompiler.flash.abc.ABC; import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; import com.jpexs.decompiler.flash.abc.avm2.instructions.types.CoerceOrConvertTypeIns; import com.jpexs.decompiler.flash.ecma.EcmaScript; @@ -34,7 +35,7 @@ import com.jpexs.decompiler.graph.TypeItem; public class CoerceBIns extends InstructionDefinition implements CoerceOrConvertTypeIns { public CoerceBIns() { - super(0x81, "coerce_b", new int[]{}, true); // stack: -1+1 + super(0x81, "coerce_b", new int[]{}, true, AVM2InstructionFlag.DEPRECATED); // stack: -1+1 } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/CoerceDIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/CoerceDIns.java index caf13d850..005c562fa 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/CoerceDIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/CoerceDIns.java @@ -20,6 +20,7 @@ import com.jpexs.decompiler.flash.abc.ABC; import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; import com.jpexs.decompiler.flash.abc.avm2.instructions.types.CoerceOrConvertTypeIns; import com.jpexs.decompiler.flash.ecma.EcmaScript; @@ -34,7 +35,7 @@ import com.jpexs.decompiler.graph.TypeItem; public class CoerceDIns extends InstructionDefinition implements CoerceOrConvertTypeIns { public CoerceDIns() { - super(0x84, "coerce_d", new int[]{}, true); // stack: -1+1 + super(0x84, "coerce_d", new int[]{}, true, AVM2InstructionFlag.DEPRECATED); // stack: -1+1 } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/CoerceIIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/CoerceIIns.java index 018e29863..7a070342e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/CoerceIIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/CoerceIIns.java @@ -20,6 +20,7 @@ import com.jpexs.decompiler.flash.abc.ABC; import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; import com.jpexs.decompiler.flash.abc.avm2.instructions.types.CoerceOrConvertTypeIns; import com.jpexs.decompiler.flash.ecma.EcmaScript; @@ -34,7 +35,7 @@ import com.jpexs.decompiler.graph.TypeItem; public class CoerceIIns extends InstructionDefinition implements CoerceOrConvertTypeIns { public CoerceIIns() { - super(0x83, "coerce_i", new int[]{}, true); // stack: -1+1 + super(0x83, "coerce_i", new int[]{}, true, AVM2InstructionFlag.DEPRECATED); // stack: -1+1 } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/ConcatIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/ConcatIns.java index ba15e5d1a..b23217c5f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/ConcatIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/ConcatIns.java @@ -22,6 +22,7 @@ import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; /** @@ -31,7 +32,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; public class ConcatIns extends InstructionDefinition { public ConcatIns() { - super(0x9A, "concat", new int[]{}, true /*?*/); + super(0x9A, "concat", new int[]{}, true /*?*/, AVM2InstructionFlag.NO_FLASH_PLAYER, AVM2InstructionFlag.UNDOCUMENTED, AVM2InstructionFlag.UNKNOWN_OPERANDS, AVM2InstructionFlag.UNKNOWN_STACK); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/ConvertF4Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/ConvertF4Ins.java index 0a20cbc04..c6dc82b43 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/ConvertF4Ins.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/ConvertF4Ins.java @@ -22,6 +22,7 @@ import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; /** @@ -31,7 +32,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; public class ConvertF4Ins extends InstructionDefinition { public ConvertF4Ins() { - super(0x7B, "convert_f4", new int[]{}, true); + super(0x7B, "convert_f4", new int[]{}, true, AVM2InstructionFlag.FLOAT_MAJOR, AVM2InstructionFlag.NO_FLASH_PLAYER); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/ConvertFIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/ConvertFIns.java new file mode 100644 index 000000000..7a8040294 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/ConvertFIns.java @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2010-2016 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. + */ +package com.jpexs.decompiler.flash.abc.avm2.instructions.other2; + +import com.jpexs.decompiler.flash.abc.ABC; +import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool; +import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime; +import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; +import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; +import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; + +/** + * + * @author JPEXS + */ +public class ConvertFIns extends InstructionDefinition { + + public ConvertFIns() { + super(0x79, "convert_f", new int[]{}, true, AVM2InstructionFlag.FLOAT_MAJOR, AVM2InstructionFlag.NO_FLASH_PLAYER); + } + + @Override + public void verify(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2VerifyErrorException { + if (lda.getRuntime() == AVM2Runtime.ADOBE_FLASH) { + illegalOpCode(lda, ins); + } + + super.verify(lda, constants, ins); + } + + @Override + public int getStackPopCount(AVM2Instruction ins, ABC abc) { + return 1; + } + + @Override + public int getStackPushCount(AVM2Instruction ins, ABC abc) { + return 1; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/ConvertMIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/ConvertMIns.java index 814533497..b96e4a03a 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/ConvertMIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/ConvertMIns.java @@ -22,6 +22,7 @@ import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; /** @@ -31,7 +32,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; public class ConvertMIns extends InstructionDefinition { public ConvertMIns() { - super(0x79, "convert_m", new int[]{}, true); // -1 +1 + super(0x79, "convert_m", new int[]{}, true, AVM2InstructionFlag.ES4_NUMERICS_MINOR, AVM2InstructionFlag.NO_FLASH_PLAYER); // -1 +1 } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/ConvertMPIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/ConvertMPIns.java index 0c2f05082..a446857ea 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/ConvertMPIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/ConvertMPIns.java @@ -23,6 +23,7 @@ import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; /** @@ -32,7 +33,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; public class ConvertMPIns extends InstructionDefinition { public ConvertMPIns() { - super(0x7A, "convert_m_p", new int[]{AVM2Code.DAT_NUMBER_CONTEXT}, true); + super(0x7A, "convert_m_p", new int[]{AVM2Code.DAT_NUMBER_CONTEXT}, true, AVM2InstructionFlag.ES4_NUMERICS_MINOR, AVM2InstructionFlag.NO_FLASH_PLAYER); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/DecLocalPIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/DecLocalPIns.java index abcf3056a..d9f580022 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/DecLocalPIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/DecLocalPIns.java @@ -22,6 +22,7 @@ import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; /** @@ -31,7 +32,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; public class DecLocalPIns extends InstructionDefinition { public DecLocalPIns() { - super(0x9F, "declocal_p", new int[]{AVM2Code.DAT_NUMBER_CONTEXT, AVM2Code.DAT_LOCAL_REG_INDEX}, false /*?*/); + super(0x9F, "declocal_p", new int[]{AVM2Code.DAT_NUMBER_CONTEXT, AVM2Code.DAT_LOCAL_REG_INDEX}, false /*?*/, AVM2InstructionFlag.ES4_NUMERICS_MINOR, AVM2InstructionFlag.NO_FLASH_PLAYER); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/DecodeIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/DecodeIns.java index c9a7ae231..8fa9b0a4b 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/DecodeIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/DecodeIns.java @@ -22,6 +22,7 @@ import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; /** @@ -31,7 +32,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; public class DecodeIns extends InstructionDefinition { public DecodeIns() { - super(0xFF, "decode", new int[]{}, false /*?*/); + super(0xFF, "decode", new int[]{}, false /*?*/, AVM2InstructionFlag.NO_FLASH_PLAYER, AVM2InstructionFlag.UNDOCUMENTED, AVM2InstructionFlag.UNKNOWN_OPERANDS, AVM2InstructionFlag.UNKNOWN_STACK); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/DecrementPIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/DecrementPIns.java index d6ac75ea5..08db8bf39 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/DecrementPIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/DecrementPIns.java @@ -22,6 +22,7 @@ import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; /** @@ -31,7 +32,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; public class DecrementPIns extends InstructionDefinition { public DecrementPIns() { - super(0x9E, "decrement_p", new int[]{AVM2Code.DAT_NUMBER_CONTEXT}, true /*?*/); + super(0x9E, "decrement_p", new int[]{AVM2Code.DAT_NUMBER_CONTEXT}, true /*?*/, AVM2InstructionFlag.ES4_NUMERICS_MINOR, AVM2InstructionFlag.NO_FLASH_PLAYER); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/DelDescendantsIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/DelDescendantsIns.java index de04c68b9..c250067fd 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/DelDescendantsIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/DelDescendantsIns.java @@ -23,6 +23,7 @@ import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; /** @@ -32,7 +33,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; public class DelDescendantsIns extends InstructionDefinition { public DelDescendantsIns() { - super(0x5B, "deldescendants", new int[]{AVM2Code.DAT_MULTINAME_INDEX}, true); + super(0x5B, "deldescendants", new int[]{AVM2Code.DAT_MULTINAME_INDEX}, true, AVM2InstructionFlag.NO_FLASH_PLAYER, AVM2InstructionFlag.UNKNOWN_STACK, AVM2InstructionFlag.UNDOCUMENTED); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/DeletePropertyLateIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/DeletePropertyLateIns.java index 936d67813..173a74bed 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/DeletePropertyLateIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/DeletePropertyLateIns.java @@ -22,6 +22,7 @@ import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; /** @@ -31,7 +32,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; public class DeletePropertyLateIns extends InstructionDefinition { public DeletePropertyLateIns() { - super(0x6B, "deletepropertylate", new int[]{}, true /*?*/); + super(0x6B, "deletepropertylate", new int[]{}, true /*?*/, AVM2InstructionFlag.NO_FLASH_PLAYER, AVM2InstructionFlag.UNDOCUMENTED, AVM2InstructionFlag.UNKNOWN_STACK); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/DividePIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/DividePIns.java index 0089ed4f4..5e861c51a 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/DividePIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/DividePIns.java @@ -23,6 +23,7 @@ import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; /** @@ -32,7 +33,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; public class DividePIns extends InstructionDefinition { public DividePIns() { - super(0xB8, "divide_p", new int[]{AVM2Code.DAT_NUMBER_CONTEXT}, true /*?*/); + super(0xB8, "divide_p", new int[]{AVM2Code.DAT_NUMBER_CONTEXT}, true /*?*/, AVM2InstructionFlag.ES4_NUMERICS_MINOR, AVM2InstructionFlag.NO_FLASH_PLAYER); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/DoubleToAtomIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/DoubleToAtomIns.java index 2254e1298..979a433cb 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/DoubleToAtomIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/DoubleToAtomIns.java @@ -22,6 +22,7 @@ import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; /** @@ -31,7 +32,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; public class DoubleToAtomIns extends InstructionDefinition { public DoubleToAtomIns() { - super(0xFB, "doubletoatom", new int[]{}, true /*?*/); + super(0xFB, "doubletoatom", new int[]{}, true /*?*/, AVM2InstructionFlag.UNDOCUMENTED, AVM2InstructionFlag.UNKNOWN_OPERANDS, AVM2InstructionFlag.UNKNOWN_STACK, AVM2InstructionFlag.NO_FLASH_PLAYER); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/FindPropGlobalIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/FindPropGlobalIns.java index 93b030af1..983420aff 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/FindPropGlobalIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/FindPropGlobalIns.java @@ -23,6 +23,7 @@ import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; /** @@ -32,7 +33,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; public class FindPropGlobalIns extends InstructionDefinition { public FindPropGlobalIns() { - super(0x5C, "findpropglobal", new int[]{AVM2Code.DAT_MULTINAME_INDEX}, true); + super(0x5C, "findpropglobal", new int[]{AVM2Code.DAT_MULTINAME_INDEX}, true, AVM2InstructionFlag.NO_FLASH_PLAYER, AVM2InstructionFlag.UNKNOWN_STACK); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/FindPropGlobalStrictIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/FindPropGlobalStrictIns.java index 4db0c50f4..240f5248b 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/FindPropGlobalStrictIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/FindPropGlobalStrictIns.java @@ -19,6 +19,7 @@ package com.jpexs.decompiler.flash.abc.avm2.instructions.other2; import com.jpexs.decompiler.flash.abc.ABC; import com.jpexs.decompiler.flash.abc.avm2.AVM2Code; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; /** @@ -28,7 +29,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; public class FindPropGlobalStrictIns extends InstructionDefinition { public FindPropGlobalStrictIns() { - super(0x5B, "findpropglobalstrict", new int[]{AVM2Code.DAT_MULTINAME_INDEX}, true); + super(0x5B, "findpropglobalstrict", new int[]{AVM2Code.DAT_MULTINAME_INDEX}, true, AVM2InstructionFlag.NO_FLASH_PLAYER, AVM2InstructionFlag.UNKNOWN_STACK); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/GetOuterScopeIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/GetOuterScopeIns.java index 1ed0205ef..473945dbe 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/GetOuterScopeIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/GetOuterScopeIns.java @@ -28,7 +28,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; public class GetOuterScopeIns extends InstructionDefinition { public GetOuterScopeIns() { - super(0x67, "getouterscope", new int[]{AVM2Code.DAT_MULTINAME_INDEX}, false); + super(0x67, "getouterscope", new int[]{AVM2Code.DAT_SCOPE_INDEX}, false); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/GetPropertyLateIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/GetPropertyLateIns.java index 7da3fa393..dac13127d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/GetPropertyLateIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/GetPropertyLateIns.java @@ -18,6 +18,7 @@ package com.jpexs.decompiler.flash.abc.avm2.instructions.other2; import com.jpexs.decompiler.flash.abc.ABC; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; /** @@ -27,7 +28,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; public class GetPropertyLateIns extends InstructionDefinition { public GetPropertyLateIns() { - super(0x67, "getpropertylate", new int[]{}, true /*?*/); + super(0x67, "getpropertylate", new int[]{}, true /*?*/, AVM2InstructionFlag.UNDOCUMENTED, AVM2InstructionFlag.UNKNOWN_STACK, AVM2InstructionFlag.NO_FLASH_PLAYER); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/IncLocalPIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/IncLocalPIns.java index 3525a07de..e088ca446 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/IncLocalPIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/IncLocalPIns.java @@ -22,6 +22,7 @@ import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; /** @@ -31,7 +32,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; public class IncLocalPIns extends InstructionDefinition { public IncLocalPIns() { - super(0x9D, "inclocal_p", new int[]{AVM2Code.DAT_NUMBER_CONTEXT, AVM2Code.DAT_LOCAL_REG_INDEX}, true /*?*/); + super(0x9D, "inclocal_p", new int[]{AVM2Code.DAT_NUMBER_CONTEXT, AVM2Code.DAT_LOCAL_REG_INDEX}, true /*?*/, AVM2InstructionFlag.ES4_NUMERICS_MINOR, AVM2InstructionFlag.NO_FLASH_PLAYER); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/IncrementPIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/IncrementPIns.java index c447b5306..95aae7a2c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/IncrementPIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/IncrementPIns.java @@ -22,6 +22,7 @@ import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; /** @@ -31,7 +32,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; public class IncrementPIns extends InstructionDefinition { public IncrementPIns() { - super(0x9C, "increment_p", new int[]{AVM2Code.DAT_NUMBER_CONTEXT}, true /*?*/); + super(0x9C, "increment_p", new int[]{AVM2Code.DAT_NUMBER_CONTEXT}, true /*?*/, AVM2InstructionFlag.ES4_NUMERICS_MINOR, AVM2InstructionFlag.NO_FLASH_PLAYER); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/InvalidIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/InvalidIns.java index fefc9ad7e..cb50f35f3 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/InvalidIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/InvalidIns.java @@ -21,6 +21,7 @@ import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; /** @@ -30,7 +31,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; public class InvalidIns extends InstructionDefinition { public InvalidIns() { - super(0xED, "invalid", new int[]{}, false); + super(0xED, "invalid", new int[]{}, false, AVM2InstructionFlag.NO_FLASH_PLAYER, AVM2InstructionFlag.UNKNOWN_OPERANDS, AVM2InstructionFlag.UNKNOWN_STACK, AVM2InstructionFlag.UNDOCUMENTED); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/Lf32x4Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/Lf32x4Ins.java index 7ee7f8487..6710e1444 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/Lf32x4Ins.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/Lf32x4Ins.java @@ -16,12 +16,19 @@ */ package com.jpexs.decompiler.flash.abc.avm2.instructions.other2; +import com.jpexs.decompiler.flash.abc.ABC; +import com.jpexs.decompiler.flash.abc.AVM2LocalData; import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool; import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; +import com.jpexs.decompiler.flash.abc.avm2.model.AlchemyLoadAVM2Item; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.TranslateStack; +import java.util.List; /** * @@ -30,7 +37,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; public class Lf32x4Ins extends InstructionDefinition { public Lf32x4Ins() { - super(0x0A, "lf32x4", new int[]{}, true); + super(0x0A, "lf32x4", new int[]{}, true, AVM2InstructionFlag.NO_FLASH_PLAYER, AVM2InstructionFlag.DOMAIN_MEMORY, AVM2InstructionFlag.FLOAT_MAJOR); } @Override @@ -41,4 +48,20 @@ public class Lf32x4Ins extends InstructionDefinition { super.verify(lda, constants, ins); } + + @Override + public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { + GraphTargetItem ofs = stack.pop(); + stack.push(new AlchemyLoadAVM2Item(ins, localData.lineStartInstruction, ofs, "f4", 32)); + } + + @Override + public int getStackPopCount(AVM2Instruction ins, ABC abc) { + return 1; + } + + @Override + public int getStackPushCount(AVM2Instruction ins, ABC abc) { + return 1; + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/MarkIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/MarkIns.java index 817586c59..9025b78ec 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/MarkIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/MarkIns.java @@ -22,6 +22,7 @@ import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; /** @@ -31,7 +32,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; public class MarkIns extends InstructionDefinition { public MarkIns() { - super(0xF7, "mark", new int[]{}, false /*?*/); + super(0xF7, "mark", new int[]{}, false /*?*/, AVM2InstructionFlag.NO_FLASH_PLAYER, AVM2InstructionFlag.UNDOCUMENTED, AVM2InstructionFlag.UNKNOWN_STACK, AVM2InstructionFlag.UNKNOWN_OPERANDS); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/ModuloPIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/ModuloPIns.java index 507686df2..d1b5d8740 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/ModuloPIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/ModuloPIns.java @@ -23,6 +23,7 @@ import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; /** @@ -32,7 +33,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; public class ModuloPIns extends InstructionDefinition { public ModuloPIns() { - super(0xB9, "modulo_p", new int[]{AVM2Code.DAT_NUMBER_CONTEXT}, true /*?*/); + super(0xB9, "modulo_p", new int[]{AVM2Code.DAT_NUMBER_CONTEXT}, true /*?*/, AVM2InstructionFlag.NO_FLASH_PLAYER, AVM2InstructionFlag.ES4_NUMERICS_MINOR); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/MultiplyPIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/MultiplyPIns.java index b12c1fdb6..eee2ee770 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/MultiplyPIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/MultiplyPIns.java @@ -23,6 +23,7 @@ import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; /** @@ -32,7 +33,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; public class MultiplyPIns extends InstructionDefinition { public MultiplyPIns() { - super(0xB7, "multiply_p", new int[]{AVM2Code.DAT_NUMBER_CONTEXT}, true /*?*/); + super(0xB7, "multiply_p", new int[]{AVM2Code.DAT_NUMBER_CONTEXT}, true /*?*/, AVM2InstructionFlag.NO_FLASH_PLAYER, AVM2InstructionFlag.ES4_NUMERICS_MINOR); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/NegatePIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/NegatePIns.java index 83fb3ea90..8919fad9d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/NegatePIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/NegatePIns.java @@ -23,6 +23,7 @@ import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; /** @@ -32,7 +33,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; public class NegatePIns extends InstructionDefinition { public NegatePIns() { - super(0x8F, "negate_p", new int[]{AVM2Code.DAT_NUMBER_CONTEXT}, true /*?*/); + super(0x8F, "negate_p", new int[]{AVM2Code.DAT_NUMBER_CONTEXT}, true /*?*/, AVM2InstructionFlag.NO_FLASH_PLAYER, AVM2InstructionFlag.ES4_NUMERICS_MINOR); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/PrologueIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/PrologueIns.java index 647b7af58..065053618 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/PrologueIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/PrologueIns.java @@ -22,6 +22,7 @@ import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; /** @@ -31,7 +32,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; public class PrologueIns extends InstructionDefinition { public PrologueIns() { - super(0xF9, "prologue", new int[]{}, false /*?*/); + super(0xF9, "prologue", new int[]{}, false /*?*/, AVM2InstructionFlag.NO_FLASH_PLAYER, AVM2InstructionFlag.UNKNOWN_STACK, AVM2InstructionFlag.UNKNOWN_OPERANDS, AVM2InstructionFlag.UNDOCUMENTED); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/PushUninitializedIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/PushConstantIns.java similarity index 80% rename from libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/PushUninitializedIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/PushConstantIns.java index d7deb877f..e1301f245 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/PushUninitializedIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/PushConstantIns.java @@ -19,16 +19,17 @@ package com.jpexs.decompiler.flash.abc.avm2.instructions.other2; import com.jpexs.decompiler.flash.abc.ABC; import com.jpexs.decompiler.flash.abc.avm2.AVM2Code; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; /** * * @author JPEXS */ -public class PushUninitializedIns extends InstructionDefinition { +public class PushConstantIns extends InstructionDefinition { - public PushUninitializedIns() { - super(0x22, "pushuninitialized", new int[]{AVM2Code.OPT_U30}, false /*?*/); + public PushConstantIns() { + super(0x22, "pushconstant", new int[]{AVM2Code.OPT_U30}, false /*?*/, AVM2InstructionFlag.UNDOCUMENTED, AVM2InstructionFlag.UNKNOWN_STACK); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/PushDNanIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/PushDNanIns.java index bf17c32d2..a5cdfbb77 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/PushDNanIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/PushDNanIns.java @@ -22,6 +22,7 @@ import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; /** @@ -31,7 +32,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; public class PushDNanIns extends InstructionDefinition { public PushDNanIns() { - super(0x34, "pushdnan", new int[]{}, true); + super(0x34, "pushdnan", new int[]{}, true, AVM2InstructionFlag.NO_FLASH_PLAYER, AVM2InstructionFlag.ES4_NUMERICS_MINOR, AVM2InstructionFlag.UNKNOWN_STACK); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/PushDecimalIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/PushDecimalIns.java index 8112e33af..a75130c2d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/PushDecimalIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/PushDecimalIns.java @@ -23,6 +23,7 @@ import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; /** @@ -32,7 +33,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; public class PushDecimalIns extends InstructionDefinition { public PushDecimalIns() { - super(0x33, "pushdecimal", new int[]{AVM2Code.DAT_DECIMAL_INDEX}, true); + super(0x33, "pushdecimal", new int[]{AVM2Code.DAT_DECIMAL_INDEX}, true, AVM2InstructionFlag.NO_FLASH_PLAYER, AVM2InstructionFlag.ES4_NUMERICS_MINOR); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/PushFloat4Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/PushFloat4Ins.java index cd4e03fe8..6a72f3a71 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/PushFloat4Ins.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/PushFloat4Ins.java @@ -22,6 +22,7 @@ import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; /** @@ -31,7 +32,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; public class PushFloat4Ins extends InstructionDefinition { public PushFloat4Ins() { - super(0x54, "pushfloat4", new int[]{AVM2Code.DAT_FLOAT4_INDEX}, false); + super(0x54, "pushfloat4", new int[]{AVM2Code.DAT_FLOAT4_INDEX}, false, AVM2InstructionFlag.NO_FLASH_PLAYER, AVM2InstructionFlag.FLOAT_MAJOR); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/PushFloatIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/PushFloatIns.java index 9fb8247a3..76d125be1 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/PushFloatIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/PushFloatIns.java @@ -23,6 +23,7 @@ import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; /** @@ -32,7 +33,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; public class PushFloatIns extends InstructionDefinition { public PushFloatIns() { - super(0x22, "pushfloat", new int[]{AVM2Code.DAT_FLOAT_INDEX}, false /*?*/); + super(0x22, "pushfloat", new int[]{AVM2Code.DAT_FLOAT_INDEX}, false /*?*/, AVM2InstructionFlag.NO_FLASH_PLAYER, AVM2InstructionFlag.FLOAT_MAJOR); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/SendEnterIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/SendEnterIns.java index 9a7b0555b..6c369d151 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/SendEnterIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/SendEnterIns.java @@ -22,6 +22,7 @@ import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; /** @@ -31,7 +32,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; public class SendEnterIns extends InstructionDefinition { public SendEnterIns() { - super(0xFA, "sendenter", new int[]{}, false /*?*/); + super(0xFA, "sendenter", new int[]{}, false /*?*/, AVM2InstructionFlag.NO_FLASH_PLAYER, AVM2InstructionFlag.UNDOCUMENTED, AVM2InstructionFlag.UNKNOWN_OPERANDS, AVM2InstructionFlag.UNKNOWN_STACK); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/SetPropertyLateIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/SetPropertyLateIns.java index 7c4e5d393..2c8290532 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/SetPropertyLateIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/SetPropertyLateIns.java @@ -22,6 +22,7 @@ import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; /** @@ -31,7 +32,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; public class SetPropertyLateIns extends InstructionDefinition { public SetPropertyLateIns() { - super(0x69, "setpropertylate", new int[]{}, true /*?*/); + super(0x69, "setpropertylate", new int[]{}, true /*?*/, AVM2InstructionFlag.NO_FLASH_PLAYER, AVM2InstructionFlag.UNKNOWN_OPERANDS, AVM2InstructionFlag.UNKNOWN_STACK, AVM2InstructionFlag.UNDOCUMENTED); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/Sf32x4Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/Sf32x4Ins.java index 252443a33..02accf9e6 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/Sf32x4Ins.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/Sf32x4Ins.java @@ -21,6 +21,7 @@ import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; /** @@ -30,7 +31,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; public class Sf32x4Ins extends InstructionDefinition { public Sf32x4Ins() { - super(0x0B, "sf32x4", new int[]{}, true); + super(0x0B, "sf32x4", new int[]{}, true, AVM2InstructionFlag.NO_FLASH_PLAYER, AVM2InstructionFlag.DOMAIN_MEMORY, AVM2InstructionFlag.FLOAT_MAJOR); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/SubtractPIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/SubtractPIns.java index 336cd2439..6563e59f0 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/SubtractPIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/SubtractPIns.java @@ -23,6 +23,7 @@ import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; /** @@ -32,7 +33,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; public class SubtractPIns extends InstructionDefinition { public SubtractPIns() { - super(0xB6, "subtract_p", new int[]{AVM2Code.DAT_NUMBER_CONTEXT}, true /*?*/); + super(0xB6, "subtract_p", new int[]{AVM2Code.DAT_NUMBER_CONTEXT}, true /*?*/, AVM2InstructionFlag.ES4_NUMERICS_MINOR, AVM2InstructionFlag.NO_FLASH_PLAYER); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/SweepIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/SweepIns.java index 33ce00c38..6e5c90f66 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/SweepIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/SweepIns.java @@ -22,6 +22,7 @@ import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; /** @@ -31,7 +32,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; public class SweepIns extends InstructionDefinition { public SweepIns() { - super(0xFC, "sweep", new int[]{}, false /*?*/); + super(0xFC, "sweep", new int[]{}, false /*?*/, AVM2InstructionFlag.NO_FLASH_PLAYER, AVM2InstructionFlag.UNKNOWN_OPERANDS, AVM2InstructionFlag.UNKNOWN_STACK, AVM2InstructionFlag.UNDOCUMENTED); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/TimestampIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/TimestampIns.java index d0322558d..9cdd7b7d4 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/TimestampIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/TimestampIns.java @@ -19,6 +19,7 @@ package com.jpexs.decompiler.flash.abc.avm2.instructions.other2; import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; /** @@ -28,7 +29,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; public class TimestampIns extends InstructionDefinition { public TimestampIns() { - super(0xF3, "timestamp", new int[]{}, false /*?*/); + super(0xF3, "timestamp", new int[]{}, false /*?*/, AVM2InstructionFlag.UNDOCUMENTED); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/UnPlusIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/UnPlusIns.java new file mode 100644 index 000000000..5e24419e5 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/UnPlusIns.java @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2010-2016 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. + */ +package com.jpexs.decompiler.flash.abc.avm2.instructions.other2; + +import com.jpexs.decompiler.flash.abc.ABC; +import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool; +import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; +import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; + +/** + * + * @author JPEXS + */ +public class UnPlusIns extends InstructionDefinition { + + public UnPlusIns() { + super(0x7A, "unplus", new int[]{}, true, AVM2InstructionFlag.FLOAT_MAJOR, AVM2InstructionFlag.NO_FLASH_PLAYER); + } + + @Override + public int getStackPopCount(AVM2Instruction ins, ABC abc) { + return 1; + } + + @Override + public int getStackPushCount(AVM2Instruction ins, ABC abc) { + return 1; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/VerifyOpIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/VerifyOpIns.java index c9db153f5..3ee18bc07 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/VerifyOpIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/VerifyOpIns.java @@ -22,6 +22,7 @@ import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; /** @@ -31,7 +32,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; public class VerifyOpIns extends InstructionDefinition { public VerifyOpIns() { - super(0xFE, "verifyop", new int[]{}, false /*?*/); + super(0xFE, "verifyop", new int[]{}, false /*?*/, AVM2InstructionFlag.NO_FLASH_PLAYER, AVM2InstructionFlag.UNKNOWN_OPERANDS, AVM2InstructionFlag.UNKNOWN_STACK, AVM2InstructionFlag.UNDOCUMENTED); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/VerifyPassIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/VerifyPassIns.java index 3bda7ad22..d41b72283 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/VerifyPassIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/VerifyPassIns.java @@ -22,6 +22,7 @@ import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; /** @@ -31,7 +32,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; public class VerifyPassIns extends InstructionDefinition { public VerifyPassIns() { - super(0xF5, "verifypass", new int[]{}, false /*?*/); + super(0xF5, "verifypass", new int[]{}, false /*?*/, AVM2InstructionFlag.NO_FLASH_PLAYER, AVM2InstructionFlag.UNDOCUMENTED, AVM2InstructionFlag.UNKNOWN_OPERANDS, AVM2InstructionFlag.UNKNOWN_STACK); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/WbIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/WbIns.java index 0d44cc806..c328edb56 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/WbIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/WbIns.java @@ -22,6 +22,7 @@ import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; /** @@ -31,7 +32,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; public class WbIns extends InstructionDefinition { public WbIns() { - super(0xF8, "wb", new int[]{}, false /*?*/); + super(0xF8, "wb", new int[]{}, false /*?*/, AVM2InstructionFlag.NO_FLASH_PLAYER, AVM2InstructionFlag.UNDOCUMENTED, AVM2InstructionFlag.UNKNOWN_OPERANDS, AVM2InstructionFlag.UNKNOWN_STACK); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushNamespaceIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushNamespaceIns.java index 4f3915b55..a43669cd7 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushNamespaceIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushNamespaceIns.java @@ -33,7 +33,7 @@ import java.util.List; public class PushNamespaceIns extends InstructionDefinition { public PushNamespaceIns() { - super(0x31, "pushnamespace", new int[]{AVM2Code.OPT_U30}, false); + super(0x31, "pushnamespace", new int[]{AVM2Code.DAT_NAMESPACE_INDEX}, false); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemyLoadAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemyLoadAVM2Item.java index 04a799a5d..693ad7cb3 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemyLoadAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemyLoadAVM2Item.java @@ -34,13 +34,13 @@ import java.util.List; */ public class AlchemyLoadAVM2Item extends AVM2Item { - private final char type; + private final String type; private final int size; private final GraphTargetItem ofs; - public AlchemyLoadAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem ofs, char type, int size) { + public AlchemyLoadAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem ofs, String type, int size) { super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.ofs = ofs; this.type = type; @@ -56,7 +56,11 @@ public class AlchemyLoadAVM2Item extends AVM2Item { @Override public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + String ts = "" + type + size; + if (type.equals("f4")) { + ts = "f32x4"; + } int code = 0; switch (ts) { case "i8": @@ -74,6 +78,9 @@ public class AlchemyLoadAVM2Item extends AVM2Item { case "f32": code = AVM2Instructions.Lf64; break; + case "f32x4": + code = AVM2Instructions.Lf32x4; + break; } return toSourceMerge(localData, generator, ofs, ins(code)); } @@ -81,10 +88,12 @@ public class AlchemyLoadAVM2Item extends AVM2Item { @Override public GraphTargetItem returnType() { switch (type) { - case 'i': + case "i": return new TypeItem(DottedChain.INT); - case 'f': + case "f": return new TypeItem(DottedChain.NUMBER); + case "f4": + return new TypeItem("float4"); } return TypeItem.UNBOUNDED; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemyStoreAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemyStoreAVM2Item.java index 813a81cc1..a482b02e0 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemyStoreAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemyStoreAVM2Item.java @@ -33,13 +33,13 @@ import java.util.List; */ public class AlchemyStoreAVM2Item extends AVM2Item { - private final char type; + private final String type; private final int size; private final GraphTargetItem ofs; - public AlchemyStoreAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem value, GraphTargetItem ofs, char type, int size) { + public AlchemyStoreAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem value, GraphTargetItem ofs, String type, int size) { super(instruction, lineStartIns, PRECEDENCE_PRIMARY, value); this.ofs = ofs; this.type = type; @@ -68,6 +68,9 @@ public class AlchemyStoreAVM2Item extends AVM2Item { @Override public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { String ts = "" + type + size; + if (type.equals("f4")) { + ts = "f32x4"; + } int code = 0; switch (ts) { case "i8": @@ -82,6 +85,9 @@ public class AlchemyStoreAVM2Item extends AVM2Item { case "f32": code = AVM2Instructions.Sf32; break; + case "f32x4": + code = AVM2Instructions.Sf32x4; + break; case "f64": code = AVM2Instructions.Sf64; break; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/ASM3Parser.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/ASM3Parser.java index 271dd19e8..d145d6747 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/ASM3Parser.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/ASM3Parser.java @@ -25,6 +25,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.UnknownInstruction; import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushShortIns; import com.jpexs.decompiler.flash.abc.avm2.parser.AVM2ParseException; import com.jpexs.decompiler.flash.abc.types.ABCException; +import com.jpexs.decompiler.flash.abc.types.Float4; import com.jpexs.decompiler.flash.abc.types.MethodBody; import com.jpexs.decompiler.flash.abc.types.MethodInfo; import com.jpexs.decompiler.flash.abc.types.Multiname; @@ -764,11 +765,10 @@ public class ASM3Parser { case AVM2Code.DAT_MULTINAME_INDEX: lexer.pushback(parsedOperand); operandsList.add(parseMultiName(constants, lexer)); - /*if (parsedOperand.type == ParsedSymbol.TYPE_MULTINAME) { - operandsList.add(checkMultinameIndex(constants, (int) (long) (Long) parsedOperand.value, lexer.yyline())); - } else { - throw new ParseException("Multiname expected", lexer.yyline()); - }*/ + break; + case AVM2Code.DAT_NAMESPACE_INDEX: + lexer.pushback(parsedOperand); + operandsList.add(parseNamespace(constants, lexer)); break; case AVM2Code.DAT_STRING_INDEX: if (parsedOperand.type == ParsedSymbol.TYPE_KEYWORD_NULL) { @@ -845,10 +845,69 @@ public class ASM3Parser { } } operandsList.add(did); + } else { + throw new AVM2ParseException("Double or null expected", lexer.yyline()); + } + break; + case AVM2Code.DAT_FLOAT_INDEX: + if (parsedOperand.type == ParsedSymbol.TYPE_KEYWORD_NULL) { + operandsList.add(0); + } else if ((parsedOperand.type == ParsedSymbol.TYPE_INTEGER) || (parsedOperand.type == ParsedSymbol.TYPE_FLOAT)) { + + float floatVal = 0; + if (parsedOperand.type == ParsedSymbol.TYPE_INTEGER) { + floatVal = (Long) parsedOperand.value; + } + if (parsedOperand.type == ParsedSymbol.TYPE_FLOAT) { + floatVal = (float) (double) (Double) parsedOperand.value; + } + int fid = constants.getFloatId(floatVal, false); + if (fid == -1) { + if ((missingHandler != null) && (missingHandler.missingFloat(floatVal))) { + fid = constants.addFloat(floatVal); + } else { + throw new AVM2ParseException("Unknown float", lexer.yyline()); + } + } + operandsList.add(fid); } else { throw new AVM2ParseException("Float or null expected", lexer.yyline()); } break; + case AVM2Code.DAT_FLOAT4_INDEX: + if (parsedOperand.type == ParsedSymbol.TYPE_KEYWORD_NULL) { + operandsList.add(0); + } else { + float[] float4Vals = new float[4]; + for (int k = 0; k < 4; k++) { + if ((parsedOperand.type == ParsedSymbol.TYPE_INTEGER) || (parsedOperand.type == ParsedSymbol.TYPE_FLOAT)) { + float floatVal = 0; + if (parsedOperand.type == ParsedSymbol.TYPE_INTEGER) { + floatVal = (Long) parsedOperand.value; + } + if (parsedOperand.type == ParsedSymbol.TYPE_FLOAT) { + floatVal = (float) (double) (Double) parsedOperand.value; + } + float4Vals[k] = floatVal; + } else { + throw new AVM2ParseException("4 floats or null expected", lexer.yyline()); + } + if (k + 1 < 4) { //not last one + parsedOperand = lexer.lex(); + } + } + Float4 float4Val = new Float4(float4Vals); + int f4id = constants.getFloat4Id(float4Val, false); + if (f4id == -1) { + if ((missingHandler != null) && (missingHandler.missingFloat4(float4Val))) { + f4id = constants.addFloat4(float4Val); + } else { + throw new AVM2ParseException("Unknown float4", lexer.yyline()); + } + } + operandsList.add(f4id); + } + break; case AVM2Code.DAT_OFFSET: if (parsedOperand.type == ParsedSymbol.TYPE_IDENTIFIER) { offsetItems.add(new OffsetItem((String) parsedOperand.value, code.code.size(), i)); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/MissingSymbolHandler.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/MissingSymbolHandler.java index f70287f0b..5083cf955 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/MissingSymbolHandler.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/MissingSymbolHandler.java @@ -16,6 +16,9 @@ */ package com.jpexs.decompiler.flash.abc.avm2.parser.pcode; +import com.jpexs.decompiler.flash.abc.types.Decimal; +import com.jpexs.decompiler.flash.abc.types.Float4; + /** * * @author JPEXS @@ -29,4 +32,10 @@ public interface MissingSymbolHandler { public boolean missingUInt(long value); public boolean missingDouble(double value); + + public boolean missingFloat(float value); + + public boolean missingFloat4(Float4 value); + + public boolean missingDecimal(Decimal value); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/Float4.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/Float4.java index 8d81f5d5d..810fe3a1c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/Float4.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/Float4.java @@ -2,16 +2,20 @@ package com.jpexs.decompiler.flash.abc.types; public class Float4 { - public float value1; - public float value2; - public float value3; - public float value4; + public float values[] = new float[4]; public Float4(float value1, float value2, float value3, float value4) { - this.value1 = value1; - this.value2 = value2; - this.value3 = value3; - this.value4 = value4; + this.values = new float[]{value1, value2, value3, value4}; + } + + public Float4(float[] values) { + if (values == null || values.length < 4) { + throw new IllegalArgumentException("Invalid values size"); + } + this.values[0] = values[0]; + this.values[1] = values[1]; + this.values[2] = values[2]; + this.values[3] = values[3]; } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/InstanceInfo.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/InstanceInfo.java index ff6a17d60..31099ce36 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/InstanceInfo.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/InstanceInfo.java @@ -36,7 +36,7 @@ public class InstanceInfo { public int super_index; - public int flags; // 1 = sealed, 0 = dynamic, 2 = final, 4 = interface, 8 = ProtectedNs + public int flags; // 1 = sealed, 0 = dynamic, 2 = final, 4 = interface, 8 = ProtectedNs, 16 = non nullable public int protectedNS; //if flags & 8 @@ -54,6 +54,8 @@ public class InstanceInfo { public static final int CLASS_PROTECTEDNS = 8; + public static final int CLASS_NON_NULLABLE = 16; //This is somehow used in Flex, propably through annotations or something with Vector datatype (?) + @Internal public boolean deleted; @@ -144,4 +146,8 @@ public class InstanceInfo { public boolean isFinal() { return (flags & CLASS_FINAL) == CLASS_FINAL; } + + public boolean isNullable() { + return (flags & CLASS_NON_NULLABLE) != CLASS_NON_NULLABLE; + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/Multiname.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/Multiname.java index 51b1237fd..a29b864d6 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/Multiname.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/Multiname.java @@ -219,7 +219,7 @@ public class Multiname { } - private static String namespaceToString(AVM2ConstantPool constants, int index) { + public static String namespaceToString(AVM2ConstantPool constants, int index) { if (index == 0) { return "null"; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/locales/docs/pcode/AS3.properties b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/locales/docs/pcode/AS3.properties new file mode 100644 index 000000000..f69f292b0 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/locales/docs/pcode/AS3.properties @@ -0,0 +1,1390 @@ +# Copyright (C) 2010-2016 JPEXS, All rights reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 3.0 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library. + +instructionFlag.undocumented = Undocumented +instructionFlag.unknownStack = Unknown stack +instructionFlag.es4NumericsMinor = ES4 numerics (ABC minor 17) +instructionFlag.floatMajor = Float values (ABC major 47) +instructionFlag.unknownOperands = Unknown operands +instructionFlag.noFlashPlayer = Not in standard Flash Player +instructionFlag.deprecated = Deprecated +instructionFlag.domainMemory = Domain memory operation +instructionFlag. = +instructionFlag. = + + + +operandType.multinameIndex = Multiname index +operandType.multinameIndex.description = Index into multiname constant pool + +operandType.argCount = Number of arguments +operandType.argCount.description = Number of following arguments + +operandType.methodIndex = Method index +operandType.methodIndex.description = Index of method in the ABC + +operandType.stringIndex = String index +operandType.stringIndex.description = Index into string values constant pool + +operandType.debugType = Debug type +operandType.debugType.description = Type of debug information. Currently only value of 1 is used. + +operandType.registerIndex = Register index +operandType.registerIndex.description = Index of a local register (0-255) + +operandType.linenum = Line number +operandType.linenum.description = Line number of file + +#similar as registerIndex, but U30 instead of U8 +operandType.localRegIndex = Register index +operandType.localRegIndex.description = Index of a local register + +operandType.slotIndex = Slot index +operandType.slotIndex.description = Index of the slot on an object + +operandType.scopeIndex = Scope stack index +operandType.scopeIndex.description = Index in the scope stack + +operandType.offset = Offset +operandType.offset.description = Offset to other location + +operandType.exceptionIndex = Exception index +operandType.exceptionIndex.description = Index of exception in current method info + +operandType.classIndex = Class index +operandType.classIndex.description = Index of class in ABC + +operandType.intIndex = Int index +operandType.intIndex.description = Index into integer values constant pool + +operandType.uintIndex = UInt index +operandType.uintIndex.description = Index into unsigned integer values constant pool + +operandType.doubleIndex = Double index +operandType.doubleIndex.description = Index into double precision floating point values constant pool + +operandType.decimalIndex = Decimal index +operandType.decimalIndex.description = Index into decimal values (128bit floating point) constant pool (EcmaScript 4 numerics - ABC minorVersion 17) + +operandType.caseBaseoffset = Base offset +operandType.caseBaseoffset.description = Base offset of lookupswitch triggered when no value matches + +operandType.numberContext = Number context (ES4) +operandType.numberContext.description = Context of calculations when using EcmaScript 4 numerics (ABC minorVersion 17).\nBits 0-2 type,3-5 rounding type, 6-12 precision.\nType: 0=number,1=decimal,2=double,3=int,4=uint\nRounding: 0=ceiling,1=up,2=half_up,3=half_even,4=half_down,5=down,6=floor\nPrecision:0-34 + +operandType.multinameIndex = Multiname index +operandType.multinameIndex.description = Index into multiname constant pool + +operandType.dispatchId = Dispatch id +operandType.dispatchId.description = Id of the method dispatch + +operandType.floatIndex = Float index +operandType.floatIndex.description = Index into float values constant pool (Only some ABC versions) + +operandType.float4Index = Float4 index +operandType.float4Index.description = Index into float4 values constant pool (Only some ABC versions) + +operandType.namespaceIndex = Namespace index +operandType.namespaceIndex = Index into namespace constant pool + +instruction.bkpt.shortDescription = Breakpoint +instruction.bkpt.description = Breakpoint when debugging +instruction.bkpt.stackBefore = +instruction.bkpt.stackAfter = +instruction.bkpt.operands = + +instruction.nop.shortDescription = No operation +instruction.nop.description = Does nothing +instruction.nop.stackBefore = +instruction.nop.stackAfter = +instruction.nop.operands = + +instruction.throw.shortDescription = Throw exception +instruction.throw.description = Pops value off the stack and throws it +instruction.throw.stackBefore = value +instruction.throw.stackAfter = +instruction.throw.operands = + +instruction.getsuper.shortDescription = Get parent class property +instruction.getsuper.description = +instruction.getsuper.stackBefore = obj, [ns], [name] +instruction.getsuper.stackAfter = value +instruction.getsuper.operands = parentClassMultiname + +instruction.setsuper.shortDescription = Set parent class property +instruction.setsuper.description = +instruction.setsuper.stackBefore = obj, [ns], [name], value +instruction.setsuper.stackAfter = +instruction.setsuper.operands = parentClassMultiname + +instruction.dxns.shortDescription = Set default XML namespace +instruction.dxns.description = +instruction.dxns.stackBefore = +instruction.dxns.stackAfter = +instruction.dxns.operands = uriString + +instruction.dxnslate.shortDescription = Set default XML namespace at runtime +instruction.dxnslate.description = +instruction.dxnslate.stackBefore = uriValue +instruction.dxnslate.stackAfter = +instruction.dxnslate.operands = + +instruction.kill.shortDescription = Kill local register +instruction.kill.description = +instruction.kill.stackBefore = +instruction.kill.stackAfter = +instruction.kill.operands = killedRegister + +instruction.label.shortDescription = Target of a branch +instruction.label.description = Just a mark that this is target of following branch +instruction.label.stackBefore = +instruction.label.stackAfter = +instruction.label.operands = + +instruction.lf32x4.shortDescription = Load 32bit float4 +instruction.lf32x4.description = +instruction.lf32x4.stackBefore = address +instruction.lf32x4.stackAfter = float4Value +instruction.lf32x4.operands = + +instruction.sf32x4.shortDescription = Store 32bit float4 +instruction.sf32x4.description = +instruction.sf32x4.stackBefore = float4Value, address +instruction.sf32x4.stackAfter = +instruction.sf32x4.operands = + +instruction.ifnlt.shortDescription = Branch if not lower than +instruction.ifnlt.description = +instruction.ifnlt.stackBefore = value1, value2 +instruction.ifnlt.stackAfter = +instruction.ifnlt.operands = branchTarget + +instruction.ifnle.shortDescription = Branch if not lower or equal +instruction.ifnle.description = +instruction.ifnle.stackBefore = value1, value2 +instruction.ifnle.stackAfter = +instruction.ifnle.operands = branchTarget + +instruction.ifngt.shortDescription = Branch if not greater than +instruction.ifngt.description = +instruction.ifngt.stackBefore = value1, value2 +instruction.ifngt.stackAfter = +instruction.ifngt.operands = branchTarget + +instruction.ifnge.shortDescription = Branch if not greater ot equal +instruction.ifnge.description = +instruction.ifnge.stackBefore = value1, value2 +instruction.ifnge.stackAfter = +instruction.ifnge.operands = branchTarget + +instruction.jump.shortDescription = Jump to location +instruction.jump.description = +instruction.jump.stackBefore = +instruction.jump.stackAfter = +instruction.jump.operands = location + +instruction.iftrue.shortDescription = Branch if true +instruction.iftrue.description = +instruction.iftrue.stackBefore = value +instruction.iftrue.stackAfter = +instruction.iftrue.operands = branchTarget + +instruction.iffalse.shortDescription = Branch if false +instruction.iffalse.description = +instruction.iffalse.stackBefore = value +instruction.iffalse.stackAfter = +instruction.iffalse.operands = branchTarget + +instruction.ifeq.shortDescription = Branch if equal +instruction.ifeq.description = +instruction.ifeq.stackBefore = value1, value2 +instruction.ifeq.stackAfter = +instruction.ifeq.operands = branchTarget + +instruction.ifne.shortDescription = Branch if not equal +instruction.ifne.description = +instruction.ifne.stackBefore = value1, value2 +instruction.ifne.stackAfter = +instruction.ifne.operands = branchTarget + +instruction.iflt.shortDescription = Branch if lower than +instruction.iflt.description = +instruction.iflt.stackBefore = value1, value2 +instruction.iflt.stackAfter = +instruction.iflt.operands = branchTarget + +instruction.ifle.shortDescription = Branch if lower or equal +instruction.ifle.description = +instruction.ifle.stackBefore = value1, value2 +instruction.ifle.stackAfter = +instruction.ifle.operands = branchTarget + +instruction.ifgt.shortDescription = Branch if greater than +instruction.ifgt.description = +instruction.ifgt.stackBefore = value1, value2 +instruction.ifgt.stackAfter = +instruction.ifgt.operands = branchTarget + +instruction.ifge.shortDescription = Branch if greater or equal +instruction.ifge.description = +instruction.ifge.stackBefore = value1, value2 +instruction.ifge.stackAfter = +instruction.ifge.operands = branchTarget + +instruction.ifstricteq.shortDescription = Branch if strict equal +instruction.ifstricteq.description = +instruction.ifstricteq.stackBefore = value1, value2 +instruction.ifstricteq.stackAfter = +instruction.ifstricteq.operands = branchTarget + +instruction.ifstrictne.shortDescription = Branch if not strict equal +instruction.ifstrictne.description = +instruction.ifstrictne.stackBefore = value1, value2 +instruction.ifstrictne.stackAfter = +instruction.ifstrictne.operands = branchTarget + +instruction.lookupswitch.shortDescription = Branch based on index +instruction.lookupswitch.description = +instruction.lookupswitch.stackBefore = index +instruction.lookupswitch.stackAfter = +instruction.lookupswitch.operands = defaultTarget, caseCount, case0Target, case1Target, ... + +instruction.pushwith.shortDescription = Push with onto scope stack +instruction.pushwith.description = +instruction.pushwith.stackBefore = withScope +instruction.pushwith.stackAfter = +instruction.pushwith.operands = + +instruction.popscope.shortDescription = Pop from scope stack and discard value +instruction.popscope.description = +instruction.popscope.stackBefore = +instruction.popscope.stackAfter = +instruction.popscope.operands = + +instruction.nextname.shortDescription = Get name of next property +instruction.nextname.description = +instruction.nextname.stackBefore = obj, index +instruction.nextname.stackAfter = name +instruction.nextname.operands = + +instruction.hasnext.shortDescription = Check if the object has more properties +instruction.hasnext.description = +instruction.hasnext.stackBefore = obj, currentIndex +instruction.hasnext.stackAfter = nextIndex +instruction.hasnext.operands = + +instruction.pushnull.shortDescription = Push null value on stack +instruction.pushnull.description = +instruction.pushnull.stackBefore = +instruction.pushnull.stackAfter = null +instruction.pushnull.operands = + +instruction.pushundefined.shortDescription = Push undefined value on stack +instruction.pushundefined.description = +instruction.pushundefined.stackBefore = +instruction.pushundefined.stackAfter = undefined +instruction.pushundefined.operands = + +instruction.pushfloat.shortDescription = Push float value on stack +instruction.pushfloat.description = +instruction.pushfloat.stackBefore = +instruction.pushfloat.stackAfter = floatValue +instruction.pushfloat.operands = float + +instruction.nextvalue.shortDescription = Get value of next property +instruction.nextvalue.description = +instruction.nextvalue.stackBefore = obj, index +instruction.nextvalue.stackAfter = value +instruction.nextvalue.operands = + +instruction.pushbyte.shortDescription = Push byte value on stack +instruction.pushbyte.description = +instruction.pushbyte.stackBefore = +instruction.pushbyte.stackAfter = byteValue +instruction.pushbyte.operands = value + +instruction.pushshort.shortDescription = Push short value on stack +instruction.pushshort.description = +instruction.pushshort.stackBefore = +instruction.pushshort.stackAfter = shortValue +instruction.pushshort.operands = value + +instruction.pushtrue.shortDescription = Push true on stack +instruction.pushtrue.description = +instruction.pushtrue.stackBefore = +instruction.pushtrue.stackAfter = true +instruction.pushtrue.operands = + +instruction.pushfalse.shortDescription = Push false on stack +instruction.pushfalse.description = +instruction.pushfalse.stackBefore = +instruction.pushfalse.stackAfter = false +instruction.pushfalse.operands = + +instruction.pushnan.shortDescription = Push NaN value on stack +instruction.pushnan.description = +instruction.pushnan.stackBefore = +instruction.pushnan.stackAfter = NaN +instruction.pushnan.operands = + +instruction.pop.shortDescription = Pop top value from stack +instruction.pop.description = +instruction.pop.stackBefore = value +instruction.pop.stackAfter = +instruction.pop.operands = + +instruction.dup.shortDescription = Duplicate value on stack +instruction.dup.description = +instruction.dup.stackBefore = value +instruction.dup.stackAfter = value, value +instruction.dup.operands = + +instruction.swap.shortDescription = Swap two values on top of the stack +instruction.swap.description = +instruction.swap.stackBefore = value1, value2 +instruction.swap.stackAfter = value2, value1 +instruction.swap.operands = + +instruction.pushstring.shortDescription = Push string value on the stack +instruction.pushstring.description = +instruction.pushstring.stackBefore = +instruction.pushstring.stackAfter = stringValue +instruction.pushstring.operands = value + +instruction.pushint.shortDescription = Push integer value on the stack +instruction.pushint.description = +instruction.pushint.stackBefore = +instruction.pushint.stackAfter = intValue +instruction.pushint.operands = value + +instruction.pushuint.shortDescription = Push unsigned integer value on the stack +instruction.pushuint.description = +instruction.pushuint.stackBefore = +instruction.pushuint.stackAfter = uintValue +instruction.pushuint.operands = value + +instruction.pushdouble.shortDescription = Push double precision value on the stack +instruction.pushdouble.description = +instruction.pushdouble.stackBefore = +instruction.pushdouble.stackAfter = doubleValue +instruction.pushdouble.operands = value + +instruction.pushscope.shortDescription = Push object on the scope stack +instruction.pushscope.description = +instruction.pushscope.stackBefore = obj +instruction.pushscope.stackAfter = +instruction.pushscope.operands = + +instruction.pushnamespace.shortDescription = Push namespace on the stack +instruction.pushnamespace.description = +instruction.pushnamespace.stackBefore = +instruction.pushnamespace.stackAfter = namespace +instruction.pushnamespace.operands = value + +instruction.hasnext2.shortDescription = Check if the object has more properties (register based) +instruction.hasnext2.description = +instruction.hasnext2.stackBefore = +instruction.hasnext2.stackAfter = boolValue +instruction.hasnext2.operands = objectReg, indexReg + +instruction.pushdecimal.shortDescription = Push decimal value on the stack +instruction.pushdecimal.description = +instruction.pushdecimal.stackBefore = +instruction.pushdecimal.stackAfter = decimalValue +instruction.pushdecimal.operands = value + +#Undocumented: +instruction.pushdnan.shortDescription = Push decimal NaN value on the stack +instruction.pushdnan.description = +#instruction.pushdnan.stackBefore = +#instruction.pushdnan.stackAfter = +instruction.pushdnan.operands = + +instruction.li8.shortDescription = Load 8bit integer value +instruction.li8.description = +instruction.li8.stackBefore = address +instruction.li8.stackAfter = int8Value +instruction.li8.operands = + +instruction.li16.shortDescription = Load 16bit integer value +instruction.li16.description = +instruction.li16.stackBefore = address +instruction.li16.stackAfter = int16Value +instruction.li16.operands = + +instruction.li32.shortDescription = Load 32bit integer value +instruction.li32.description = +instruction.li32.stackBefore = address +instruction.li32.stackAfter = int32Value +instruction.li32.operands = + +instruction.lf32.shortDescription = Load 32bit float value +instruction.lf32.description = +instruction.lf32.stackBefore = address +instruction.lf32.stackAfter = float32Value +instruction.lf32.operands = + +instruction.lf64.shortDescription = Load 64bit float value +instruction.lf64.description = +instruction.lf64.stackBefore = address +instruction.lf64.stackAfter = float64Value +instruction.lf64.operands = + +instruction.si8.shortDescription = Store 8bit integer value +instruction.si8.description = +instruction.si8.stackBefore = value, address +instruction.si8.stackAfter = +instruction.si8.operands = + +instruction.si16.shortDescription = Store 16bit integer value +instruction.si16.description = +instruction.si16.stackBefore = value, address +instruction.si16.stackAfter = +instruction.si16.operands = + +instruction.si32.shortDescription = Store 32bit integer value +instruction.si32.description = +instruction.si32.stackBefore = value, address +instruction.si32.stackAfter = +instruction.si32.operands = + +instruction.sf32.shortDescription = Store 32bit float value +instruction.sf32.description = +instruction.sf32.stackBefore = value, address +instruction.sf32.stackAfter = +instruction.sf32.operands = + +instruction.sf64.shortDescription = Store 64bit float value +instruction.sf64.description = +instruction.sf64.stackBefore = value, address +instruction.sf64.stackAfter = +instruction.sf64.operands = + +instruction.newfunction.shortDescription = Create new Function object +instruction.newfunction.description = +instruction.newfunction.stackBefore = +instruction.newfunction.stackAfter = function +instruction.newfunction.operands = method + +instruction.call.shortDescription = Call function on the stack +instruction.call.description = +instruction.call.stackBefore = function, this, arg1, ..., argN +instruction.call.stackAfter = value +instruction.call.operands = argCount + +instruction.construct.shortDescription = Call constructor function on the stack +instruction.construct.description = +instruction.construct.stackBefore = function, arg1, ..., argN +instruction.construct.stackAfter = value +instruction.construct.operands = argCount + +instruction.callmethod.shortDescription = Call method of object by dispatch id +instruction.callmethod.description = +instruction.callmethod.stackBefore = this, arg1, ..., argN +instruction.callmethod.stackAfter = value +instruction.callmethod.operands = method, argCount + +instruction.callstatic.shortDescription = Call method by method id in ABC file +instruction.callstatic.description = +instruction.callstatic.stackBefore = this, arg1, ..., argN +instruction.callstatic.stackAfter = value +instruction.callstatic.operands = method, argCount + +instruction.callsuper.shortDescription = Call method on parent class +instruction.callsuper.description = +instruction.callsuper.stackBefore = obj, [ns], [name], arg1, ..., argN +instruction.callsuper.stackAfter = value +instruction.callsuper.operands = methodName, argCount + +instruction.callproperty.shortDescription = Call property +instruction.callproperty.description = +instruction.callproperty.stackBefore = obj, [ns], [name], arg1, ..., argN +instruction.callproperty.stackAfter = value +instruction.callproperty.operands = propertyName, argCount + +instruction.returnvoid.shortDescription = Return from a method +instruction.returnvoid.description = +instruction.returnvoid.stackBefore = +instruction.returnvoid.stackAfter = +instruction.returnvoid.operands = + +instruction.returnvalue.shortDescription = Return value from a method +instruction.returnvalue.description = +instruction.returnvalue.stackBefore = value +instruction.returnvalue.stackAfter = +instruction.returnvalue.operands = + +instruction.constructsuper.shortDescription = Call parent constructor of an object +instruction.constructsuper.description = +instruction.constructsuper.stackBefore = obj, arg1, ..., argN +instruction.constructsuper.stackAfter = +instruction.constructsuper.operands = argCount + +instruction.constructprop.shortDescription = Construct a property of an object +instruction.constructprop.description = +instruction.constructprop.stackBefore = obj, [ns], [name], arg1, ..., argN +instruction.constructprop.stackAfter = value +instruction.constructprop.operands = propertyName, argCount + +#Undocumented: +instruction.callsuperid.shortDescription = Call super id +instruction.callsuperid.description = +#instruction.callsuperid.stackBefore = +#instruction.callsuperid.stackAfter = +#instruction.callsuperid.operands = + +instruction.callproplex.shortDescription = Call property with null as this +instruction.callproplex.description = +instruction.callproplex.stackBefore = obj, [ns], [name], arg1, ..., argN +instruction.callproplex.stackAfter = value +instruction.callproplex.operands = propertyName, argCount + +#Undocumented: +instruction.callinterface.shortDescription = Call interface +instruction.callinterface.description = +#instruction.callinterface.stackBefore = +#instruction.callinterface.stackAfter = +instruction.callinterface.operands = interface, argCount + + +instruction.callsupervoid.shortDescription = Call method on parent class, discard return value +instruction.callsupervoid.description = +instruction.callsupervoid.stackBefore = obj, [ns], [name], arg1, ..., argN +instruction.callsupervoid.stackAfter = +instruction.callsupervoid.operands = methodName, argCount + + +instruction.callpropvoid.shortDescription = Call property, discard return value +instruction.callpropvoid.description = +instruction.callpropvoid.stackBefore = obj, [ns], [name], arg1, ..., argN +instruction.callpropvoid.stackAfter = value +instruction.callpropvoid.operands = propertyName, argCount + +instruction.sxi1.shortDescription = Sign extend 1bit value to 32bits +instruction.sxi1.description = +instruction.sxi1.stackBefore = value +instruction.sxi1.stackAfter = valueExtended +instruction.sxi1.operands = + +instruction.sxi8.shortDescription = Sign extend 8bit value to 32bits +instruction.sxi8.description = +instruction.sxi8.stackBefore = value +instruction.sxi8.stackAfter = valueExtended +instruction.sxi8.operands = + +instruction.sxi16.shortDescription = Sign extend 16bit value to 32bits +instruction.sxi16.description = +instruction.sxi16.stackBefore = value +instruction.sxi16.stackAfter = valueExtended +instruction.sxi16.operands = + +instruction.applytype.shortDescription = Apply type parameters +instruction.applytype.description = Apply parameter types to base type. For example when Vector is resolved at runtime. String is parameter, Vector is baseclass. +instruction.applytype.stackBefore = baseType, typeParam1, ..., typeParamN +instruction.applytype.stackAfter = baseType +instruction.applytype.operands = typeParamCount + +instruction.pushfloat4.shortDescription = Push float4 value on the stack +instruction.pushfloat4.description = +instruction.pushfloat4.stackBefore = +instruction.pushfloat4.stackAfter = float4Value +instruction.pushfloat4.operands = float4 + +instruction.newobject.shortDescription = Creates new object +instruction.newobject.description = +instruction.newobject.stackBefore = name1, value1, name2, value2, ..., nameN, valueN +instruction.newobject.stackAfter = newObject +instruction.newobject.operands = propertyCount + +instruction.newarray.shortDescription = Creates new array +instruction.newarray.description = +instruction.newarray.stackBefore = value1, value2, ..., valueN +instruction.newarray.stackAfter = newArray +instruction.newarray.operands = valueCount + +instruction.newactivation.shortDescription = Creates new activation object +instruction.newactivation.description = +instruction.newactivation.stackBefore = +instruction.newactivation.stackAfter = newActivation +instruction.newactivation.operands = + +instruction.newclass.shortDescription = Creates new class +instruction.newclass.description = +instruction.newclass.stackBefore = baseType +instruction.newclass.stackAfter = newClass +instruction.newclass.operands = class + +instruction.getdescendants.shortDescription = Get descendants +instruction.getdescendants.description = +instruction.getdescendants.stackBefore = obj, [ns], [name] +instruction.getdescendants.stackAfter = value +instruction.getdescendants.operands = operand1 + +instruction.newcatch.shortDescription = Create new catch scope +instruction.newcatch.description = +instruction.newcatch.stackBefore = +instruction.newcatch.stackAfter = catchScope +instruction.newcatch.operands = exception + +#Undocumented: +instruction.deldescendants.shortDescription = Delete descendants +instruction.deldescendants.description = +#instruction.deldescendants.stackBefore = +#instruction.deldescendants.stackAfter = +instruction.deldescendants.operands = + +#Undocumented: +instruction.findpropglobal.shortDescription = Search property in global scope +instruction.findpropglobal.description = +instruction.findpropglobal.stackBefore = [ns], [name] +instruction.findpropglobal.stackAfter = obj +instruction.findpropglobal.operands = property + +instruction.findpropstrict.shortDescription = Search property in scope stack, error when not found +instruction.findpropstrict.description = +instruction.findpropstrict.stackBefore = [ns], [name] +instruction.findpropstrict.stackAfter = obj +instruction.findpropstrict.operands = property + +instruction.findproperty.shortDescription = Search property in scope stack, top object when not found +instruction.findproperty.description = +instruction.findproperty.stackBefore = [ns], [name] +instruction.findproperty.stackAfter = obj +instruction.findproperty.operands = property + +#Undocumented: +instruction.finddef.shortDescription = Search script level definition +instruction.finddef.description = +instruction.finddef.stackBefore = [ns], [name] +instruction.finddef.stackAfter = obj +instruction.finddef.operands = property + +instruction.getlex.shortDescription = Find and get property +instruction.getlex.description = +instruction.getlex.stackBefore = +instruction.getlex.stackAfter = obj +instruction.getlex.operands = property + +instruction.setproperty.shortDescription = Set property +instruction.setproperty.description = +instruction.setproperty.stackBefore = obj, [ns], [name], value +instruction.setproperty.stackAfter = +instruction.setproperty.operands = property + +instruction.getlocal.shortDescription = Get local register value +instruction.getlocal.description = +instruction.getlocal.stackBefore = +instruction.getlocal.stackAfter = value +instruction.getlocal.operands = localReg + +instruction.setlocal.shortDescription = Set local register value +instruction.setlocal.description = +instruction.setlocal.stackBefore = value +instruction.setlocal.stackAfter = +instruction.setlocal.operands = localReg + +instruction.getglobalscope.shortDescription = Get global scope +instruction.getglobalscope.description = +instruction.getglobalscope.stackBefore = +instruction.getglobalscope.stackAfter = obj +instruction.getglobalscope.operands = + +instruction.getscopeobject.shortDescription = Get scope object +instruction.getscopeobject.description = +instruction.getscopeobject.stackBefore = +instruction.getscopeobject.stackAfter = obj +instruction.getscopeobject.operands = scopeIndex + +instruction.getproperty.shortDescription = Get property +instruction.getproperty.description = +instruction.getproperty.stackBefore = obj, [ns], [name] +instruction.getproperty.stackAfter = value +instruction.getproperty.operands = property + +instruction.getouterscope.shortDescription = Get scope object on all levels +instruction.getouterscope.description = +instruction.getouterscope.stackBefore = +instruction.getouterscope.stackAfter = obj +instruction.getouterscope.operands = allLevelScopeIndex + +instruction.initproperty.shortDescription = Initialize property +instruction.initproperty.description = +instruction.initproperty.stackBefore = obj, [ns], [name], value +instruction.initproperty.stackAfter = +instruction.initproperty.operands = property + +#Undocumented: +instruction.setpropertylate.shortDescription = Set property (stack based) +instruction.setpropertylate.description = +#instruction.setpropertylate.stackBefore = +#instruction.setpropertylate.stackAfter = +#instruction.setpropertylate.operands = + +instruction.deleteproperty.shortDescription = Delete property +instruction.deleteproperty.description = +instruction.deleteproperty.stackBefore = obj, [ns], [name] +instruction.deleteproperty.stackAfter = boolResult +instruction.deleteproperty.operands = property + +#Undocumented: +instruction.deletepropertylate.shortDescription = Delete property (stack based) +instruction.deletepropertylate.description = +#instruction.deletepropertylate.stackBefore = +#instruction.deletepropertylate.stackAfter = +instruction.deletepropertylate.operands = + +instruction.getslot.shortDescription = Get value of a slot +instruction.getslot.description = +instruction.getslot.stackBefore = obj +instruction.getslot.stackAfter = value +instruction.getslot.operands = slotIndex + +instruction.setslot.shortDescription = Set value of a slot +instruction.setslot.description = +instruction.setslot.stackBefore = obj, value +instruction.setslot.stackAfter = +instruction.setslot.operands = slotIndex + +instruction.getglobalslot.shortDescription = Get value of slot on global scope +instruction.getglobalslot.description = +instruction.getglobalslot.stackBefore = +instruction.getglobalslot.stackAfter = value +instruction.getglobalslot.operands = slotIndex + +instruction.setglobalslot.shortDescription = Set value of slot on global scope +instruction.setglobalslot.description = +instruction.setglobalslot.stackBefore = value +instruction.setglobalslot.stackAfter = +instruction.setglobalslot.operands = slotIndex + +instruction.convert_s.shortDescription = Convert value to string +instruction.convert_s.description = +instruction.convert_s.stackBefore = value +instruction.convert_s.stackAfter = stringValue +instruction.convert_s.operands = + +instruction.esc_xelem.shortDescription = Escape XML element +instruction.esc_xelem.description = +instruction.esc_xelem.stackBefore = value +instruction.esc_xelem.stackAfter = stringValue +instruction.esc_xelem.operands = + +instruction.esc_xattr.shortDescription = Escape XML attribute +instruction.esc_xattr.description = +instruction.esc_xattr.stackBefore = value +instruction.esc_xattr.stackAfter = stringValue +instruction.esc_xattr.operands = + +instruction.convert_i.shortDescription = Convert value to integer +instruction.convert_i.description = +instruction.convert_i.stackBefore = value +instruction.convert_i.stackAfter = intValue +instruction.convert_i.operands = + +instruction.convert_u.shortDescription = Convert value to unsigned integer +instruction.convert_u.description = +instruction.convert_u.stackBefore = value +instruction.convert_u.stackAfter = uintValue +instruction.convert_u.operands = + +instruction.convert_d.shortDescription = Convert value to double +instruction.convert_d.description = +instruction.convert_d.stackBefore = value +instruction.convert_d.stackAfter = doubleValue +instruction.convert_d.operands = + +instruction.convert_b.shortDescription = Convert value to boolean +instruction.convert_b.description = +instruction.convert_b.stackBefore = value +instruction.convert_b.stackAfter = booleanValue +instruction.convert_b.operands = + +instruction.convert_o.shortDescription = Convert value to Object +instruction.convert_o.description = +instruction.convert_o.stackBefore = value +instruction.convert_o.stackAfter = value +instruction.convert_o.operands = + +instruction.checkfilter.shortDescription = Check that object can have filter operation applied +instruction.checkfilter.description = +instruction.checkfilter.stackBefore = value +instruction.checkfilter.stackAfter = value +instruction.checkfilter.operands = + +instruction.convert_m.shortDescription = Convert value to decimal +instruction.convert_m.description = +instruction.convert_m.stackBefore = value +instruction.convert_m.stackAfter = decimalValue +instruction.convert_m.operands = + +instruction.convert_m_p.shortDescription = Convert value to decimal with number context +instruction.convert_m_p.description = +instruction.convert_m_p.stackBefore = value +instruction.convert_m_p.stackAfter = decimalValue +instruction.convert_m_p.operands = numberContext + +instruction.convert_f.shortDescription = Convert value to float +instruction.convert_f.description = +instruction.convert_f.stackBefore = value +instruction.convert_f.stackAfter = floatValue +instruction.convert_f.operands = + +instruction.convert_f4.shortDescription = Convert value to float4 +instruction.convert_f4.description = +instruction.convert_f4.stackBefore = value +instruction.convert_f4.stackAfter = float4Value +instruction.convert_f4.operands = + +instruction.coerce.shortDescription = Coerce value to specified type +instruction.coerce.description = +instruction.coerce.stackBefore = value +instruction.coerce.stackAfter = coercedValue +instruction.coerce.operands = type + +instruction.coerce_b.shortDescription = Coerce value to boolean [Deprecated] +instruction.coerce_b.description = +instruction.coerce_b.stackBefore = value +instruction.coerce_b.stackAfter = booleanValue +instruction.coerce_b.operands = +instruction.coerce_b.deprecated = Use convert_b instead + +instruction.coerce_a.shortDescription = Coerce value to any type +instruction.coerce_a.description = +instruction.coerce_a.stackBefore = value +instruction.coerce_a.stackAfter = value +instruction.coerce_a.operands = + +instruction.coerce_i.shortDescription = Coerce value to integer +instruction.coerce_i.description = +instruction.coerce_i.stackBefore = value +instruction.coerce_i.stackAfter = intValue +instruction.coerce_i.operands = +instruction.coerce_i.deprecated = Use convert_i instead + +instruction.coerce_d.shortDescription = Coerce value to double +instruction.coerce_d.description = +instruction.coerce_d.stackBefore = value +instruction.coerce_d.stackAfter = doubleValue +instruction.coerce_d.operands = +instruction.coerce_d.deprecated = Use convert_d instead + +instruction.coerce_s.shortDescription = Coerce value to string +instruction.coerce_s.description = +instruction.coerce_s.stackBefore = value +instruction.coerce_s.stackAfter = stringValue +instruction.coerce_s.operands = + +instruction.astype.shortDescription = Return same value or null if not specified type +instruction.astype.description = +instruction.astype.stackBefore = value +instruction.astype.stackAfter = value +instruction.astype.operands = type + +instruction.astypelate.shortDescription = Return same value or null if not specified type (stack based) +instruction.astypelate.description = +instruction.astypelate.stackBefore = value, type +instruction.astypelate.stackAfter = value +instruction.astypelate.operands = + +instruction.coerce_u.shortDescription = Coerce value to unsigned integer +instruction.coerce_u.description = +instruction.coerce_u.stackBefore = value +instruction.coerce_u.stackAfter = uintValue +instruction.coerce_u.operands = + +instruction.coerce_o.shortDescription = Coerce value to Object +instruction.coerce_o.description = +instruction.coerce_o.stackBefore = value +instruction.coerce_o.stackAfter = value +instruction.coerce_o.operands = + +instruction.negate_p.shortDescription = Negate value using number context +instruction.negate_p.description = +instruction.negate_p.stackBefore = value +instruction.negate_p.stackAfter = -value +instruction.negate_p.operands = operand1 + +instruction.negate.shortDescription = Negate value +instruction.negate.description = +instruction.negate.stackBefore = value +instruction.negate.stackAfter = -value +instruction.negate.operands = + +instruction.increment.shortDescription = Increment value +instruction.increment.description = +instruction.increment.stackBefore = value +instruction.increment.stackAfter = incrementedValue +instruction.increment.operands = + +instruction.inclocal.shortDescription = Increment local register +instruction.inclocal.description = +instruction.inclocal.stackBefore = +instruction.inclocal.stackAfter = +instruction.inclocal.operands = localRegister + +instruction.decrement.shortDescription = Decrement value +instruction.decrement.description = +instruction.decrement.stackBefore = value +instruction.decrement.stackAfter = decrementedValue +instruction.decrement.operands = + +instruction.declocal.shortDescription = Decrement local register +instruction.declocal.description = +instruction.declocal.stackBefore = +instruction.declocal.stackAfter = +instruction.declocal.operands = localRegister + +instruction.typeof.shortDescription = Get name of value type +instruction.typeof.description = +instruction.typeof.stackBefore = value +instruction.typeof.stackAfter = typeName +instruction.typeof.operands = + +instruction.not.shortDescription = Boolean negate +instruction.not.description = +instruction.not.stackBefore = value +instruction.not.stackAfter = !value +instruction.not.operands = + +instruction.bitnot.shortDescription = Bitwise negate +instruction.bitnot.description = +instruction.bitnot.stackBefore = value +instruction.bitnot.stackAfter = ~value +instruction.bitnot.operands = + +#Undocumented: +instruction.concat.shortDescription = Concat +instruction.concat.description = +#instruction.concat.stackBefore = +#instruction.concat.stackAfter = +#instruction.concat.operands = + +#Undocumented: +instruction.add_d.shortDescription = Add_d +instruction.add_d.description = +#instruction.add_d.stackBefore = +#instruction.add_d.stackAfter = +#instruction.add_d.operands = + +instruction.increment_p.shortDescription = Increment value using number context +instruction.increment_p.description = +instruction.increment_p.stackBefore = value +instruction.increment_p.stackAfter = incrementedValue +instruction.increment_p.operands = numberContext + +instruction.inclocal_p.shortDescription = Increment local register using number context +instruction.inclocal_p.description = +instruction.inclocal_p.stackBefore = +instruction.inclocal_p.stackAfter = +instruction.inclocal_p.operands = numberContext, localRegister + +instruction.decrement_p.shortDescription = Decrement value using number context +instruction.decrement_p.description = +instruction.decrement_p.stackBefore = +instruction.decrement_p.stackAfter = +instruction.decrement_p.operands = numberContext + +instruction.declocal_p.shortDescription = Decrement local register using number context +instruction.declocal_p.description = +instruction.declocal_p.stackBefore = +instruction.declocal_p.stackAfter = +instruction.declocal_p.operands = numberContext, localRegister + +instruction.add.shortDescription = Add two values +instruction.add.description = +instruction.add.stackBefore = value1, value2 +instruction.add.stackAfter = value3 +instruction.add.operands = + +instruction.subtract.shortDescription = Subtract two values +instruction.subtract.description = +instruction.subtract.stackBefore = value1, value2 +instruction.subtract.stackAfter = value3 +instruction.subtract.operands = + +instruction.multiply.shortDescription = Multiply two values +instruction.multiply.description = +instruction.multiply.stackBefore = value1, value2 +instruction.multiply.stackAfter = value3 +instruction.multiply.operands = + +instruction.divide.shortDescription = Divide two values +instruction.divide.description = +instruction.divide.stackBefore = value1, value2 +instruction.divide.stackAfter = value3 +instruction.divide.operands = + +instruction.modulo.shortDescription = Modulo divide two values +instruction.modulo.description = +instruction.modulo.stackBefore = value1, value2 +instruction.modulo.stackAfter = value3 +instruction.modulo.operands = + +instruction.lshift.shortDescription = Bitwise left shift +instruction.lshift.description = +instruction.lshift.stackBefore = value1, value2 +instruction.lshift.stackAfter = value3 +instruction.lshift.operands = + +instruction.rshift.shortDescription = Bitwise right shift +instruction.rshift.description = +instruction.rshift.stackBefore = value1, value2 +instruction.rshift.stackAfter = value3 +instruction.rshift.operands = + +instruction.urshift.shortDescription = Unsigned bitwise right shift +instruction.urshift.description = +instruction.urshift.stackBefore = value1, value2 +instruction.urshift.stackAfter = value3 +instruction.urshift.operands = + +instruction.bitand.shortDescription = Bitwise and +instruction.bitand.description = +instruction.bitand.stackBefore = value1, value2 +instruction.bitand.stackAfter = value3 +instruction.bitand.operands = + +instruction.bitor.shortDescription = Bitwise or +instruction.bitor.description = +instruction.bitor.stackBefore = value1, value2 +instruction.bitor.stackAfter = value3 +instruction.bitor.operands = + +instruction.bitxor.shortDescription = Bitwise xor +instruction.bitxor.description = +instruction.bitxor.stackBefore = value1, value2 +instruction.bitxor.stackAfter = value3 +instruction.bitxor.operands = + +instruction.equals.shortDescription = Compare two values +instruction.equals.description = +instruction.equals.stackBefore = value1, value2 +instruction.equals.stackAfter = booleanResult +instruction.equals.operands = + +instruction.strictequals.shortDescription = Strict compare two values +instruction.strictequals.description = +instruction.strictequals.stackBefore = value1, value2 +instruction.strictequals.stackAfter = booleanResult +instruction.strictequals.operands = + +instruction.lessthan.shortDescription = Check that value is less than other value +instruction.lessthan.description = +instruction.lessthan.stackBefore = value1, value2 +instruction.lessthan.stackAfter = booleanResult +instruction.lessthan.operands = + +instruction.lessequals.shortDescription = Check that value is less or equal than other value +instruction.lessequals.description = +instruction.lessequals.stackBefore = value1, value2 +instruction.lessequals.stackAfter = booleanResult +instruction.lessequals.operands = booleanResult + +instruction.greaterthan.shortDescription = Check that value is greater or equal than other value +instruction.greaterthan.description = +instruction.greaterthan.stackBefore = value1, value2 +instruction.greaterthan.stackAfter = booleanResult +instruction.greaterthan.operands = + +instruction.greaterequals.shortDescription = Check that value is greater or equal than other value +instruction.greaterequals.description = +instruction.greaterequals.stackBefore = value1, value2 +instruction.greaterequals.stackAfter = booleanResult +instruction.greaterequals.operands = + +instruction.instanceof.shortDescription = Check that type exists in object prototype chain +instruction.instanceof.description = +instruction.instanceof.stackBefore = value, type +instruction.instanceof.stackAfter = booleanResult +instruction.instanceof.operands = + +instruction.istype.shortDescription = Check that object is of specified type +instruction.istype.description = +instruction.istype.stackBefore = value +instruction.istype.stackAfter = booleanResult +instruction.istype.operands = type + +instruction.istypelate.shortDescription = Check that object is of specified type (stack based) +instruction.istypelate.description = +instruction.istypelate.stackBefore = value, type +instruction.istypelate.stackAfter = booleanResult +instruction.istypelate.operands = + +instruction.in.shortDescription = Check that object has named property +instruction.in.description = +instruction.in.stackBefore = name, obj +instruction.in.stackAfter = booleanResult +instruction.in.operands = + +instruction.add_p.shortDescription = Add two values using number context +instruction.add_p.description = +instruction.add_p.stackBefore = +instruction.add_p.stackAfter = +instruction.add_p.operands = numberContext + +instruction.subtract_p.shortDescription = Subtract two values using number context +instruction.subtract_p.description = +instruction.subtract_p.stackBefore = +instruction.subtract_p.stackAfter = +instruction.subtract_p.operands = numberContext + +instruction.multiply_p.shortDescription = Multiply two values using number context +instruction.multiply_p.description = +instruction.multiply_p.stackBefore = +instruction.multiply_p.stackAfter = +instruction.multiply_p.operands = numberContext + +instruction.divide_p.shortDescription = Divide two values using number context +instruction.divide_p.description = +instruction.divide_p.stackBefore = +instruction.divide_p.stackAfter = +instruction.divide_p.operands = numberContext + +instruction.modulo_p.shortDescription = Modulo divide two values using number context +instruction.modulo_p.description = +instruction.modulo_p.stackBefore = +instruction.modulo_p.stackAfter = +instruction.modulo_p.operands = numberContext + +instruction.increment_i.shortDescription = Increment integer value +instruction.increment_i.description = +instruction.increment_i.stackBefore = value +instruction.increment_i.stackAfter = incrementedValue +instruction.increment_i.operands = + +instruction.decrement_i.shortDescription = Decrement integer value +instruction.decrement_i.description = +instruction.decrement_i.stackBefore = value +instruction.decrement_i.stackAfter = decrementedValue +instruction.decrement_i.operands = + +instruction.inclocal_i.shortDescription = Increment local register integer value +instruction.inclocal_i.description = +instruction.inclocal_i.stackBefore = +instruction.inclocal_i.stackAfter = +instruction.inclocal_i.operands = localRegister + +instruction.declocal_i.shortDescription = Decrement local register integer value +instruction.declocal_i.description = +instruction.declocal_i.stackBefore = +instruction.declocal_i.stackAfter = +instruction.declocal_i.operands = localRegister + +instruction.negate_i.shortDescription = Negate integer value +instruction.negate_i.description = +instruction.negate_i.stackBefore = value +instruction.negate_i.stackAfter = -value +instruction.negate_i.operands = + +instruction.add_i.shortDescription = Add two integer values +instruction.add_i.description = +instruction.add_i.stackBefore = value1, value2 +instruction.add_i.stackAfter = value3 +instruction.add_i.operands = + +instruction.subtract_i.shortDescription = Subtract two integer values +instruction.subtract_i.description = +instruction.subtract_i.stackBefore = value1, value2 +instruction.subtract_i.stackAfter = value3 +instruction.subtract_i.operands = + +instruction.multiply_i.shortDescription = Multiply two integer values +instruction.multiply_i.description = +instruction.multiply_i.stackBefore = value1, value2 +instruction.multiply_i.stackAfter = value3 +instruction.multiply_i.operands = + +instruction.getlocal_0.shortDescription = Get local register 0 +instruction.getlocal_0.description = +instruction.getlocal_0.stackBefore = +instruction.getlocal_0.stackAfter = value +instruction.getlocal_0.operands = + +instruction.getlocal_1.shortDescription = Get local register 1 +instruction.getlocal_1.description = +instruction.getlocal_1.stackBefore = +instruction.getlocal_1.stackAfter = value +instruction.getlocal_1.operands = + +instruction.getlocal_2.shortDescription = Get local register 2 +instruction.getlocal_2.description = +instruction.getlocal_2.stackBefore = +instruction.getlocal_2.stackAfter = value +instruction.getlocal_2.operands = + +instruction.getlocal_3.shortDescription = Get local register 3 +instruction.getlocal_3.description = +instruction.getlocal_3.stackBefore = +instruction.getlocal_3.stackAfter = value +instruction.getlocal_3.operands = + +instruction.setlocal_0.shortDescription = Set local register 0 +instruction.setlocal_0.description = +instruction.setlocal_0.stackBefore = value +instruction.setlocal_0.stackAfter = +instruction.setlocal_0.operands = + +instruction.setlocal_1.shortDescription = Set local register 1 +instruction.setlocal_1.description = +instruction.setlocal_1.stackBefore = value +instruction.setlocal_1.stackAfter = +instruction.setlocal_1.operands = + +instruction.setlocal_2.shortDescription = Set local register 2 +instruction.setlocal_2.description = +instruction.setlocal_2.stackBefore = value +instruction.setlocal_2.stackAfter = +instruction.setlocal_2.operands = + +instruction.setlocal_3.shortDescription = Set local register 3 +instruction.setlocal_3.description = +instruction.setlocal_3.stackBefore = value +instruction.setlocal_3.stackAfter = +instruction.setlocal_3.operands = + +#Undocumented: +instruction.invalid.shortDescription = Invalid +instruction.invalid.description = +#instruction.invalid.stackBefore = +#instruction.invalid.stackAfter = +#instruction.invalid.operands = + +#Undocumented: +instruction.abs_jump.shortDescription = Absolute jump +instruction.abs_jump.description = +#instruction.abs_jump.stackBefore = +#instruction.abs_jump.stackAfter = +#instruction.abs_jump.operands = + +instruction.debug.shortDescription = Debugging info +instruction.debug.description = +instruction.debug.stackBefore = +instruction.debug.stackAfter = +instruction.debug.operands = debugType, regName, localRegister, extra + +instruction.debugline.shortDescription = Debugging line number info +instruction.debugline.description = +instruction.debugline.stackBefore = +instruction.debugline.stackAfter = +instruction.debugline.operands = lineNumber + +instruction.debugfile.shortDescription = Debugging file info +instruction.debugfile.description = +instruction.debugfile.stackBefore = +instruction.debugfile.stackAfter = +instruction.debugfile.operands = fileName + +instruction.bkptline.shortDescription = Breakpoint on line +instruction.bkptline.description = +instruction.bkptline.stackBefore = +instruction.bkptline.stackAfter = +instruction.bkptline.operands = lineNumber + +#Undocumented: +instruction.timestamp.shortDescription = Timestamp +instruction.timestamp.description = +instruction.timestamp.stackBefore = +instruction.timestamp.stackAfter = +instruction.timestamp.operands = + +#Undocumented: +instruction.verifypass.shortDescription = Verify pass +instruction.verifypass.description = +#instruction.verifypass.stackBefore = +#instruction.verifypass.stackAfter = +#instruction.verifypass.operands = + +#Undocumented: +instruction.alloc.shortDescription = Alloc +instruction.alloc.description = +#instruction.alloc.stackBefore = +#instruction.alloc.stackAfter = +#instruction.alloc.operands = + +#Undocumented: +instruction.mark.shortDescription = Mark +instruction.mark.description = +#instruction.mark.stackBefore = +#instruction.mark.stackAfter = +#instruction.mark.operands = + +#Undocumented: +instruction.wb.shortDescription = Wb +instruction.wb.description = +#instruction.wb.stackBefore = +#instruction.wb.stackAfter = +#instruction.wb.operands = + +#Undocumented: +instruction.prologue.shortDescription = Prologue +instruction.prologue.description = +#instruction.prologue.stackBefore = +#instruction.prologue.stackAfter = +#instruction.prologue.operands = + +#Undocumented: +instruction.sendenter.shortDescription = Send enter +instruction.sendenter.description = +#instruction.sendenter.stackBefore = +#instruction.sendenter.stackAfter = +#instruction.sendenter.operands = + +#Undocumented: +instruction.doubletoatom.shortDescription = Double to atom +instruction.doubletoatom.description = +#instruction.doubletoatom.stackBefore = +#instruction.doubletoatom.stackAfter = +#instruction.doubletoatom.operands = + +#Undocumented: +instruction.sweep.shortDescription = Sweep +instruction.sweep.description = +#instruction.sweep.stackBefore = +#instruction.sweep.stackAfter = +#instruction.sweep.operands = + +#Undocumented: +instruction.codegenop.shortDescription = CodeGenOp +instruction.codegenop.description = +#instruction.codegenop.stackBefore = +#instruction.codegenop.stackAfter = +#instruction.codegenop.operands = + +#Undocumented: +instruction.verifyop.shortDescription = VerifyOp +instruction.verifyop.description = +#instruction.verifyop.stackBefore = +#instruction.verifyop.stackAfter = +#instruction.verifyop.operands = + +#Undocumented: +instruction.decode.shortDescription = Decode +instruction.decode.description = +#instruction.decode.stackBefore = +#instruction.decode.stackAfter = +#instruction.decode.operands = + + +instruction.unplus.shortDescription = Unary plus - coerce to numeric +instruction.unplus.description = +instruction.unplus.stackBefore = value +instruction.unplus.stackAfter = value +instruction.unplus.operands = + +instruction.pushconstant.shortDescription = Push constant value on stack +instruction.pushconstant.description = +#instruction.pushconstant.stackBefore = +#instruction.pushconstant.stackAfter = +instruction.pushconstant.operands = value \ No newline at end of file diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/locales/docs/pcode/AS3Generator.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/locales/docs/pcode/AS3Generator.java new file mode 100644 index 000000000..1fad19744 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/locales/docs/pcode/AS3Generator.java @@ -0,0 +1,134 @@ +package com.jpexs.decompiler.flash.locales.docs.pcode; + +import com.jpexs.decompiler.flash.abc.avm2.AVM2Code; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2InstructionFlag; +import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.Properties; + +/** + * Generator for AVM2 instruction set documentation. TODO: use this somehow in + * GUI + * + * @author JPEXS + */ +public class AS3Generator { + + private static String makeIdent(String name) { + StringBuilder identName = new StringBuilder(); + boolean cap = false; + for (int i = 0; i < name.length(); i++) { + char c = name.charAt(i); + if (c == '_') { + cap = true; + continue; + } + if (cap) { + identName.append(c); + cap = false; + } else { + identName.append(Character.toLowerCase(c)); + } + } + return identName.toString(); + } + + public static void main(String[] args) throws IOException { + Properties prop = new Properties(); + prop.load(AS3Generator.class.getClassLoader().getResourceAsStream("com/jpexs/decompiler/flash/locales/docs/pcode/AS3.properties")); + + Map flagDescriptions = new HashMap<>(); + + for (AVM2InstructionFlag flg : AVM2InstructionFlag.values()) { + String flagIdent = makeIdent(flg.toString()); + String flagDescription = prop.getProperty("instructionFlag." + flagIdent); + flagDescriptions.put(flg, flagDescription); + } + + for (InstructionDefinition def : AVM2Code.allInstructionSet) { + if (def == null) { + continue; + } + System.out.println("========================="); + String insName = def.instructionName; + + String insShortDescription = prop.getProperty("instruction." + insName + ".shortDescription"); + String insDescription = prop.getProperty("instruction." + insName + ".description"); + String stackBefore = def.hasFlag(AVM2InstructionFlag.UNKNOWN_STACK) ? "???" : prop.getProperty("instruction." + insName + ".stackBefore"); + String stackAfter = def.hasFlag(AVM2InstructionFlag.UNKNOWN_STACK) ? "???" : prop.getProperty("instruction." + insName + ".stackAfter"); + String operandsDoc = def.hasFlag(AVM2InstructionFlag.UNKNOWN_OPERANDS) ? "???" : prop.getProperty("instruction." + insName + ".operands"); + + System.out.println(String.format("0x%02X", def.instructionCode) + " " + insName + ": " + insShortDescription); + + if (!insDescription.trim().isEmpty()) { + System.out.println("Description: " + insDescription); + } + System.out.println("Stack before: " + stackBefore); + System.out.println("Stack after: " + stackAfter); + boolean flagsPrinted = false; + + System.out.print("Operands: "); + + if (def.hasFlag(AVM2InstructionFlag.UNKNOWN_OPERANDS)) { + System.out.println("???"); + } else { + String[] operandsDocs = operandsDoc.split(", ?"); + boolean first = true; + for (int i = 0; i < def.operands.length; i++) { + int op = def.operands[i]; + String opDoc = operandsDocs[i]; + String operandTypeRaw = AVM2Code.operandTypeToString(op, false); + String operandTypeCombined = AVM2Code.operandTypeToString(op, true); + if (operandTypeCombined.contains(", ")) { + String operandTypesCombined[] = operandTypeCombined.split(", ?"); + for (int j = 0; j < operandTypesCombined.length; j++) { + if (!first) { + System.out.print(", "); + } else { + first = false; + } + opDoc = operandsDocs[i + j]; + operandTypeCombined = operandTypesCombined[j]; + if (opDoc.equals("...")) { + System.out.print("..."); + } else { + System.out.print(opDoc + ":" + operandTypeCombined); + } + } + } else { + if (!first) { + System.out.print(", "); + } else { + first = false; + } + if (opDoc.equals(operandTypeRaw)) { + System.out.print(operandTypeCombined); + } else { + System.out.print(opDoc + ":" + operandTypeCombined); + } + } + } + if (def.operands.length == 0) { + //System.out.print(""); + } + System.out.println(""); + } + + AVM2InstructionFlag flags[] = def.flags.clone(); + Arrays.sort(flags, Enum::compareTo); + + for (AVM2InstructionFlag fl : flags) { + if (fl != AVM2InstructionFlag.UNKNOWN_OPERANDS && fl != AVM2InstructionFlag.UNKNOWN_STACK) { + if (!flagsPrinted) { + flagsPrinted = true; + System.out.println("Flags:"); + } + System.out.println(" - " + flagDescriptions.get(fl)); + } + } + } + } +}