hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/Hashtable.java
changeset 33628 09241459a8b8
parent 22525 7d87b35a87f2
equal deleted inserted replaced
33627:c5b7455f846e 33628:09241459a8b8
    59   // VM's Hashtable::hash_symbol
    59   // VM's Hashtable::hash_symbol
    60   protected static long hashSymbol(byte[] buf) {
    60   protected static long hashSymbol(byte[] buf) {
    61     long h = 0;
    61     long h = 0;
    62     int s = 0;
    62     int s = 0;
    63     int len = buf.length;
    63     int len = buf.length;
    64     // Emulate the unsigned int in java_lang_String::hash_code
       
    65     while (len-- > 0) {
    64     while (len-- > 0) {
    66       h = 31*h + (0xFFFFFFFFL & buf[s]);
    65       h = 31*h + (0xFFL & buf[s]);
    67       s++;
    66       s++;
    68     }
    67     }
    69     return h & 0xFFFFFFFFL;
    68     return h & 0xFFFFFFFFL;
    70   }
    69   }
    71 }
    70 }