1 19 20 25 26 27 28 29 30 31 32 package soot.coffi; 33 import java.io.*; 34 62 class Instruction_byteindex extends Instruction { 63 66 public short arg_b; 67 public Instruction_byteindex(byte c) { super(c); } 68 public String toString(cp_info constant_pool[]) { 69 int i = ((int)arg_b)&0xff; 70 return super.toString(constant_pool) + argsep + "[" + 71 constant_pool[i].toString(constant_pool) + "]"; 72 } 73 public int nextOffset(int curr) { return curr+2; } 74 public void markCPRefs(boolean[] refs) { refs[((int)arg_b)&0xff] = true; } 75 public void redirectCPRefs(short redirect[]) { arg_b = (byte)(redirect[((int)arg_b)&0xff]); } 76 public int parse(byte bc[],int index) { 77 arg_b = bc[index]; 78 79 arg_b = (arg_b >= 0) ? arg_b : (short) (256 + arg_b); 80 81 return index+1; 82 } 83 public int compile(byte bc[],int index) { bc[index++] = code; bc[index++] = (byte) arg_b; return index; } 84 } 85 | Popular Tags |