338 static ByteSize modifier_flags_offset() { return in_ByteSize(offset_of(Klass, _modifier_flags)); } |
338 static ByteSize modifier_flags_offset() { return in_ByteSize(offset_of(Klass, _modifier_flags)); } |
339 static ByteSize layout_helper_offset() { return in_ByteSize(offset_of(Klass, _layout_helper)); } |
339 static ByteSize layout_helper_offset() { return in_ByteSize(offset_of(Klass, _layout_helper)); } |
340 static ByteSize access_flags_offset() { return in_ByteSize(offset_of(Klass, _access_flags)); } |
340 static ByteSize access_flags_offset() { return in_ByteSize(offset_of(Klass, _access_flags)); } |
341 |
341 |
342 // Unpacking layout_helper: |
342 // Unpacking layout_helper: |
343 enum { |
343 static const int _lh_neutral_value = 0; // neutral non-array non-instance value |
344 _lh_neutral_value = 0, // neutral non-array non-instance value |
344 static const int _lh_instance_slow_path_bit = 0x01; |
345 _lh_instance_slow_path_bit = 0x01, |
345 static const int _lh_log2_element_size_shift = BitsPerByte*0; |
346 _lh_log2_element_size_shift = BitsPerByte*0, |
346 static const int _lh_log2_element_size_mask = BitsPerLong-1; |
347 _lh_log2_element_size_mask = BitsPerLong-1, |
347 static const int _lh_element_type_shift = BitsPerByte*1; |
348 _lh_element_type_shift = BitsPerByte*1, |
348 static const int _lh_element_type_mask = right_n_bits(BitsPerByte); // shifted mask |
349 _lh_element_type_mask = right_n_bits(BitsPerByte), // shifted mask |
349 static const int _lh_header_size_shift = BitsPerByte*2; |
350 _lh_header_size_shift = BitsPerByte*2, |
350 static const int _lh_header_size_mask = right_n_bits(BitsPerByte); // shifted mask |
351 _lh_header_size_mask = right_n_bits(BitsPerByte), // shifted mask |
351 static const int _lh_array_tag_bits = 2; |
352 _lh_array_tag_bits = 2, |
352 static const int _lh_array_tag_shift = BitsPerInt - _lh_array_tag_bits; |
353 _lh_array_tag_shift = BitsPerInt - _lh_array_tag_bits, |
353 static const int _lh_array_tag_obj_value = ~0x01; // 0x80000000 >> 30 |
354 _lh_array_tag_obj_value = ~0x01 // 0x80000000 >> 30 |
|
355 }; |
|
356 |
354 |
357 static const unsigned int _lh_array_tag_type_value = 0Xffffffff; // ~0x00, // 0xC0000000 >> 30 |
355 static const unsigned int _lh_array_tag_type_value = 0Xffffffff; // ~0x00, // 0xC0000000 >> 30 |
358 |
356 |
359 static int layout_helper_size_in_bytes(jint lh) { |
357 static int layout_helper_size_in_bytes(jint lh) { |
360 assert(lh > (jint)_lh_neutral_value, "must be instance"); |
358 assert(lh > (jint)_lh_neutral_value, "must be instance"); |