< prev index next >
src/hotspot/share/classfile/stringTable.hpp
Print this page
rev 48017 : [mq]: Access_strings
@@ -74,10 +74,17 @@
// HashtableEntry structures). This is used in the String.intern() method.
static unsigned int hash_string(const jchar* s, int len);
static unsigned int hash_string(oop string);
static unsigned int alt_hash_string(const jchar* s, int len);
+ // Accessors for the string roots in the hashtable entries.
+ // Use string_object_no_keepalive() only when the value is not returned
+ // outside of a scope where a thread transition is possible.
+ static oop string_object(HashtableEntry<oop, mtSymbol>* entry);
+ static oop string_object_no_keepalive(HashtableEntry<oop, mtSymbol>* entry);
+ static void set_string_object(HashtableEntry<oop, mtSymbol>* entry, oop string);
+
StringTable() : RehashableHashtable<oop, mtSymbol>((int)StringTableSize,
sizeof (HashtableEntry<oop, mtSymbol>)) {}
StringTable(HashtableBucket<mtSymbol>* t, int number_of_entries)
: RehashableHashtable<oop, mtSymbol>((int)StringTableSize, sizeof (HashtableEntry<oop, mtSymbol>), t,
< prev index next >