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 4bf34b574..7001bf0cd 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 @@ -17,10 +17,15 @@ 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.instructions.AVM2Instruction; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; +import com.jpexs.decompiler.flash.abc.avm2.instructions.types.CoerceOrConvertTypeIns; +import com.jpexs.decompiler.graph.DottedChain; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.TypeItem; -public class CoerceBIns extends InstructionDefinition { +public class CoerceBIns extends InstructionDefinition implements CoerceOrConvertTypeIns { public CoerceBIns() { super(0x81, "coerce_b", new int[]{}, true); // stack: -1+1 @@ -35,4 +40,9 @@ public class CoerceBIns extends InstructionDefinition { public int getStackPushCount(AVM2Instruction ins, ABC abc) { return 1; } + + @Override + public GraphTargetItem getTargetType(AVM2ConstantPool constants, AVM2Instruction ins) { + return new TypeItem(DottedChain.BOOLEAN); + } } 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 ee660caf4..d59daa719 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 @@ -17,10 +17,15 @@ 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.instructions.AVM2Instruction; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; +import com.jpexs.decompiler.flash.abc.avm2.instructions.types.CoerceOrConvertTypeIns; +import com.jpexs.decompiler.graph.DottedChain; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.TypeItem; -public class CoerceDIns extends InstructionDefinition { +public class CoerceDIns extends InstructionDefinition implements CoerceOrConvertTypeIns { public CoerceDIns() { super(0x84, "coerce_d", new int[]{}, true); // stack: -1+1 @@ -35,4 +40,9 @@ public class CoerceDIns extends InstructionDefinition { public int getStackPushCount(AVM2Instruction ins, ABC abc) { return 1; } + + @Override + public GraphTargetItem getTargetType(AVM2ConstantPool constants, AVM2Instruction ins) { + return new TypeItem(DottedChain.NUMBER); + } } 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 feb159924..1339e5292 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 @@ -17,10 +17,15 @@ 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.instructions.AVM2Instruction; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; +import com.jpexs.decompiler.flash.abc.avm2.instructions.types.CoerceOrConvertTypeIns; +import com.jpexs.decompiler.graph.DottedChain; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.TypeItem; -public class CoerceIIns extends InstructionDefinition { +public class CoerceIIns extends InstructionDefinition implements CoerceOrConvertTypeIns { public CoerceIIns() { super(0x83, "coerce_i", new int[]{}, true); // stack: -1+1 @@ -35,4 +40,9 @@ public class CoerceIIns extends InstructionDefinition { public int getStackPushCount(AVM2Instruction ins, ABC abc) { return 1; } + + @Override + public GraphTargetItem getTargetType(AVM2ConstantPool constants, AVM2Instruction ins) { + return new TypeItem(DottedChain.INT); + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/CoerceOIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/CoerceOIns.java index 1e76b217d..e58133790 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/CoerceOIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/CoerceOIns.java @@ -17,10 +17,15 @@ 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.instructions.AVM2Instruction; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; +import com.jpexs.decompiler.flash.abc.avm2.instructions.types.CoerceOrConvertTypeIns; +import com.jpexs.decompiler.graph.DottedChain; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.TypeItem; -public class CoerceOIns extends InstructionDefinition { +public class CoerceOIns extends InstructionDefinition implements CoerceOrConvertTypeIns { public CoerceOIns() { super(0x89, "coerce_o", new int[]{}, true); // stack: -1+1 @@ -35,4 +40,9 @@ public class CoerceOIns extends InstructionDefinition { public int getStackPushCount(AVM2Instruction ins, ABC abc) { return 1; } + + @Override + public GraphTargetItem getTargetType(AVM2ConstantPool constants, AVM2Instruction ins) { + return new TypeItem(DottedChain.OBJECT); + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/CoerceUIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/CoerceUIns.java index 4a7156c73..53150b850 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/CoerceUIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other2/CoerceUIns.java @@ -17,10 +17,15 @@ 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.instructions.AVM2Instruction; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; +import com.jpexs.decompiler.flash.abc.avm2.instructions.types.CoerceOrConvertTypeIns; +import com.jpexs.decompiler.graph.DottedChain; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.TypeItem; -public class CoerceUIns extends InstructionDefinition { +public class CoerceUIns extends InstructionDefinition implements CoerceOrConvertTypeIns { public CoerceUIns() { super(0x88, "coerce_u", new int[]{}, true); // stack: -1+1 @@ -35,4 +40,9 @@ public class CoerceUIns extends InstructionDefinition { public int getStackPushCount(AVM2Instruction ins, ABC abc) { return 1; } + + @Override + public GraphTargetItem getTargetType(AVM2ConstantPool constants, AVM2Instruction ins) { + return new TypeItem(DottedChain.UINT); + } }