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 CaloadCommand extends AbstractInstructionCommand {
09:
10: public CaloadCommand(Behaviour context) {
11: super (context);
12:
13: }
14:
15: public int getSkipBytes() {
16: return 0;
17: }
18:
19: public void execute() {
20: OperandStack stack = getContext().getOpStack();
21: Operand op = (Operand) stack.pop();
22: Operand op1 = (Operand) stack.pop();
23: int currentForIndex = getCurrentInstPosInCode();
24: Operand op2 = createOperand(op1.getOperandValue() + "["
25: + op.getOperandValue() + "]",
26: Constants.IS_CONSTANT_CHARACTER, Constants.CATEGORY1);
27: boolean r = false;// checkIFLoadInstIsPartOFTernaryCond(currentForIndex);
28: if (r) {
29: if (stack.size() > 0) {
30: java.lang.String str = stack.getTopOfStack()
31: .getOperandValue();
32: str = str + op2.getOperandValue();
33: op2.setOperandValue(str);
34: }
35: }
36: stack.push(op2);
37: }
38: }
|