comparison agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ClassWriter.java @ 1913:3b2dea75431e

6984311: JSR 292 needs optional bootstrap method parameters Summary: Allow CONSTANT_InvokeDynamic nodes to have any number of extra operands. Reviewed-by: twisti
author jrose
date Sat, 30 Oct 2010 13:08:23 -0700
parents 083fde3b838e
children f42a2f0c16bb
comparison
equal deleted inserted replaced
1912:8213b0f5c92d 1913:3b2dea75431e
321 break; 321 break;
322 } 322 }
323 323
324 case JVM_CONSTANT_InvokeDynamic: { 324 case JVM_CONSTANT_InvokeDynamic: {
325 dos.writeByte(cpConstType); 325 dos.writeByte(cpConstType);
326 int value = cpool.getIntAt(ci); 326 int[] values = cpool.getMultiOperandsAt(ci);
327 short refIndex = (short) value; 327 for (int vn = 0; vn < values.length; vn++) {
328 dos.writeShort(refIndex); 328 dos.writeShort(values[vn]);
329 if (DEBUG) debugMessage("CP[" + ci + "] = MT index = " + refIndex); 329 }
330 if (DEBUG) debugMessage("CP[" + ci + "] = INDY indexes = " + Arrays.toString(values));
330 break; 331 break;
331 } 332 }
332 333
333 default: 334 default:
334 throw new InternalError("Unknown tag: " + cpConstType); 335 throw new InternalError("Unknown tag: " + cpConstType);