1 19 20 25 26 27 28 29 30 31 32 package soot.coffi; 33 import java.io.*; 34 62 class Instruction_Iinc extends Instruction_bytevar { 63 public int arg_c; 64 public Instruction_Iinc() { super((byte)ByteCode.IINC); name = "iinc"; } 65 public String toString(cp_info constant_pool[]) { 66 return super.toString(constant_pool) + argsep + arg_c; 67 } 68 public int nextOffset(int curr) { return super.nextOffset(curr)+ ((isWide) ? 2 : 1); } 69 70 public int parse(byte bc[],int index) 71 { 72 index = super.parse(bc,index); 73 74 if(!isWide) 75 { 76 arg_c = bc[index]; 77 return index+1; 78 } 79 else { 80 int constbyte1 = ((int) bc[index]) & 0xff; 81 int constbyte2 = ((int) bc[index+1]) & 0xff; 82 83 arg_c = (short) ((constbyte1 << 8) | constbyte2); 84 85 return index+2; 86 } 87 } 88 89 public int compile(byte bc[],int index) { 90 index = super.compile(bc,index); 91 bc[index] = (byte)(arg_c&0xff); 92 return index+1; 93 } 94 } 95 | Popular Tags |