< prev index next > src/hotspot/share/utilities/globalDefinitions.hpp
Print this page
#ifndef DEFAULT_PADDING_SIZE
#error "Platform should define DEFAULT_PADDING_SIZE"
#endif
+ //----------------------------------------------------------------------------------------------------
+ // Prototyping
+ // "Code Missing Here" macro, un-define when integrating back from prototyping stage and break
+ // compilation on purpose (i.e. "forget me not")
+ #define PROTOTYPE
+ #ifdef PROTOTYPE
+ #define CMH(m)
+ #endif
+
//----------------------------------------------------------------------------------------------------
// Miscellaneous
// 6302670 Eliminate Hotspot __fabsf dependency
// All fabs() callers should call this function instead, which will implicitly
// internal references within the JVM as if they were Java
// types in their own right.
T_OBJECT = 12,
T_ARRAY = 13,
T_VOID = 14,
! T_ADDRESS = 15,
! T_NARROWOOP = 16,
! T_METADATA = 17,
! T_NARROWKLASS = 18,
! T_CONFLICT = 19, // for stack value type with conflicting contents
T_ILLEGAL = 99
};
#define SIGNATURE_TYPES_DO(F, N) \
F(JVM_SIGNATURE_BOOLEAN, T_BOOLEAN, N) \
// internal references within the JVM as if they were Java
// types in their own right.
T_OBJECT = 12,
T_ARRAY = 13,
T_VOID = 14,
! T_FLAT_ELEMENT = 15, // Not a true BasicType, only used in layout helpers of flat arrays
! T_ADDRESS = 16,
! T_NARROWOOP = 17,
! T_METADATA = 18,
! T_NARROWKLASS = 19,
+ T_CONFLICT = 20, // for stack value type with conflicting contents
T_ILLEGAL = 99
};
#define SIGNATURE_TYPES_DO(F, N) \
F(JVM_SIGNATURE_BOOLEAN, T_BOOLEAN, N) \
inline bool is_double_word_type(BasicType t) {
return (t == T_DOUBLE || t == T_LONG);
}
inline bool is_reference_type(BasicType t, bool include_narrow_oop = false) {
+ assert(t != T_FLAT_ELEMENT, ""); // Strong assert to detect misuses of T_FLAT_ELEMENT
return (t == T_OBJECT || t == T_ARRAY || (include_narrow_oop && t == T_NARROWOOP));
}
inline bool is_integral_type(BasicType t) {
return is_subword_type(t) || t == T_INT || t == T_LONG;
T_LONG_size = 2,
T_OBJECT_size = 1,
T_ARRAY_size = 1,
T_NARROWOOP_size = 1,
T_NARROWKLASS_size = 1,
! T_VOID_size = 0
};
// this works on valid parameter types but not T_VOID, T_CONFLICT, etc.
inline int parameter_type_word_count(BasicType t) {
if (is_double_word_type(t)) return 2;
T_LONG_size = 2,
T_OBJECT_size = 1,
T_ARRAY_size = 1,
T_NARROWOOP_size = 1,
T_NARROWKLASS_size = 1,
! T_VOID_size = 0,
+ T_FLAT_ELEMENT_size = 0
};
// this works on valid parameter types but not T_VOID, T_CONFLICT, etc.
inline int parameter_type_word_count(BasicType t) {
if (is_double_word_type(t)) return 2;
T_OBJECT_aelem_bytes = 4,
T_ARRAY_aelem_bytes = 4,
#endif
T_NARROWOOP_aelem_bytes = 4,
T_NARROWKLASS_aelem_bytes = 4,
! T_VOID_aelem_bytes = 0
};
extern int _type2aelembytes[T_CONFLICT+1]; // maps a BasicType to nof bytes used by its array element
#ifdef ASSERT
extern int type2aelembytes(BasicType t, bool allow_address = false); // asserts
T_OBJECT_aelem_bytes = 4,
T_ARRAY_aelem_bytes = 4,
#endif
T_NARROWOOP_aelem_bytes = 4,
T_NARROWKLASS_aelem_bytes = 4,
! T_VOID_aelem_bytes = 0,
+ T_FLAT_ELEMENT_aelem_bytes = 0
};
extern int _type2aelembytes[T_CONFLICT+1]; // maps a BasicType to nof bytes used by its array element
#ifdef ASSERT
extern int type2aelembytes(BasicType t, bool allow_address = false); // asserts
itos = 4, // int tos cached
ltos = 5, // long tos cached
ftos = 6, // float tos cached
dtos = 7, // double tos cached
atos = 8, // object cached
! vtos = 9, // tos not cached
number_of_states,
ilgl // illegal state: should not occur
};
itos = 4, // int tos cached
ltos = 5, // long tos cached
ftos = 6, // float tos cached
dtos = 7, // double tos cached
atos = 8, // object cached
! vtos = 9, // tos not cached,
number_of_states,
ilgl // illegal state: should not occur
};
case T_INT : return itos;
case T_LONG : return ltos;
case T_FLOAT : return ftos;
case T_DOUBLE : return dtos;
case T_VOID : return vtos;
! case T_ARRAY : // fall through
case T_OBJECT : return atos;
default : return ilgl;
}
}
case T_INT : return itos;
case T_LONG : return ltos;
case T_FLOAT : return ftos;
case T_DOUBLE : return dtos;
case T_VOID : return vtos;
! case T_ARRAY : // fall through
case T_OBJECT : return atos;
default : return ilgl;
}
}
< prev index next >