260 number_of_entries) {} |
260 number_of_entries) {} |
261 public: |
261 public: |
262 // The string table |
262 // The string table |
263 static StringTable* the_table() { return _the_table; } |
263 static StringTable* the_table() { return _the_table; } |
264 |
264 |
|
265 // Size of one bucket in the string table. Used when checking for rollover. |
|
266 static uint bucket_size() { return sizeof(HashtableBucket<mtSymbol>); } |
|
267 |
265 static void create_table() { |
268 static void create_table() { |
266 assert(_the_table == NULL, "One string table allowed."); |
269 assert(_the_table == NULL, "One string table allowed."); |
267 _the_table = new StringTable(); |
270 _the_table = new StringTable(); |
268 } |
|
269 |
|
270 static void create_table(HashtableBucket<mtSymbol>* t, int length, |
|
271 int number_of_entries) { |
|
272 assert(_the_table == NULL, "One string table allowed."); |
|
273 assert((size_t)length == StringTableSize * sizeof(HashtableBucket<mtSymbol>), |
|
274 "bad shared string size."); |
|
275 _the_table = new StringTable(t, number_of_entries); |
|
276 } |
271 } |
277 |
272 |
278 // GC support |
273 // GC support |
279 // Delete pointers to otherwise-unreachable objects. |
274 // Delete pointers to otherwise-unreachable objects. |
280 static void unlink(BoolObjectClosure* cl); |
275 static void unlink(BoolObjectClosure* cl); |