src/share/vm/classfile/stringTable.hpp

Print this page




 101 
 102   // Hashing algorithm, used as the hash value used by the
 103   //     StringTable for bucket selection and comparison (stored in the
 104   //     HashtableEntry structures).  This is used in the String.intern() method.
 105   static unsigned int hash_string(const jchar* s, int len);
 106 
 107   // Internal test.
 108   static void test_alt_hash() PRODUCT_RETURN;
 109 
 110   // Probing
 111   static oop lookup(Symbol* symbol);
 112   static oop lookup(jchar* chars, int length);
 113 
 114   // Interning
 115   static oop intern(Symbol* symbol, TRAPS);
 116   static oop intern(oop string, TRAPS);
 117   static oop intern(const char *utf8_string, TRAPS);
 118 
 119   // Debugging
 120   static void verify();
 121   static void dump(outputStream* st);
 122 
 123   enum VerifyMesgModes {
 124     _verify_quietly    = 0,
 125     _verify_with_mesgs = 1
 126   };
 127 
 128   enum VerifyRetTypes {
 129     _verify_pass          = 0,
 130     _verify_fail_continue = 1,
 131     _verify_fail_done     = 2
 132   };
 133 
 134   static VerifyRetTypes compare_entries(int bkt1, int e_cnt1,
 135                                         HashtableEntry<oop, mtSymbol>* e_ptr1,
 136                                         int bkt2, int e_cnt2,
 137                                         HashtableEntry<oop, mtSymbol>* e_ptr2);
 138   static VerifyRetTypes verify_entry(int bkt, int e_cnt,
 139                                      HashtableEntry<oop, mtSymbol>* e_ptr,
 140                                      VerifyMesgModes mesg_mode);
 141   static int verify_and_compare_entries();




 101 
 102   // Hashing algorithm, used as the hash value used by the
 103   //     StringTable for bucket selection and comparison (stored in the
 104   //     HashtableEntry structures).  This is used in the String.intern() method.
 105   static unsigned int hash_string(const jchar* s, int len);
 106 
 107   // Internal test.
 108   static void test_alt_hash() PRODUCT_RETURN;
 109 
 110   // Probing
 111   static oop lookup(Symbol* symbol);
 112   static oop lookup(jchar* chars, int length);
 113 
 114   // Interning
 115   static oop intern(Symbol* symbol, TRAPS);
 116   static oop intern(oop string, TRAPS);
 117   static oop intern(const char *utf8_string, TRAPS);
 118 
 119   // Debugging
 120   static void verify();
 121   static void dump(outputStream* st, bool verbose=false);
 122 
 123   enum VerifyMesgModes {
 124     _verify_quietly    = 0,
 125     _verify_with_mesgs = 1
 126   };
 127 
 128   enum VerifyRetTypes {
 129     _verify_pass          = 0,
 130     _verify_fail_continue = 1,
 131     _verify_fail_done     = 2
 132   };
 133 
 134   static VerifyRetTypes compare_entries(int bkt1, int e_cnt1,
 135                                         HashtableEntry<oop, mtSymbol>* e_ptr1,
 136                                         int bkt2, int e_cnt2,
 137                                         HashtableEntry<oop, mtSymbol>* e_ptr2);
 138   static VerifyRetTypes verify_entry(int bkt, int e_cnt,
 139                                      HashtableEntry<oop, mtSymbol>* e_ptr,
 140                                      VerifyMesgModes mesg_mode);
 141   static int verify_and_compare_entries();