31 class ResolutionErrorEntry; |
31 class ResolutionErrorEntry; |
32 |
32 |
33 // ResolutionError objects are used to record errors encountered during |
33 // ResolutionError objects are used to record errors encountered during |
34 // constant pool resolution (JVMS 5.4.3). |
34 // constant pool resolution (JVMS 5.4.3). |
35 |
35 |
36 class ResolutionErrorTable : public Hashtable<constantPoolOop> { |
36 class ResolutionErrorTable : public Hashtable<constantPoolOop, mtClass> { |
37 |
37 |
38 public: |
38 public: |
39 ResolutionErrorTable(int table_size); |
39 ResolutionErrorTable(int table_size); |
40 |
40 |
41 ResolutionErrorEntry* new_entry(int hash, constantPoolOop pool, int cp_index, Symbol* error); |
41 ResolutionErrorEntry* new_entry(int hash, constantPoolOop pool, int cp_index, Symbol* error); |
42 void free_entry(ResolutionErrorEntry *entry); |
42 void free_entry(ResolutionErrorEntry *entry); |
43 |
43 |
44 ResolutionErrorEntry* bucket(int i) { |
44 ResolutionErrorEntry* bucket(int i) { |
45 return (ResolutionErrorEntry*)Hashtable<constantPoolOop>::bucket(i); |
45 return (ResolutionErrorEntry*)Hashtable<constantPoolOop, mtClass>::bucket(i); |
46 } |
46 } |
47 |
47 |
48 ResolutionErrorEntry** bucket_addr(int i) { |
48 ResolutionErrorEntry** bucket_addr(int i) { |
49 return (ResolutionErrorEntry**)Hashtable<constantPoolOop>::bucket_addr(i); |
49 return (ResolutionErrorEntry**)Hashtable<constantPoolOop, mtClass>::bucket_addr(i); |
50 } |
50 } |
51 |
51 |
52 void add_entry(int index, ResolutionErrorEntry* new_entry) { |
52 void add_entry(int index, ResolutionErrorEntry* new_entry) { |
53 Hashtable<constantPoolOop>::add_entry(index, (HashtableEntry<constantPoolOop>*)new_entry); |
53 Hashtable<constantPoolOop, mtClass>::add_entry(index, |
|
54 (HashtableEntry<constantPoolOop, mtClass>*)new_entry); |
54 } |
55 } |
55 |
56 |
56 void add_entry(int index, unsigned int hash, |
57 void add_entry(int index, unsigned int hash, |
57 constantPoolHandle pool, int which, Symbol* error); |
58 constantPoolHandle pool, int which, Symbol* error); |
58 |
59 |
88 |
89 |
89 Symbol* error() const { return _error; } |
90 Symbol* error() const { return _error; } |
90 void set_error(Symbol* e); |
91 void set_error(Symbol* e); |
91 |
92 |
92 ResolutionErrorEntry* next() const { |
93 ResolutionErrorEntry* next() const { |
93 return (ResolutionErrorEntry*)HashtableEntry<constantPoolOop>::next(); |
94 return (ResolutionErrorEntry*)HashtableEntry<constantPoolOop, mtClass>::next(); |
94 } |
95 } |
95 |
96 |
96 ResolutionErrorEntry** next_addr() { |
97 ResolutionErrorEntry** next_addr() { |
97 return (ResolutionErrorEntry**)HashtableEntry<constantPoolOop>::next_addr(); |
98 return (ResolutionErrorEntry**)HashtableEntry<constantPoolOop, mtClass>::next_addr(); |
98 } |
99 } |
99 |
100 |
100 // GC support |
101 // GC support |
101 void oops_do(OopClosure* blk); |
102 void oops_do(OopClosure* blk); |
102 }; |
103 }; |