01: package net.sf.jdec.jvminstructions.commands;
02:
03: import net.sf.jdec.core.GlobalVariableStore;
04: import net.sf.jdec.core.Operand;
05: import net.sf.jdec.core.OperandStack;
06: import net.sf.jdec.reflection.Behaviour;
07:
08: public class Dup2x1Command extends AbstractInstructionCommand {
09:
10: public Dup2x1Command(Behaviour context) {
11: super (context);
12:
13: }
14:
15: public int getSkipBytes() {
16: return 0;
17: }
18:
19: public void execute() {
20: OperandStack opStack = getStack();
21: Operand op1 = (Operand) opStack.pop();
22: Operand op2 = (Operand) opStack.pop();
23: Operand op3 = (Operand) opStack.pop();
24: opStack.push(op2);
25: opStack.push(op1);
26: opStack.push(op3);
27: opStack.push(op2);
28: opStack.push(op1);
29: if (GlobalVariableStore.isDoNotPop()) {
30: GlobalVariableStore.setDoNotPop(false);
31: }
32: }
33:
34: }
|