< prev index next >

src/hotspot/share/utilities/globalDefinitions.hpp

Print this page

        

*** 469,478 **** --- 469,487 ---- #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
*** 545,560 **** 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; --- 554,570 ---- 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;
*** 568,578 **** 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 ) { --- 578,588 ---- 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 ) {
*** 585,594 **** --- 595,605 ---- 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
*** 615,625 **** 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 --- 626,637 ---- 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
*** 638,650 **** --- 650,664 ---- 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 };
*** 736,746 **** 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 }; --- 750,760 ---- 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 };
*** 753,762 **** --- 767,777 ---- 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; } }
*** 968,977 **** --- 983,1002 ---- 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); }
< prev index next >