--- old/src/hotspot/share/utilities/globalDefinitions.hpp 2020-04-02 14:12:00.000000000 +0300 +++ new/src/hotspot/share/utilities/globalDefinitions.hpp 2020-04-02 14:12:00.000000000 +0300 @@ -233,6 +233,9 @@ return (byte_size + (HeapWordSize-1)) >> LogHeapWordSize; } +inline jfloat jfloat_cast(jint x); +inline jdouble jdouble_cast(jlong x); + //------------------------------------------- // Constant for jlong (standardized by C++11) @@ -243,6 +246,13 @@ const jlong min_jlong = CONST64(0x8000000000000000); const jlong max_jlong = CONST64(0x7fffffffffffffff); +//------------------------------------------- +// Constant for jdouble +const jlong min_jlongDouble = CONST64(0x0000000000000001); +const jdouble min_jdouble = jdouble_cast(min_jlongDouble); +const jlong max_jlongDouble = CONST64(0x7fefffffffffffff); +const jdouble max_jdouble = jdouble_cast(max_jlongDouble); + const size_t K = 1024; const size_t M = K*K; const size_t G = M*K; @@ -460,6 +470,11 @@ const jint min_jint = (jint)1 << (sizeof(jint)*BitsPerByte-1); // 0x80000000 == smallest jint const jint max_jint = (juint)min_jint - 1; // 0x7FFFFFFF == largest jint +const jint min_jintFloat = (jint)(0x00000001); +const jfloat min_jfloat = jfloat_cast(min_jintFloat); +const jint max_jintFloat = (jint)(0x7f7fffff); +const jfloat max_jfloat = jfloat_cast(max_jintFloat); + //---------------------------------------------------------------------------------------------------- // JVM spec restrictions @@ -664,6 +679,10 @@ return (t == T_OBJECT || t == T_ARRAY); } +inline bool is_integral_type(BasicType t) { + return is_subword_type(t) || t == T_INT || t == T_LONG; +} + extern char type2char_tab[T_CONFLICT+1]; // Map a BasicType to a jchar inline char type2char(BasicType t) { return (uint)t < T_CONFLICT+1 ? type2char_tab[t] : 0; } extern int type2size[T_CONFLICT+1]; // Map BasicType to result stack elements