< prev index next >

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

Print this page

        

*** 45,55 **** 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: // [header] // [klass ] --- 45,55 ---- 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.getJShortField("_identity_hash"); } // Format: // [header] // [klass ]
*** 79,91 **** public byte getByteAt(long index) { return addr.getJByteAt(baseOffset + index); } ! private static CIntegerField idHash; ! public int identityHash() { return (int)idHash.getValue(this.addr); } public boolean equals(byte[] modUTF8Chars) { int l = (int) getLength(); if (l != modUTF8Chars.length) return false; while (l-- > 0) { --- 79,91 ---- public byte getByteAt(long index) { return addr.getJByteAt(baseOffset + index); } ! private static JShortField idHash; ! public short identityHash() { return (short)idHash.getValue(this.addr); } public boolean equals(byte[] modUTF8Chars) { int l = (int) getLength(); if (l != modUTF8Chars.length) return false; while (l-- > 0) {
< prev index next >