< prev index next >

src/hotspot/share/classfile/compactHashtable.hpp

Print this page


 205     _bucket_count = 0;
 206     _buckets = 0;
 207     _entries = 0;
 208   }
 209 
 210   void reset() {
 211     _bucket_count = 0;
 212     _entry_count = 0;
 213     _buckets = 0;
 214     _entries = 0;
 215   }
 216 
 217   void init(address base_address, u4 entry_count, u4 bucket_count, u4* buckets, u4* entries) {
 218     _base_address = base_address;
 219     _bucket_count = bucket_count;
 220     _entry_count = entry_count;
 221     _buckets = buckets;
 222     _entries = entries;
 223   }
 224 
 225   // For reading from/writing to the CDS archive
 226   void serialize(SerializeClosure* soc) NOT_CDS_RETURN;
 227 
 228   inline bool empty() {
 229     return (_entry_count == 0);
 230   }
 231 };
 232 
 233 template <
 234   typename K,
 235   typename V,
 236   V (*DECODE)(address base_address, u4 offset),
 237   bool (*EQUALS)(V value, K key, int len)
 238   >
 239 class CompactHashtable : public SimpleCompactHashtable {
 240   friend class VMStructs;
 241 
 242   V decode(u4 offset) const {
 243     return DECODE(_base_address, offset);
 244   }
 245 
 246 public:




 205     _bucket_count = 0;
 206     _buckets = 0;
 207     _entries = 0;
 208   }
 209 
 210   void reset() {
 211     _bucket_count = 0;
 212     _entry_count = 0;
 213     _buckets = 0;
 214     _entries = 0;
 215   }
 216 
 217   void init(address base_address, u4 entry_count, u4 bucket_count, u4* buckets, u4* entries) {
 218     _base_address = base_address;
 219     _bucket_count = bucket_count;
 220     _entry_count = entry_count;
 221     _buckets = buckets;
 222     _entries = entries;
 223   }
 224 
 225   // Read/Write the table's header from/to the CDS archive
 226   void serialize_header(SerializeClosure* soc) NOT_CDS_RETURN;
 227 
 228   inline bool empty() {
 229     return (_entry_count == 0);
 230   }
 231 };
 232 
 233 template <
 234   typename K,
 235   typename V,
 236   V (*DECODE)(address base_address, u4 offset),
 237   bool (*EQUALS)(V value, K key, int len)
 238   >
 239 class CompactHashtable : public SimpleCompactHashtable {
 240   friend class VMStructs;
 241 
 242   V decode(u4 offset) const {
 243     return DECODE(_base_address, offset);
 244   }
 245 
 246 public:


< prev index next >