mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 23:34:52 +02:00
8056084: Refactor Hashtable to allow implementations without rehashing support
Reviewed-by: gziemski, jmasa, brutisso, coleenp, tschatzl
This commit is contained in:
parent
f12e5848bd
commit
6fc8764c65
6 changed files with 61 additions and 41 deletions
|
@ -73,7 +73,7 @@ class TempNewSymbol : public StackObj {
|
|||
operator Symbol*() { return _temp; }
|
||||
};
|
||||
|
||||
class SymbolTable : public Hashtable<Symbol*, mtSymbol> {
|
||||
class SymbolTable : public RehashableHashtable<Symbol*, mtSymbol> {
|
||||
friend class VMStructs;
|
||||
friend class ClassFileParser;
|
||||
|
||||
|
@ -109,10 +109,10 @@ private:
|
|||
Symbol* lookup(int index, const char* name, int len, unsigned int hash);
|
||||
|
||||
SymbolTable()
|
||||
: Hashtable<Symbol*, mtSymbol>(SymbolTableSize, sizeof (HashtableEntry<Symbol*, mtSymbol>)) {}
|
||||
: RehashableHashtable<Symbol*, mtSymbol>(SymbolTableSize, sizeof (HashtableEntry<Symbol*, mtSymbol>)) {}
|
||||
|
||||
SymbolTable(HashtableBucket<mtSymbol>* t, int number_of_entries)
|
||||
: Hashtable<Symbol*, mtSymbol>(SymbolTableSize, sizeof (HashtableEntry<Symbol*, mtSymbol>), t,
|
||||
: RehashableHashtable<Symbol*, mtSymbol>(SymbolTableSize, sizeof (HashtableEntry<Symbol*, mtSymbol>), t,
|
||||
number_of_entries) {}
|
||||
|
||||
// Arena for permanent symbols (null class loader) that are never unloaded
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue