--- old/src/hotspot/share/utilities/constantTag.hpp 2019-05-03 16:29:10.247152887 +0200 +++ new/src/hotspot/share/utilities/constantTag.hpp 2019-05-03 16:29:09.615141912 +0200 @@ -46,11 +46,11 @@ JVM_CONSTANT_MethodHandleInError = 104, // Error tag due to resolution error JVM_CONSTANT_MethodTypeInError = 105, // Error tag due to resolution error JVM_CONSTANT_DynamicInError = 106, // Error tag due to resolution error - JVM_CONSTANT_InternalMax = 106 // Last implementation tag + JVM_CONSTANT_InternalMax = 106, // Last implementation tag + // internal constant tag flags + JVM_CONSTANT_QDescBit = (1 << 7) // Separate bit, encode Q type descriptors }; -#define JVM_CONSTANT_QDESC_BIT (1 << 7) - class constantTag { private: jbyte _tag; @@ -78,7 +78,7 @@ } bool is_Qdescriptor_klass() const { - return (_tag & JVM_CONSTANT_QDESC_BIT) != 0; + return (_tag & JVM_CONSTANT_QDescBit) != 0; } bool is_method_handle_in_error() const { @@ -121,11 +121,11 @@ _tag = JVM_CONSTANT_Invalid; } constantTag(jbyte tag) { - jbyte entry_tag = tag & ~JVM_CONSTANT_QDESC_BIT; - assert((((tag & JVM_CONSTANT_QDESC_BIT) == 0) && (entry_tag >= 0 && entry_tag <= JVM_CONSTANT_NameAndType) || + jbyte entry_tag = tag & ~JVM_CONSTANT_QDescBit; + assert((((tag & JVM_CONSTANT_QDescBit) == 0) && (entry_tag >= 0 && entry_tag <= JVM_CONSTANT_NameAndType) || (entry_tag >= JVM_CONSTANT_MethodHandle && entry_tag <= JVM_CONSTANT_InvokeDynamic) || (entry_tag >= JVM_CONSTANT_InternalMin && entry_tag <= JVM_CONSTANT_InternalMax)) - || (((tag & JVM_CONSTANT_QDESC_BIT) != 0) && (entry_tag == JVM_CONSTANT_Class || + || (((tag & JVM_CONSTANT_QDescBit) != 0) && (entry_tag == JVM_CONSTANT_Class || entry_tag == JVM_CONSTANT_UnresolvedClass || entry_tag == JVM_CONSTANT_UnresolvedClassInError || entry_tag == JVM_CONSTANT_ClassIndex)) , "Invalid constant tag"); @@ -146,7 +146,7 @@ return constantTag(); } - jbyte value() const { return _tag & ~JVM_CONSTANT_QDESC_BIT; } + jbyte value() const { return _tag & ~JVM_CONSTANT_QDescBit; } jbyte tag() const { return _tag; } jbyte error_value() const; jbyte non_error_value() const;