comparison src/share/vm/oops/instanceOop.hpp @ 165:437d03ea40b1

6703888: Compressed Oops: use the 32-bits gap after klass in a object Summary: Use the gap also for a narrow oop field and a boxing object value. Reviewed-by: coleenp, never
author kvn
date Wed, 21 May 2008 16:31:35 -0700
parents ba764ed4b6f2
children d1605aabd0a1
comparison
equal deleted inserted replaced
164:c436414a719e 165:437d03ea40b1
37 sizeof(instanceOopDesc); 37 sizeof(instanceOopDesc);
38 } 38 }
39 39
40 static bool contains_field_offset(int offset, int nonstatic_field_size) { 40 static bool contains_field_offset(int offset, int nonstatic_field_size) {
41 int base_in_bytes = base_offset_in_bytes(); 41 int base_in_bytes = base_offset_in_bytes();
42 if (UseCompressedOops) { 42 return (offset >= base_in_bytes &&
43 return (offset >= base_in_bytes && 43 (offset-base_in_bytes) < nonstatic_field_size * heapOopSize);
44 // field can be embedded in header, or is after header.
45 (offset < (int)sizeof(instanceOopDesc) ||
46 (offset-(int)sizeof(instanceOopDesc))/wordSize < nonstatic_field_size));
47 } else {
48 return (offset >= base_in_bytes &&
49 (offset-base_in_bytes)/wordSize < nonstatic_field_size);
50 }
51 } 44 }
52 }; 45 };