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:
07: public class SaloadCommand extends AbstractInstructionCommand {
08:
09: public SaloadCommand(Behaviour context) {
10: super (context);
11:
12: }
13:
14: public int getSkipBytes() {
15: return 0;
16: }
17:
18: public void execute() {
19: OperandStack opStack = getStack();
20: Operand index = opStack.getTopOfStack();
21: Operand arRef = opStack.getTopOfStack();
22: java.lang.String result = arRef.getOperandValue() + "["
23: + index.getOperandValue() + "]";
24: Operand op = new Operand();
25: op.setOperandValue(result);
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: }
|