src/share/classes/com/sun/tools/classfile/Instruction.java

changeset 437
a509a22f9845
parent 255
07da2ffbb76b
child 554
9d9f26857129
equal deleted inserted replaced
436:cff85998bf4d 437:a509a22f9845
104 /** See {@link Kind#LOCAL}. */ 104 /** See {@link Kind#LOCAL}. */
105 R visitLocal(Instruction instr, int index, P p); 105 R visitLocal(Instruction instr, int index, P p);
106 /** See {@link Kind#LOCAL_UBYTE}. */ 106 /** See {@link Kind#LOCAL_UBYTE}. */
107 R visitLocalAndValue(Instruction instr, int index, int value, P p); 107 R visitLocalAndValue(Instruction instr, int index, int value, P p);
108 /** See {@link Kind#DYNAMIC}. */ 108 /** See {@link Kind#DYNAMIC}. */
109 R visitLookupSwitch(Instruction instr, int default_, int npairs, int[] matches, int[] offsets); 109 R visitLookupSwitch(Instruction instr, int default_, int npairs, int[] matches, int[] offsets, P p);
110 /** See {@link Kind#DYNAMIC}. */ 110 /** See {@link Kind#DYNAMIC}. */
111 R visitTableSwitch(Instruction instr, int default_, int low, int high, int[] offsets); 111 R visitTableSwitch(Instruction instr, int default_, int low, int high, int[] offsets, P p);
112 /** See {@link Kind#BYTE}, {@link Kind#SHORT}. */ 112 /** See {@link Kind#BYTE}, {@link Kind#SHORT}. */
113 R visitValue(Instruction instr, int value, P p); 113 R visitValue(Instruction instr, int value, P p);
114 /** Instruction is unrecognized. */ 114 /** Instruction is unrecognized. */
115 R visitUnknown(Instruction instr, P p); 115 R visitUnknown(Instruction instr, P p);
116 116
280 int high = getInt(pad + 8); 280 int high = getInt(pad + 8);
281 int[] values = new int[high - low + 1]; 281 int[] values = new int[high - low + 1];
282 for (int i = 0; i < values.length; i++) 282 for (int i = 0; i < values.length; i++)
283 values[i] = getInt(pad + 12 + 4 * i); 283 values[i] = getInt(pad + 12 + 4 * i);
284 return visitor.visitTableSwitch( 284 return visitor.visitTableSwitch(
285 this, default_, low, high, values); 285 this, default_, low, high, values, p);
286 } 286 }
287 case LOOKUPSWITCH: { 287 case LOOKUPSWITCH: {
288 int pad = align(pc + 1) - pc; 288 int pad = align(pc + 1) - pc;
289 int default_ = getInt(pad); 289 int default_ = getInt(pad);
290 int npairs = getInt(pad + 4); 290 int npairs = getInt(pad + 4);
293 for (int i = 0; i < npairs; i++) { 293 for (int i = 0; i < npairs; i++) {
294 matches[i] = getInt(pad + 8 + i * 8); 294 matches[i] = getInt(pad + 8 + i * 8);
295 offsets[i] = getInt(pad + 12 + i * 8); 295 offsets[i] = getInt(pad + 12 + i * 8);
296 } 296 }
297 return visitor.visitLookupSwitch( 297 return visitor.visitLookupSwitch(
298 this, default_, npairs, matches, offsets); 298 this, default_, npairs, matches, offsets, p);
299 } 299 }
300 default: 300 default:
301 throw new IllegalStateException(); 301 throw new IllegalStateException();
302 } 302 }
303 } 303 }

mercurial