< prev index next >

src/hotspot/share/utilities/globalDefinitions.hpp

Print this page

        

*** 492,501 **** --- 492,510 ---- #define Unused_Variable(var) var //---------------------------------------------------------------------------------------------------- + // 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 // convert the operand to double, avoiding a dependency on __fabsf which
*** 568,583 **** T_SHORT = 9, T_INT = 10, T_LONG = 11, 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 }; inline bool is_java_primitive(BasicType t) { return T_BOOLEAN <= t && t <= T_LONG; --- 577,593 ---- T_SHORT = 9, T_INT = 10, T_LONG = 11, T_OBJECT = 12, T_ARRAY = 13, ! T_VALUETYPE = 14, ! 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 }; inline bool is_java_primitive(BasicType t) { return T_BOOLEAN <= t && t <= T_LONG;
*** 591,601 **** inline bool is_signed_subword_type(BasicType t) { return (t == T_BYTE || t == T_SHORT); } inline bool is_reference_type(BasicType t) { ! return (t == T_OBJECT || t == T_ARRAY); } // Convert a char from a classfile signature to a BasicType inline BasicType char2type(char c) { switch( c ) { --- 601,611 ---- inline bool is_signed_subword_type(BasicType t) { return (t == T_BYTE || t == T_SHORT); } inline bool is_reference_type(BasicType t) { ! return (t == T_OBJECT || t == T_ARRAY || t == T_VALUETYPE); } // Convert a char from a classfile signature to a BasicType inline BasicType char2type(char c) { switch( c ) {
*** 608,617 **** --- 618,628 ---- case 'S': return T_SHORT; case 'Z': return T_BOOLEAN; case 'V': return T_VOID; case 'L': return T_OBJECT; case '[': return T_ARRAY; + case 'Q': return T_VALUETYPE; } return T_ILLEGAL; } extern char type2char_tab[T_CONFLICT+1]; // Map a BasicType to a jchar
*** 638,648 **** T_LONG_size = 2, T_OBJECT_size = 1, T_ARRAY_size = 1, T_NARROWOOP_size = 1, T_NARROWKLASS_size = 1, ! T_VOID_size = 0 }; // maps a BasicType to its instance field storage type: // all sub-word integral types are widened to T_INT --- 649,660 ---- 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_VALUETYPE_size = 1 }; // maps a BasicType to its instance field storage type: // all sub-word integral types are widened to T_INT
*** 661,673 **** --- 673,687 ---- T_INT_aelem_bytes = 4, T_LONG_aelem_bytes = 8, #ifdef _LP64 T_OBJECT_aelem_bytes = 8, T_ARRAY_aelem_bytes = 8, + T_VALUETYPE_aelem_bytes = 8, #else T_OBJECT_aelem_bytes = 4, T_ARRAY_aelem_bytes = 4, + T_VALUETYPE_aelem_bytes = 4, #endif T_NARROWOOP_aelem_bytes = 4, T_NARROWKLASS_aelem_bytes = 4, T_VOID_aelem_bytes = 0 };
*** 759,769 **** 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 }; --- 773,783 ---- 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 };
*** 776,786 **** 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; } } --- 790,801 ---- 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_VALUETYPE: // fall through ! case T_ARRAY : // fall through case T_OBJECT : return atos; default : return ilgl; } }
*** 991,1000 **** --- 1006,1025 ---- inline int exact_log2(intptr_t x) { assert(is_power_of_2(x), "x must be a power of 2: " INTPTR_FORMAT, x); return log2_intptr(x); } + // the argument doesn't need to be a power of two + inline int upper_log2(intptr_t x) { + int shift = log2_intptr(x); + intptr_t y = 1ULL << shift; + if (y < x) { + shift++; + } + return shift; + } + //* the argument must be exactly a power of 2 inline int exact_log2_long(jlong x) { assert(is_power_of_2_long(x), "x must be a power of 2: " JLONG_FORMAT, x); return log2_long(x); }
*** 1132,1138 **** --- 1157,1169 ---- 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 && (ValueArrayElemMaxFlatSize != 0)), + // which is actually not 100% correct, but works for the current set of C1/C2 + // implementation and test cases. + #define ValueArrayFlatten (EnableValhalla && (ValueArrayElemMaxFlatSize != 0)) #endif // SHARE_UTILITIES_GLOBALDEFINITIONS_HPP
< prev index next >