< prev index next >
src/share/vm/classfile/dictionary.hpp
Print this page
@@ -39,11 +39,11 @@
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// The data structure for the system dictionary (and the shared system
// dictionary).
-class Dictionary : public TwoOopHashtable<Klass*, mtClass> {
+class Dictionary : public TwoOopHashtable<InstanceKlass*, mtClass> {
friend class VMStructs;
private:
// current iteration index.
static int _current_class_index;
// pointer to the current hash table entry.
@@ -54,42 +54,42 @@
DictionaryEntry* get_entry(int index, unsigned int hash,
Symbol* name, ClassLoaderData* loader_data);
protected:
DictionaryEntry* bucket(int i) const {
- return (DictionaryEntry*)Hashtable<Klass*, mtClass>::bucket(i);
+ return (DictionaryEntry*)Hashtable<InstanceKlass*, mtClass>::bucket(i);
}
// The following method is not MT-safe and must be done under lock.
DictionaryEntry** bucket_addr(int i) {
- return (DictionaryEntry**)Hashtable<Klass*, mtClass>::bucket_addr(i);
+ return (DictionaryEntry**)Hashtable<InstanceKlass*, mtClass>::bucket_addr(i);
}
void add_entry(int index, DictionaryEntry* new_entry) {
- Hashtable<Klass*, mtClass>::add_entry(index, (HashtableEntry<Klass*, mtClass>*)new_entry);
+ Hashtable<InstanceKlass*, mtClass>::add_entry(index, (HashtableEntry<InstanceKlass*, mtClass>*)new_entry);
}
static size_t entry_size();
public:
Dictionary(int table_size);
Dictionary(int table_size, HashtableBucket<mtClass>* t, int number_of_entries);
- DictionaryEntry* new_entry(unsigned int hash, Klass* klass, ClassLoaderData* loader_data);
+ DictionaryEntry* new_entry(unsigned int hash, InstanceKlass* klass, ClassLoaderData* loader_data);
DictionaryEntry* new_entry();
void free_entry(DictionaryEntry* entry);
- void add_klass(Symbol* class_name, ClassLoaderData* loader_data,KlassHandle obj);
+ void add_klass(Symbol* class_name, ClassLoaderData* loader_data, InstanceKlass* obj);
- Klass* find_class(int index, unsigned int hash,
+ InstanceKlass* find_class(int index, unsigned int hash,
Symbol* name, ClassLoaderData* loader_data);
- Klass* find_shared_class(int index, unsigned int hash, Symbol* name);
+ InstanceKlass* find_shared_class(int index, unsigned int hash, Symbol* name);
// Compiler support
- Klass* try_get_next_class();
+ InstanceKlass* try_get_next_class();
// GC support
void oops_do(OopClosure* f);
void always_strong_oops_do(OopClosure* blk);
void roots_oops_do(OopClosure* strong, OopClosure* weak);
@@ -114,17 +114,17 @@
// Unload (that is, break root links to) all unmarked classes and loaders.
void do_unloading();
// Protection domains
- Klass* find(int index, unsigned int hash, Symbol* name,
+ InstanceKlass* find(int index, unsigned int hash, Symbol* name,
ClassLoaderData* loader_data, Handle protection_domain, TRAPS);
bool is_valid_protection_domain(int index, unsigned int hash,
Symbol* name, ClassLoaderData* loader_data,
Handle protection_domain);
void add_protection_domain(int index, unsigned int hash,
- instanceKlassHandle klass, ClassLoaderData* loader_data,
+ InstanceKlass* klass, ClassLoaderData* loader_data,
Handle protection_domain, TRAPS);
// Sharing support
void reorder_dictionary();
@@ -241,13 +241,13 @@
ProtectionDomainEntry* next() { return _next; }
oop protection_domain() { return _pd_cache->protection_domain(); }
};
// An entry in the system dictionary, this describes a class as
-// { Klass*, loader, protection_domain }.
+// { InstanceKlass*, loader, protection_domain }.
-class DictionaryEntry : public HashtableEntry<Klass*, mtClass> {
+class DictionaryEntry : public HashtableEntry<InstanceKlass*, mtClass> {
friend class VMStructs;
private:
// Contains the set of approved protection domains that can access
// this system dictionary entry.
//
@@ -275,19 +275,19 @@
// Tells whether a protection is in the approved set.
bool contains_protection_domain(oop protection_domain) const;
// Adds a protection domain to the approved set.
void add_protection_domain(Dictionary* dict, Handle protection_domain);
- Klass* klass() const { return (Klass*)literal(); }
- Klass** klass_addr() { return (Klass**)literal_addr(); }
+ InstanceKlass* klass() const { return (InstanceKlass*)literal(); }
+ InstanceKlass** klass_addr() { return (InstanceKlass**)literal_addr(); }
DictionaryEntry* next() const {
- return (DictionaryEntry*)HashtableEntry<Klass*, mtClass>::next();
+ return (DictionaryEntry*)HashtableEntry<InstanceKlass*, mtClass>::next();
}
DictionaryEntry** next_addr() {
- return (DictionaryEntry**)HashtableEntry<Klass*, mtClass>::next_addr();
+ return (DictionaryEntry**)HashtableEntry<InstanceKlass*, mtClass>::next_addr();
}
ClassLoaderData* loader_data() const { return _loader_data; }
void set_loader_data(ClassLoaderData* loader_data) { _loader_data = loader_data; }
@@ -321,11 +321,11 @@
current->_pd_cache->protection_domain()->verify();
}
}
bool equals(const Symbol* class_name, ClassLoaderData* loader_data) const {
- Klass* klass = (Klass*)literal();
+ InstanceKlass* klass = (InstanceKlass*)literal();
return (klass->name() == class_name && _loader_data == loader_data);
}
void print_count(outputStream *st) {
int count = 0;
< prev index next >