< 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
// T_ADDRESS, T_METADATA, T_NARROWOOP, T_NARROWKLASS describe
// 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_PRIMITIVE_OBJECT = 14, // Not a true BasicType, only use in headers of flat arrays
+ T_VOID = 15,
+ 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) \
F(JVM_SIGNATURE_SHORT, T_SHORT, N) \
F(JVM_SIGNATURE_INT, T_INT, N) \
F(JVM_SIGNATURE_LONG, T_LONG, N) \
F(JVM_SIGNATURE_CLASS, T_OBJECT, N) \
F(JVM_SIGNATURE_ARRAY, T_ARRAY, N) \
+ F(JVM_SIGNATURE_PRIMITIVE_OBJECT, T_PRIMITIVE_OBJECT, N) \
F(JVM_SIGNATURE_VOID, T_VOID, N) \
/*end*/
inline bool is_java_type(BasicType t) {
return T_BOOLEAN <= t && t <= T_VOID;
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) {
- return (t == T_OBJECT || t == T_ARRAY || (include_narrow_oop && t == T_NARROWOOP));
+ return (t == T_OBJECT || t == T_ARRAY || t == T_PRIMITIVE_OBJECT || (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
+ T_VOID_size = 0,
+ T_PRIMITIVE_OBJECT_size = 1
};
// 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_INT_aelem_bytes = 4,
T_LONG_aelem_bytes = 8,
#ifdef _LP64
T_OBJECT_aelem_bytes = 8,
T_ARRAY_aelem_bytes = 8,
+ T_PRIMITIVE_OBJECT_aelem_bytes = 8,
#else
T_OBJECT_aelem_bytes = 4,
T_ARRAY_aelem_bytes = 4,
+ T_PRIMITIVE_OBJECT_aelem_bytes = 4,
#endif
T_NARROWOOP_aelem_bytes = 4,
T_NARROWKLASS_aelem_bytes = 4,
T_VOID_aelem_bytes = 0
};
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
+ 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_ARRAY : // fall through
case T_OBJECT : return atos;
default : return ilgl;
}
}
template<typename K> bool primitive_equals(const K& k0, const K& k1) {
return k0 == k1;
}
+ // TEMP!!!!
+ // This should be removed after LW2 arrays are implemented (JDK-8220790).
+ // It's an alias to (EnableValhalla && (FlatArrayElementMaxSize != 0)),
+ // which is actually not 100% correct, but works for the current set of C1/C2
+ // implementation and test cases.
+ #define UseFlatArray (EnableValhalla && (FlatArrayElementMaxSize != 0))
template<typename K> int primitive_compare(const K& k0, const K& k1) {
return ((k0 < k1) ? -1 : (k0 == k1) ? 0 : 1);
}
//----------------------------------------------------------------------------------------------------
< prev index next >