< prev index next >
src/hotspot/share/utilities/constantTag.hpp
Print this page
@@ -44,15 +44,15 @@
JVM_CONSTANT_StringIndex = 102, // Temporary tag while constructing constant pool, class redefinition
JVM_CONSTANT_UnresolvedClassInError = 103, // Error tag due to resolution error
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;
public:
bool is_klass() const { return value() == JVM_CONSTANT_Class; }
@@ -76,11 +76,11 @@
bool is_unresolved_klass_in_error() const {
return value() == JVM_CONSTANT_UnresolvedClassInError;
}
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 {
return _tag == JVM_CONSTANT_MethodHandleInError;
}
@@ -119,15 +119,15 @@
constantTag() {
_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");
_tag = tag;
}
@@ -144,11 +144,11 @@
}
assert(false, "bad basic type for tag");
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;
BasicType basic_type() const; // if used with ldc, what kind of value gets pushed?
< prev index next >