158 void delete_empty_blocks_safepoint(); 159 void delete_empty_blocks_concurrent(); 160 161 // Debugging and logging support. 162 const char* name() const; 163 void print_on(outputStream* st) const PRODUCT_RETURN; 164 165 // Provides access to storage internals, for unit testing. 166 // Declare, but not define, the public class OopStorage::TestAccess. 167 // That class is defined as part of the unit-test. It "exports" the needed 168 // private types by providing public typedefs for them. 169 class TestAccess; 170 171 // xlC on AIX can't compile test_oopStorage.cpp with following private 172 // classes. C++03 introduced access for nested classes with DR45, but xlC 173 // version 12 rejects it. 174 NOT_AIX( private: ) 175 class Block; // Forward decl; defined in .inline.hpp file. 176 class BlockList; // Forward decl for BlockEntry friend decl. 177 178 class BlockEntry VALUE_OBJ_CLASS_SPEC { 179 friend class BlockList; 180 181 // Members are mutable, and we deal exclusively with pointers to 182 // const, to make const blocks easier to use; a block being const 183 // doesn't prevent modifying its list state. 184 mutable const Block* _prev; 185 mutable const Block* _next; 186 187 // Noncopyable. 188 BlockEntry(const BlockEntry&); 189 BlockEntry& operator=(const BlockEntry&); 190 191 public: 192 BlockEntry(); 193 ~BlockEntry(); 194 }; 195 196 class BlockList VALUE_OBJ_CLASS_SPEC { 197 const Block* _head; 198 const Block* _tail; 199 const BlockEntry& (*_get_entry)(const Block& block); 200 201 // Noncopyable. 202 BlockList(const BlockList&); 203 BlockList& operator=(const BlockList&); 204 205 public: 206 BlockList(const BlockEntry& (*get_entry)(const Block& block)); 207 ~BlockList(); 208 209 Block* head(); 210 const Block* chead() const; 211 const Block* ctail() const; 212 213 Block* prev(Block& block); 214 Block* next(Block& block); 215 216 const Block* prev(const Block& block) const; | 158 void delete_empty_blocks_safepoint(); 159 void delete_empty_blocks_concurrent(); 160 161 // Debugging and logging support. 162 const char* name() const; 163 void print_on(outputStream* st) const PRODUCT_RETURN; 164 165 // Provides access to storage internals, for unit testing. 166 // Declare, but not define, the public class OopStorage::TestAccess. 167 // That class is defined as part of the unit-test. It "exports" the needed 168 // private types by providing public typedefs for them. 169 class TestAccess; 170 171 // xlC on AIX can't compile test_oopStorage.cpp with following private 172 // classes. C++03 introduced access for nested classes with DR45, but xlC 173 // version 12 rejects it. 174 NOT_AIX( private: ) 175 class Block; // Forward decl; defined in .inline.hpp file. 176 class BlockList; // Forward decl for BlockEntry friend decl. 177 178 class BlockEntry { 179 friend class BlockList; 180 181 // Members are mutable, and we deal exclusively with pointers to 182 // const, to make const blocks easier to use; a block being const 183 // doesn't prevent modifying its list state. 184 mutable const Block* _prev; 185 mutable const Block* _next; 186 187 // Noncopyable. 188 BlockEntry(const BlockEntry&); 189 BlockEntry& operator=(const BlockEntry&); 190 191 public: 192 BlockEntry(); 193 ~BlockEntry(); 194 }; 195 196 class BlockList { 197 const Block* _head; 198 const Block* _tail; 199 const BlockEntry& (*_get_entry)(const Block& block); 200 201 // Noncopyable. 202 BlockList(const BlockList&); 203 BlockList& operator=(const BlockList&); 204 205 public: 206 BlockList(const BlockEntry& (*get_entry)(const Block& block)); 207 ~BlockList(); 208 209 Block* head(); 210 const Block* chead() const; 211 const Block* ctail() const; 212 213 Block* prev(Block& block); 214 Block* next(Block& block); 215 216 const Block* prev(const Block& block) const; |