35 // aligned header size. |
35 // aligned header size. |
36 static int header_size() { return sizeof(instanceOopDesc)/HeapWordSize; } |
36 static int header_size() { return sizeof(instanceOopDesc)/HeapWordSize; } |
37 |
37 |
38 // If compressed, the offset of the fields of the instance may not be aligned. |
38 // If compressed, the offset of the fields of the instance may not be aligned. |
39 static int base_offset_in_bytes() { |
39 static int base_offset_in_bytes() { |
40 return UseCompressedKlassPointers ? |
40 // offset computation code breaks if UseCompressedKlassPointers |
|
41 // only is true |
|
42 return (UseCompressedOops && UseCompressedKlassPointers) ? |
41 klass_gap_offset_in_bytes() : |
43 klass_gap_offset_in_bytes() : |
42 sizeof(instanceOopDesc); |
44 sizeof(instanceOopDesc); |
43 } |
45 } |
44 |
46 |
45 static bool contains_field_offset(int offset, int nonstatic_field_size) { |
47 static bool contains_field_offset(int offset, int nonstatic_field_size) { |