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 D2FCommand extends AbstractInstructionCommand {
09:
10: public D2FCommand(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
23: .setOperandValue("(float)" + "(" + op.getOperandValue()
24: + ")");
25: op.setOperandType(Constants.IS_CONSTANT_FLOAT);
26: boolean r = false;//checkIFLoadInstIsPartOFTernaryCond(currentForIndex);
27: if (r) {
28: if (opStack.size() > 0) {
29: java.lang.String str = opStack.getTopOfStack()
30: .getOperandValue();
31: str = str + op.getOperandValue();
32: op.setOperandValue(str);
33: }
34: }
35: opStack.push(op);
36: }
37:
38: }
|