01: package net.sf.jdec.jvminstructions.commands;
02:
03: import net.sf.jdec.core.DecompilerHelper;
04: import net.sf.jdec.core.LocalVariable;
05: import net.sf.jdec.core.Operand;
06: import net.sf.jdec.core.OperandStack;
07: import net.sf.jdec.reflection.Behaviour;
08: import net.sf.jdec.util.Constants;
09:
10: public class Lload_1Command extends AbstractInstructionCommand {
11:
12: public Lload_1Command(Behaviour context) {
13: super (context);
14:
15: }
16:
17: public int getSkipBytes() {
18: return 0;
19: }
20:
21: public void execute() {
22: int index = 1;
23: int currentForIndex = getCurrentInstPosInCode();
24: LocalVariable local = DecompilerHelper.getLocalVariable(index,
25: "load", "long", true, currentForIndex);
26: if (local != null) {
27:
28: Operand op = new Operand();
29: op.setOperandType(Constants.IS_CONSTANT_LONG);
30: // (Constants.CATEGORY2);
31: byte[] info = getCode();
32: StringBuffer addsub = new StringBuffer("");
33: boolean bo = DecompilerHelper.checkForPostIncrForLoadCase(
34: info, currentForIndex, "category2", false, index,
35: addsub);
36: if (!bo)
37: op.setOperandValue(local.getVarName());
38: else
39: op.setOperandValue(local.getVarName()
40: + addsub.toString());
41: boolean r = false;// checkIFLoadInstIsPartOFTernaryCond(currentForIndex);
42: OperandStack opStack = getStack();
43: if (r) {
44: if (opStack.size() > 0) {
45: java.lang.String str = opStack.getTopOfStack()
46: .getOperandValue();
47: str = str + op.getOperandValue();
48: op.setOperandValue(str);
49: }
50: }
51: opStack.push(op);
52:
53: }
54: }
55:
56: }
|