comparison src/share/vm/oops/cpCacheOop.hpp @ 113:ba764ed4b6f2

6420645: Create a vm that uses compressed oops for up to 32gb heapsizes Summary: Compressed oops in instances, arrays, and headers. Code contributors are coleenp, phh, never, swamyv Reviewed-by: jmasa, kamg, acorn, tbell, kvn, rasbold
author coleenp
date Sun, 13 Apr 2008 17:43:42 -0400
parents a61af66fc99e
children d1605aabd0a1
comparison
equal deleted inserted replaced
110:a49a647afe9a 113:ba764ed4b6f2
284 // A constant pool cache is a runtime data structure set aside to a constant pool. The cache 284 // A constant pool cache is a runtime data structure set aside to a constant pool. The cache
285 // holds interpreter runtime information for all field access and invoke bytecodes. The cache 285 // holds interpreter runtime information for all field access and invoke bytecodes. The cache
286 // is created and initialized before a class is actively used (i.e., initialized), the indivi- 286 // is created and initialized before a class is actively used (i.e., initialized), the indivi-
287 // dual cache entries are filled at resolution (i.e., "link") time (see also: rewriter.*). 287 // dual cache entries are filled at resolution (i.e., "link") time (see also: rewriter.*).
288 288
289 class constantPoolCacheOopDesc: public arrayOopDesc { 289 class constantPoolCacheOopDesc: public oopDesc {
290 friend class VMStructs; 290 friend class VMStructs;
291 private: 291 private:
292 int _length;
292 constantPoolOop _constant_pool; // the corresponding constant pool 293 constantPoolOop _constant_pool; // the corresponding constant pool
293 294
294 // Sizing 295 // Sizing
296 debug_only(friend class ClassVerifier;)
297 int length() const { return _length; }
298 void set_length(int length) { _length = length; }
299
295 static int header_size() { return sizeof(constantPoolCacheOopDesc) / HeapWordSize; } 300 static int header_size() { return sizeof(constantPoolCacheOopDesc) / HeapWordSize; }
296 static int object_size(int length) { return align_object_size(header_size() + length * in_words(ConstantPoolCacheEntry::size())); } 301 static int object_size(int length) { return align_object_size(header_size() + length * in_words(ConstantPoolCacheEntry::size())); }
297 int object_size() { return object_size(length()); } 302 int object_size() { return object_size(length()); }
298 303
299 // Helpers 304 // Helpers