hotspot/src/share/vm/classfile/resolutionErrors.hpp
changeset 8076 96d498ec7ae1
parent 7397 5b173b4ca846
child 8921 14bfe81f2a9d
--- a/hotspot/src/share/vm/classfile/resolutionErrors.hpp	Thu Jan 27 13:42:28 2011 -0800
+++ b/hotspot/src/share/vm/classfile/resolutionErrors.hpp	Thu Jan 27 16:11:27 2011 -0800
@@ -33,27 +33,28 @@
 // ResolutionError objects are used to record errors encountered during
 // constant pool resolution (JVMS 5.4.3).
 
-class ResolutionErrorTable : public Hashtable {
+class ResolutionErrorTable : public Hashtable<constantPoolOop> {
 
 public:
   ResolutionErrorTable(int table_size);
 
-  ResolutionErrorEntry* new_entry(int hash, constantPoolOop pool, int cp_index, symbolOop error);
+  ResolutionErrorEntry* new_entry(int hash, constantPoolOop pool, int cp_index, Symbol* error);
+  void free_entry(ResolutionErrorEntry *entry);
 
   ResolutionErrorEntry* bucket(int i) {
-    return (ResolutionErrorEntry*)Hashtable::bucket(i);
+    return (ResolutionErrorEntry*)Hashtable<constantPoolOop>::bucket(i);
   }
 
   ResolutionErrorEntry** bucket_addr(int i) {
-    return (ResolutionErrorEntry**)Hashtable::bucket_addr(i);
+    return (ResolutionErrorEntry**)Hashtable<constantPoolOop>::bucket_addr(i);
   }
 
   void add_entry(int index, ResolutionErrorEntry* new_entry) {
-    Hashtable::add_entry(index, (HashtableEntry*)new_entry);
+    Hashtable<constantPoolOop>::add_entry(index, (HashtableEntry<constantPoolOop>*)new_entry);
   }
 
   void add_entry(int index, unsigned int hash,
-                 constantPoolHandle pool, int which, symbolHandle error);
+                 constantPoolHandle pool, int which, Symbol* error);
 
 
   // find error given the constant pool and constant pool index
@@ -68,18 +69,15 @@
   // purges unloaded entries from the table
   void purge_resolution_errors(BoolObjectClosure* is_alive);
 
-  // this table keeps symbolOops alive
-  void always_strong_classes_do(OopClosure* blk);
-
   // GC support.
   void oops_do(OopClosure* f);
 };
 
 
-class ResolutionErrorEntry : public HashtableEntry {
+class ResolutionErrorEntry : public HashtableEntry<constantPoolOop> {
  private:
   int               _cp_index;
-  symbolOop         _error;
+  Symbol*           _error;
 
  public:
   constantPoolOop    pool() const               { return (constantPoolOop)literal(); }
@@ -88,16 +86,15 @@
   int                cp_index() const           { return _cp_index; }
   void               set_cp_index(int cp_index) { _cp_index = cp_index; }
 
-  symbolOop          error() const              { return _error; }
-  void               set_error(symbolOop e)     { _error = e; }
-  symbolOop*         error_addr()               { return &_error; }
+  Symbol*            error() const              { return _error; }
+  void               set_error(Symbol* e);
 
   ResolutionErrorEntry* next() const {
-    return (ResolutionErrorEntry*)HashtableEntry::next();
+    return (ResolutionErrorEntry*)HashtableEntry<constantPoolOop>::next();
   }
 
   ResolutionErrorEntry** next_addr() {
-    return (ResolutionErrorEntry**)HashtableEntry::next_addr();
+    return (ResolutionErrorEntry**)HashtableEntry<constantPoolOop>::next_addr();
   }
 
   // GC support