8223400: Replace some enums with static const members in hotspot/runtime
Reviewed-by: iklam, coleenp
This commit is contained in:
parent
8bdffc5f7e
commit
41bd7c5e76
@ -340,19 +340,17 @@ protected:
|
||||
static ByteSize access_flags_offset() { return in_ByteSize(offset_of(Klass, _access_flags)); }
|
||||
|
||||
// Unpacking layout_helper:
|
||||
enum {
|
||||
_lh_neutral_value = 0, // neutral non-array non-instance value
|
||||
_lh_instance_slow_path_bit = 0x01,
|
||||
_lh_log2_element_size_shift = BitsPerByte*0,
|
||||
_lh_log2_element_size_mask = BitsPerLong-1,
|
||||
_lh_element_type_shift = BitsPerByte*1,
|
||||
_lh_element_type_mask = right_n_bits(BitsPerByte), // shifted mask
|
||||
_lh_header_size_shift = BitsPerByte*2,
|
||||
_lh_header_size_mask = right_n_bits(BitsPerByte), // shifted mask
|
||||
_lh_array_tag_bits = 2,
|
||||
_lh_array_tag_shift = BitsPerInt - _lh_array_tag_bits,
|
||||
_lh_array_tag_obj_value = ~0x01 // 0x80000000 >> 30
|
||||
};
|
||||
static const int _lh_neutral_value = 0; // neutral non-array non-instance value
|
||||
static const int _lh_instance_slow_path_bit = 0x01;
|
||||
static const int _lh_log2_element_size_shift = BitsPerByte*0;
|
||||
static const int _lh_log2_element_size_mask = BitsPerLong-1;
|
||||
static const int _lh_element_type_shift = BitsPerByte*1;
|
||||
static const int _lh_element_type_mask = right_n_bits(BitsPerByte); // shifted mask
|
||||
static const int _lh_header_size_shift = BitsPerByte*2;
|
||||
static const int _lh_header_size_mask = right_n_bits(BitsPerByte); // shifted mask
|
||||
static const int _lh_array_tag_bits = 2;
|
||||
static const int _lh_array_tag_shift = BitsPerInt - _lh_array_tag_bits;
|
||||
static const int _lh_array_tag_obj_value = ~0x01; // 0x80000000 >> 30
|
||||
|
||||
static const unsigned int _lh_array_tag_type_value = 0Xffffffff; // ~0x00, // 0xC0000000 >> 30
|
||||
|
||||
|
@ -2308,7 +2308,7 @@ JVM_ENTRY(void, JVM_GetClassCPTypes(JNIEnv *env, jclass cls, unsigned char *type
|
||||
ConstantPool* cp = InstanceKlass::cast(k)->constants();
|
||||
for (int index = cp->length() - 1; index >= 0; index--) {
|
||||
constantTag tag = cp->tag_at(index);
|
||||
types[index] = (tag.is_unresolved_klass()) ? JVM_CONSTANT_Class : tag.value();
|
||||
types[index] = (tag.is_unresolved_klass()) ? (unsigned char) JVM_CONSTANT_Class : tag.value();
|
||||
}
|
||||
}
|
||||
JVM_END
|
||||
|
Loading…
x
Reference in New Issue
Block a user