mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-06 05:17:22 +00:00
some instruction definitions implements CoerceOrConvertTypeIns
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user