Mercurial > hg > truffle
diff agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ClassWriter.java @ 2011:dad31fc330cd
7001379: bootstrap method data needs to be moved from constant pool to a classfile attribute
Reviewed-by: twisti
author | jrose |
---|---|
date | Fri, 03 Dec 2010 15:53:57 -0800 |
parents | f42a2f0c16bb |
children | 3582bf76420e |
line wrap: on
line diff
--- a/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ClassWriter.java Fri Dec 03 12:14:33 2010 -0800 +++ b/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ClassWriter.java Fri Dec 03 15:53:57 2010 -0800 @@ -321,13 +321,16 @@ break; } + case JVM_CONSTANT_InvokeDynamicTrans: case JVM_CONSTANT_InvokeDynamic: { dos.writeByte(cpConstType); - int[] values = cpool.getMultiOperandsAt(ci); - for (int vn = 0; vn < values.length; vn++) { - dos.writeShort(values[vn]); - } - if (DEBUG) debugMessage("CP[" + ci + "] = INDY indexes = " + Arrays.toString(values)); + int value = cpool.getIntAt(ci); + short bsmIndex = (short) extractLowShortFromInt(value); + short nameAndTypeIndex = (short) extractHighShortFromInt(value); + dos.writeShort(bsmIndex); + dos.writeShort(nameAndTypeIndex); + if (DEBUG) debugMessage("CP[" + ci + "] = INDY bsm = " + + bsmIndex + ", N&T = " + nameAndTypeIndex); break; }