47 ClassLoaderData* loader_data() const { return _loader_data; } |
47 ClassLoaderData* loader_data() const { return _loader_data; } |
48 |
48 |
49 DictionaryEntry* get_entry(int index, unsigned int hash, Symbol* name); |
49 DictionaryEntry* get_entry(int index, unsigned int hash, Symbol* name); |
50 |
50 |
51 protected: |
51 protected: |
52 DictionaryEntry* bucket(int i) const { |
|
53 return (DictionaryEntry*)Hashtable<InstanceKlass*, mtClass>::bucket(i); |
|
54 } |
|
55 |
|
56 // The following method is not MT-safe and must be done under lock. |
|
57 DictionaryEntry** bucket_addr(int i) { |
|
58 return (DictionaryEntry**)Hashtable<InstanceKlass*, mtClass>::bucket_addr(i); |
|
59 } |
|
60 |
|
61 void add_entry(int index, DictionaryEntry* new_entry) { |
|
62 Hashtable<InstanceKlass*, mtClass>::add_entry(index, (HashtableEntry<InstanceKlass*, mtClass>*)new_entry); |
|
63 } |
|
64 |
|
65 void free_entry(DictionaryEntry* entry); |
|
66 |
|
67 static size_t entry_size(); |
52 static size_t entry_size(); |
68 public: |
53 public: |
69 Dictionary(ClassLoaderData* loader_data, int table_size); |
54 Dictionary(ClassLoaderData* loader_data, int table_size); |
70 Dictionary(ClassLoaderData* loader_data, int table_size, HashtableBucket<mtClass>* t, int number_of_entries); |
55 Dictionary(ClassLoaderData* loader_data, int table_size, HashtableBucket<mtClass>* t, int number_of_entries); |
71 ~Dictionary(); |
56 ~Dictionary(); |
105 // Sharing support |
90 // Sharing support |
106 void reorder_dictionary_for_sharing(); |
91 void reorder_dictionary_for_sharing(); |
107 |
92 |
108 void print_on(outputStream* st) const; |
93 void print_on(outputStream* st) const; |
109 void verify(); |
94 void verify(); |
|
95 DictionaryEntry* bucket(int i) const { |
|
96 return (DictionaryEntry*)Hashtable<InstanceKlass*, mtClass>::bucket(i); |
|
97 } |
|
98 |
|
99 // The following method is not MT-safe and must be done under lock. |
|
100 DictionaryEntry** bucket_addr(int i) { |
|
101 return (DictionaryEntry**)Hashtable<InstanceKlass*, mtClass>::bucket_addr(i); |
|
102 } |
|
103 |
|
104 void add_entry(int index, DictionaryEntry* new_entry) { |
|
105 Hashtable<InstanceKlass*, mtClass>::add_entry(index, (HashtableEntry<InstanceKlass*, mtClass>*)new_entry); |
|
106 } |
|
107 |
|
108 void unlink_entry(DictionaryEntry* entry) { |
|
109 Hashtable<InstanceKlass*, mtClass>::unlink_entry((HashtableEntry<InstanceKlass*, mtClass>*)entry); |
|
110 } |
|
111 |
|
112 void free_entry(DictionaryEntry* entry); |
110 }; |
113 }; |
111 |
114 |
112 // An entry in the class loader data dictionaries, this describes a class as |
115 // An entry in the class loader data dictionaries, this describes a class as |
113 // { InstanceKlass*, protection_domain }. |
116 // { InstanceKlass*, protection_domain }. |
114 |
117 |
252 // and unmanaged. Used to record the auto-generation of each method |
255 // and unmanaged. Used to record the auto-generation of each method |
253 // MethodHandle.invoke(S)T, for all signatures (S)T. |
256 // MethodHandle.invoke(S)T, for all signatures (S)T. |
254 class SymbolPropertyTable : public Hashtable<Symbol*, mtSymbol> { |
257 class SymbolPropertyTable : public Hashtable<Symbol*, mtSymbol> { |
255 friend class VMStructs; |
258 friend class VMStructs; |
256 private: |
259 private: |
257 SymbolPropertyEntry* bucket(int i) { |
|
258 return (SymbolPropertyEntry*) Hashtable<Symbol*, mtSymbol>::bucket(i); |
|
259 } |
|
260 |
|
261 // The following method is not MT-safe and must be done under lock. |
260 // The following method is not MT-safe and must be done under lock. |
262 SymbolPropertyEntry** bucket_addr(int i) { |
261 SymbolPropertyEntry** bucket_addr(int i) { |
263 return (SymbolPropertyEntry**) Hashtable<Symbol*, mtSymbol>::bucket_addr(i); |
262 return (SymbolPropertyEntry**) Hashtable<Symbol*, mtSymbol>::bucket_addr(i); |
264 } |
263 } |
265 |
264 |