From 3d8f246905026737da7946a1c7d9bffe57f7f24d Mon Sep 17 00:00:00 2001 From: jrose Date: Fri, 5 Nov 2010 12:18:30 -0700 Subject: [PATCH] 6996563: 6984311 changes forgot to update vmStructs.cpp for new field _operands Summary: Add missing line to vmStructs. Also fix bug with class dumper. Reviewed-by: twisti, kvn --- .../sun/jvm/hotspot/tools/jcore/ClassWriter.java | 12 ++++++------ src/share/vm/runtime/vmStructs.cpp | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ClassWriter.java b/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ClassWriter.java index 105b55a07..c07809183 100644 --- a/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ClassWriter.java +++ b/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ClassWriter.java @@ -303,12 +303,12 @@ public class ClassWriter implements /* imports */ ClassConstants case JVM_CONSTANT_MethodHandle: { dos.writeByte(cpConstType); int value = cpool.getIntAt(ci); - short bootstrapMethodIndex = (short) extractLowShortFromInt(value); - short nameAndTypeIndex = (short) extractHighShortFromInt(value); - dos.writeShort(bootstrapMethodIndex); - dos.writeShort(nameAndTypeIndex); - if (DEBUG) debugMessage("CP[" + ci + "] = indy BSM = " + - bootstrapMethodIndex + ", N&T = " + nameAndTypeIndex); + byte refKind = (byte) extractLowShortFromInt(value); + short memberIndex = (short) extractHighShortFromInt(value); + dos.writeByte(refKind); + dos.writeShort(memberIndex); + if (DEBUG) debugMessage("CP[" + ci + "] = MH kind = " + + refKind + ", mem = " + memberIndex); break; } diff --git a/src/share/vm/runtime/vmStructs.cpp b/src/share/vm/runtime/vmStructs.cpp index 41c7ce31f..af25d83b4 100644 --- a/src/share/vm/runtime/vmStructs.cpp +++ b/src/share/vm/runtime/vmStructs.cpp @@ -86,6 +86,7 @@ static inline uint64_t cast_uint64_t(size_t x) nonstatic_field(constantPoolOopDesc, _tags, typeArrayOop) \ nonstatic_field(constantPoolOopDesc, _cache, constantPoolCacheOop) \ nonstatic_field(constantPoolOopDesc, _pool_holder, klassOop) \ + nonstatic_field(constantPoolOopDesc, _operands, typeArrayOop) \ nonstatic_field(constantPoolOopDesc, _length, int) \ nonstatic_field(constantPoolCacheOopDesc, _length, int) \ nonstatic_field(constantPoolCacheOopDesc, _constant_pool, constantPoolOop) \ -- GitLab