01: package net.sf.jdec.jvminstructions.commands;
02:
03: import net.sf.jdec.core.Operand;
04: import net.sf.jdec.core.OperandStack;
05: import net.sf.jdec.reflection.Behaviour;
06: import net.sf.jdec.util.Constants;
07:
08: public class D2ICommand extends AbstractInstructionCommand {
09:
10: public D2ICommand(Behaviour context) {
11: super (context);
12:
13: }
14:
15: public int getSkipBytes() {
16: return 0;
17: }
18:
19: public void execute() {
20: OperandStack opStack = getContext().getOpStack();
21: Operand op = (Operand) opStack.pop();
22: op.setOperandValue("(int)" + "(" + op.getOperandValue() + ")");
23: op.setOperandType(Constants.IS_CONSTANT_INT);
24: boolean r = false;//checkIFLoadInstIsPartOFTernaryCond(currentForIndex);
25: if (r) {
26: if (opStack.size() > 0) {
27: java.lang.String str = opStack.getTopOfStack()
28: .getOperandValue();
29: str = str + op.getOperandValue();
30: op.setOperandValue(str);
31: }
32: }
33: opStack.push(op);
34: }
35:
36: }
|