< prev index next > src/hotspot/share/utilities/globalDefinitions.cpp
Print this page
assert(char2type(type2char((BasicType)i)) == i, "proper inverses");
assert(Signature::basic_type(type2char((BasicType)i)) == i, "proper inverses");
num_type_chars++;
}
}
! assert(num_type_chars == 11, "must have tested the right number of mappings");
assert(char2type(0) == T_ILLEGAL, "correct illegality");
{
for (int i = T_BOOLEAN; i <= T_CONFLICT; i++) {
BasicType vt = (BasicType)i;
assert(char2type(type2char((BasicType)i)) == i, "proper inverses");
assert(Signature::basic_type(type2char((BasicType)i)) == i, "proper inverses");
num_type_chars++;
}
}
! assert(num_type_chars == 12, "must have tested the right number of mappings");
assert(char2type(0) == T_ILLEGAL, "correct illegality");
{
for (int i = T_BOOLEAN; i <= T_CONFLICT; i++) {
BasicType vt = (BasicType)i;
BytesPerHeapOop = BytesPerWord;
BitsPerHeapOop = BitsPerWord;
}
_type2aelembytes[T_OBJECT] = heapOopSize;
_type2aelembytes[T_ARRAY] = heapOopSize;
+ _type2aelembytes[T_PRIMITIVE_OBJECT] = heapOopSize;
}
// Map BasicType to signature character
char type2char_tab[T_CONFLICT+1] = {
JVM_SIGNATURE_BOOLEAN, JVM_SIGNATURE_CHAR,
JVM_SIGNATURE_FLOAT, JVM_SIGNATURE_DOUBLE,
JVM_SIGNATURE_BYTE, JVM_SIGNATURE_SHORT,
JVM_SIGNATURE_INT, JVM_SIGNATURE_LONG,
JVM_SIGNATURE_CLASS, JVM_SIGNATURE_ARRAY,
! JVM_SIGNATURE_VOID, 0,
! 0, 0, 0, 0
};
// Map BasicType to Java type name
const char* type2name_tab[T_CONFLICT+1] = {
nullptr, nullptr, nullptr, nullptr,
JVM_SIGNATURE_BOOLEAN, JVM_SIGNATURE_CHAR,
JVM_SIGNATURE_FLOAT, JVM_SIGNATURE_DOUBLE,
JVM_SIGNATURE_BYTE, JVM_SIGNATURE_SHORT,
JVM_SIGNATURE_INT, JVM_SIGNATURE_LONG,
JVM_SIGNATURE_CLASS, JVM_SIGNATURE_ARRAY,
! JVM_SIGNATURE_PRIMITIVE_OBJECT, JVM_SIGNATURE_VOID,
! 0, 0, 0, 0, 0
};
// Map BasicType to Java type name
const char* type2name_tab[T_CONFLICT+1] = {
nullptr, nullptr, nullptr, nullptr,
"short",
"int",
"long",
"object",
"array",
+ "inline_type",
"void",
"*address*",
"*narrowoop*",
"*metadata*",
"*narrowklass*",
}
return T_ILLEGAL;
}
// Map BasicType to size in words
! int type2size[T_CONFLICT+1]={ -1, 0, 0, 0, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 0, 1, 1, 1, 1, -1};
BasicType type2field[T_CONFLICT+1] = {
(BasicType)0, // 0,
(BasicType)0, // 1,
(BasicType)0, // 2,
}
return T_ILLEGAL;
}
// Map BasicType to size in words
! int type2size[T_CONFLICT+1]={ -1, 0, 0, 0, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 0, 1, 1, 1, 1, -1};
BasicType type2field[T_CONFLICT+1] = {
(BasicType)0, // 0,
(BasicType)0, // 1,
(BasicType)0, // 2,
T_SHORT, // T_SHORT = 9,
T_INT, // T_INT = 10,
T_LONG, // T_LONG = 11,
T_OBJECT, // T_OBJECT = 12,
T_OBJECT, // T_ARRAY = 13,
! T_VOID, // T_VOID = 14,
! T_ADDRESS, // T_ADDRESS = 15,
! T_NARROWOOP, // T_NARROWOOP= 16,
! T_METADATA, // T_METADATA = 17,
! T_NARROWKLASS, // T_NARROWKLASS = 18,
! T_CONFLICT // T_CONFLICT = 19,
};
BasicType type2wfield[T_CONFLICT+1] = {
(BasicType)0, // 0,
T_SHORT, // T_SHORT = 9,
T_INT, // T_INT = 10,
T_LONG, // T_LONG = 11,
T_OBJECT, // T_OBJECT = 12,
T_OBJECT, // T_ARRAY = 13,
! T_OBJECT, // T_PRIMITIVE_OBJECT = 14,
! T_VOID, // T_VOID = 15,
! T_ADDRESS, // T_ADDRESS = 16,
! T_NARROWOOP, // T_NARROWOOP= 17,
! T_METADATA, // T_METADATA = 18,
! T_NARROWKLASS, // T_NARROWKLASS = 19,
+ T_CONFLICT // T_CONFLICT = 20
};
BasicType type2wfield[T_CONFLICT+1] = {
(BasicType)0, // 0,
T_INT, // T_SHORT = 9,
T_INT, // T_INT = 10,
T_LONG, // T_LONG = 11,
T_OBJECT, // T_OBJECT = 12,
T_OBJECT, // T_ARRAY = 13,
! T_VOID, // T_VOID = 14,
! T_ADDRESS, // T_ADDRESS = 15,
! T_NARROWOOP, // T_NARROWOOP = 16,
! T_METADATA, // T_METADATA = 17,
! T_NARROWKLASS, // T_NARROWKLASS = 18,
! T_CONFLICT // T_CONFLICT = 19,
};
int _type2aelembytes[T_CONFLICT+1] = {
0, // 0
T_INT, // T_SHORT = 9,
T_INT, // T_INT = 10,
T_LONG, // T_LONG = 11,
T_OBJECT, // T_OBJECT = 12,
T_OBJECT, // T_ARRAY = 13,
! T_OBJECT, // T_PRIMITIVE_OBJECT = 14,
! T_VOID, // T_VOID = 15,
! T_ADDRESS, // T_ADDRESS = 16,
! T_NARROWOOP, // T_NARROWOOP = 17,
! T_METADATA, // T_METADATA = 18,
! T_NARROWKLASS, // T_NARROWKLASS = 19,
+ T_CONFLICT // T_CONFLICT = 20
};
int _type2aelembytes[T_CONFLICT+1] = {
0, // 0
T_SHORT_aelem_bytes, // T_SHORT = 9,
T_INT_aelem_bytes, // T_INT = 10,
T_LONG_aelem_bytes, // T_LONG = 11,
T_OBJECT_aelem_bytes, // T_OBJECT = 12,
T_ARRAY_aelem_bytes, // T_ARRAY = 13,
! 0, // T_VOID = 14,
! T_OBJECT_aelem_bytes, // T_ADDRESS = 15,
! T_NARROWOOP_aelem_bytes, // T_NARROWOOP= 16,
! T_OBJECT_aelem_bytes, // T_METADATA = 17,
! T_NARROWKLASS_aelem_bytes, // T_NARROWKLASS= 18,
! 0 // T_CONFLICT = 19,
};
#ifdef ASSERT
int type2aelembytes(BasicType t, bool allow_address) {
assert((allow_address || t != T_ADDRESS) && t <= T_CONFLICT, "unexpected basic type");
T_SHORT_aelem_bytes, // T_SHORT = 9,
T_INT_aelem_bytes, // T_INT = 10,
T_LONG_aelem_bytes, // T_LONG = 11,
T_OBJECT_aelem_bytes, // T_OBJECT = 12,
T_ARRAY_aelem_bytes, // T_ARRAY = 13,
! T_PRIMITIVE_OBJECT_aelem_bytes, // T_PRIMITIVE_OBJECT = 14,
! 0, // T_VOID = 15,
! T_OBJECT_aelem_bytes, // T_ADDRESS = 16,
! T_NARROWOOP_aelem_bytes, // T_NARROWOOP= 17,
! T_OBJECT_aelem_bytes, // T_METADATA = 18,
! T_NARROWKLASS_aelem_bytes, // T_NARROWKLASS= 19,
+ 0 // T_CONFLICT = 20
};
#ifdef ASSERT
int type2aelembytes(BasicType t, bool allow_address) {
assert((allow_address || t != T_ADDRESS) && t <= T_CONFLICT, "unexpected basic type");
< prev index next >