< prev index next >

src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/Symbol.java

Print this page

        

*** 43,53 **** }); } private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { Type type = db.lookupType("Symbol"); ! length = type.getCIntegerField("_length"); baseOffset = type.getField("_body").getOffset(); idHash = type.getCIntegerField("_identity_hash"); } // Format: --- 43,53 ---- }); } private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { Type type = db.lookupType("Symbol"); ! length = type.getCIntegerField("_length_and_refcount"); baseOffset = type.getField("_body").getOffset(); idHash = type.getCIntegerField("_identity_hash"); } // Format:
*** 73,83 **** // Fields private static CIntegerField length; // Accessors for declared fields ! public long getLength() { return length.getValue(this.addr); } public byte getByteAt(long index) { return addr.getJByteAt(baseOffset + index); } // _identity_hash is a short --- 73,86 ---- // Fields private static CIntegerField length; // Accessors for declared fields ! public long getLength() { ! int i = (int)length.getValue(this.addr); ! return (i >> 16); ! } public byte getByteAt(long index) { return addr.getJByteAt(baseOffset + index); } // _identity_hash is a short
< prev index next >