< prev index next >

src/hotspot/share/classfile/compactHashtable.hpp

Print this page




 214     _bucket_count = 0;
 215     _entry_count = 0;
 216     _buckets = 0;
 217     _entries = 0;
 218   }
 219 
 220   void init(address base_address, u4 entry_count, u4 bucket_count, u4* buckets, u4* entries) {
 221     _base_address = base_address;
 222     _bucket_count = bucket_count;
 223     _entry_count = entry_count;
 224     _buckets = buckets;
 225     _entries = entries;
 226   }
 227 
 228   template <class I> inline void iterate(const I& iterator);
 229 
 230   bool exists(u4 value);
 231 
 232   // For reading from/writing to the CDS archive
 233   void serialize(SerializeClosure* soc);




 234 };
 235 
 236 template <class T, class N> class CompactHashtable : public SimpleCompactHashtable {
 237   friend class VMStructs;
 238 
 239 public:
 240   enum CompactHashtableType {
 241     _symbol_table = 0,
 242     _string_table = 1
 243   };
 244 
 245 private:
 246   u4 _type;
 247 
 248   inline Symbol* decode_entry(CompactHashtable<Symbol*, char>* const t,
 249                               u4 offset, const char* name, int len);
 250 
 251   inline oop decode_entry(CompactHashtable<oop, char>* const t,
 252                           u4 offset, const char* name, int len);
 253 public:




 214     _bucket_count = 0;
 215     _entry_count = 0;
 216     _buckets = 0;
 217     _entries = 0;
 218   }
 219 
 220   void init(address base_address, u4 entry_count, u4 bucket_count, u4* buckets, u4* entries) {
 221     _base_address = base_address;
 222     _bucket_count = bucket_count;
 223     _entry_count = entry_count;
 224     _buckets = buckets;
 225     _entries = entries;
 226   }
 227 
 228   template <class I> inline void iterate(const I& iterator);
 229 
 230   bool exists(u4 value);
 231 
 232   // For reading from/writing to the CDS archive
 233   void serialize(SerializeClosure* soc);
 234 
 235   inline bool empty() {
 236     return (_entry_count==0);
 237   }
 238 };
 239 
 240 template <class T, class N> class CompactHashtable : public SimpleCompactHashtable {
 241   friend class VMStructs;
 242 
 243 public:
 244   enum CompactHashtableType {
 245     _symbol_table = 0,
 246     _string_table = 1
 247   };
 248 
 249 private:
 250   u4 _type;
 251 
 252   inline Symbol* decode_entry(CompactHashtable<Symbol*, char>* const t,
 253                               u4 offset, const char* name, int len);
 254 
 255   inline oop decode_entry(CompactHashtable<oop, char>* const t,
 256                           u4 offset, const char* name, int len);
 257 public:


< prev index next >