1 19 20 25 26 27 28 29 30 31 32 package soot.coffi; 33 import java.io.*; 34 62 class Instruction_bytevar extends Instruction implements Interface_OneIntArg 63 { 64 67 public int arg_b; 68 public boolean isWide; 69 70 public Instruction_bytevar(byte c) { super(c); } 71 public String toString(cp_info constant_pool[]) { 72 return super.toString(constant_pool) + argsep + LOCALPREFIX + arg_b; 73 } 74 75 public int nextOffset(int curr) { return curr + 1 + ((isWide) ? 3 : 1); } 76 77 public int parse(byte bc[],int index) 78 { 79 int indexbyte1 = ((int) bc[index]) & 0xff; 80 81 if(isWide) 82 { 83 int indexbyte2 = ((int) bc[index+1]) & 0xff; 84 85 arg_b = (indexbyte1 << 8) | indexbyte2; 86 87 return index+2; 88 } 89 else 90 { 91 arg_b = indexbyte1; 92 return index+1; 93 } 94 } 95 96 public int compile(byte bc[],int index) { bc[index++] = code; bc[index++] = (byte) arg_b; return index; } 97 98 public int getIntArg() 99 { 100 return arg_b; 101 } 102 } 103 | Popular Tags |