39
40 private:
41 // The string table
42 static StringTable* _the_table;
43
44 // Shared string table
45 static CompactHashtable<oop, char> _shared_table;
46 static bool _ignore_shared_strings;
47
48 // Set if one bucket is out of balance due to hash algorithm deficiency
49 static bool _needs_rehashing;
50
51 // Claimed high water mark for parallel chunked scanning
52 static volatile int _parallel_claimed_idx;
53
54 static oop intern(Handle string_or_null, jchar* chars, int length, TRAPS);
55 oop basic_add(int index, Handle string_or_null, jchar* name, int len,
56 unsigned int hashValue, TRAPS);
57
58 oop lookup_in_main_table(int index, jchar* chars, int length, unsigned int hashValue);
59 static oop lookup_shared(jchar* name, int len);
60
61 // Apply the give oop closure to the entries to the buckets
62 // in the range [start_idx, end_idx).
63 static void buckets_oops_do(OopClosure* f, int start_idx, int end_idx);
64 // Unlink or apply the give oop closure to the entries to the buckets
65 // in the range [start_idx, end_idx).
66 static void buckets_unlink_or_oops_do(BoolObjectClosure* is_alive, OopClosure* f, int start_idx, int end_idx, int* processed, int* removed);
67
68 StringTable() : RehashableHashtable<oop, mtSymbol>((int)StringTableSize,
69 sizeof (HashtableEntry<oop, mtSymbol>)) {}
70
71 StringTable(HashtableBucket<mtSymbol>* t, int number_of_entries)
72 : RehashableHashtable<oop, mtSymbol>((int)StringTableSize, sizeof (HashtableEntry<oop, mtSymbol>), t,
73 number_of_entries) {}
74 public:
75 // The string table
76 static StringTable* the_table() { return _the_table; }
77
78 // Size of one bucket in the string table. Used when checking for rollover.
79 static uint bucket_size() { return sizeof(HashtableBucket<mtSymbol>); }
|
39
40 private:
41 // The string table
42 static StringTable* _the_table;
43
44 // Shared string table
45 static CompactHashtable<oop, char> _shared_table;
46 static bool _ignore_shared_strings;
47
48 // Set if one bucket is out of balance due to hash algorithm deficiency
49 static bool _needs_rehashing;
50
51 // Claimed high water mark for parallel chunked scanning
52 static volatile int _parallel_claimed_idx;
53
54 static oop intern(Handle string_or_null, jchar* chars, int length, TRAPS);
55 oop basic_add(int index, Handle string_or_null, jchar* name, int len,
56 unsigned int hashValue, TRAPS);
57
58 oop lookup_in_main_table(int index, jchar* chars, int length, unsigned int hashValue);
59 static oop lookup_shared(jchar* name, int len, unsigned int hash);
60
61 // Apply the give oop closure to the entries to the buckets
62 // in the range [start_idx, end_idx).
63 static void buckets_oops_do(OopClosure* f, int start_idx, int end_idx);
64 // Unlink or apply the give oop closure to the entries to the buckets
65 // in the range [start_idx, end_idx).
66 static void buckets_unlink_or_oops_do(BoolObjectClosure* is_alive, OopClosure* f, int start_idx, int end_idx, int* processed, int* removed);
67
68 StringTable() : RehashableHashtable<oop, mtSymbol>((int)StringTableSize,
69 sizeof (HashtableEntry<oop, mtSymbol>)) {}
70
71 StringTable(HashtableBucket<mtSymbol>* t, int number_of_entries)
72 : RehashableHashtable<oop, mtSymbol>((int)StringTableSize, sizeof (HashtableEntry<oop, mtSymbol>), t,
73 number_of_entries) {}
74 public:
75 // The string table
76 static StringTable* the_table() { return _the_table; }
77
78 // Size of one bucket in the string table. Used when checking for rollover.
79 static uint bucket_size() { return sizeof(HashtableBucket<mtSymbol>); }
|