1.1 --- a/src/share/vm/opto/type.cpp Wed Jul 03 20:04:13 2019 +0800 1.2 +++ b/src/share/vm/opto/type.cpp Wed Jul 03 20:42:37 2019 +0800 1.3 @@ -1334,8 +1334,8 @@ 1.4 1.5 // The new type narrows the old type, so look for a "death march". 1.6 // See comments on PhaseTransform::saturate. 1.7 - juint nrange = _hi - _lo; 1.8 - juint orange = ohi - olo; 1.9 + juint nrange = (juint)_hi - _lo; 1.10 + juint orange = (juint)ohi - olo; 1.11 if (nrange < max_juint - 1 && nrange > (orange >> 1) + (SMALLINT*2)) { 1.12 // Use the new type only if the range shrinks a lot. 1.13 // We do not want the optimizer computing 2^31 point by point. 1.14 @@ -1368,7 +1368,7 @@ 1.15 //------------------------------hash------------------------------------------- 1.16 // Type-specific hashing function. 1.17 int TypeInt::hash(void) const { 1.18 - return _lo+_hi+_widen+(int)Type::Int; 1.19 + return java_add(java_add(_lo, _hi), java_add(_widen, (int)Type::Int)); 1.20 } 1.21 1.22 //------------------------------is_finite-------------------------------------- 1.23 @@ -1549,7 +1549,7 @@ 1.24 // If neither endpoint is extremal yet, push out the endpoint 1.25 // which is closer to its respective limit. 1.26 if (_lo >= 0 || // easy common case 1.27 - (julong)(_lo - min) >= (julong)(max - _hi)) { 1.28 + ((julong)_lo - min) >= ((julong)max - _hi)) { 1.29 // Try to widen to an unsigned range type of 32/63 bits: 1.30 if (max >= max_juint && _hi < max_juint) 1.31 return make(_lo, max_juint, WidenMax); 1.32 @@ -2319,7 +2319,7 @@ 1.33 //------------------------------hash------------------------------------------- 1.34 // Type-specific hashing function. 1.35 int TypePtr::hash(void) const { 1.36 - return _ptr + _offset; 1.37 + return java_add(_ptr, _offset); 1.38 } 1.39 1.40 //------------------------------dump2------------------------------------------ 1.41 @@ -2909,12 +2909,8 @@ 1.42 // Type-specific hashing function. 1.43 int TypeOopPtr::hash(void) const { 1.44 return 1.45 - (const_oop() ? const_oop()->hash() : 0) + 1.46 - _klass_is_exact + 1.47 - _instance_id + 1.48 - hash_speculative() + 1.49 - _inline_depth + 1.50 - TypePtr::hash(); 1.51 + java_add(java_add(java_add(const_oop() ? const_oop()->hash() : 0, _klass_is_exact), 1.52 + java_add(_instance_id , hash_speculative())), java_add(_inline_depth , TypePtr::hash())); 1.53 } 1.54 1.55 //------------------------------dump2------------------------------------------ 1.56 @@ -3640,7 +3636,7 @@ 1.57 //------------------------------hash------------------------------------------- 1.58 // Type-specific hashing function. 1.59 int TypeInstPtr::hash(void) const { 1.60 - int hash = klass()->hash() + TypeOopPtr::hash(); 1.61 + int hash = java_add(klass()->hash(), TypeOopPtr::hash()); 1.62 return hash; 1.63 } 1.64 1.65 @@ -4535,7 +4531,7 @@ 1.66 //------------------------------hash------------------------------------------- 1.67 // Type-specific hashing function. 1.68 int TypeKlassPtr::hash(void) const { 1.69 - return klass()->hash() + TypePtr::hash(); 1.70 + return java_add(klass()->hash(), TypePtr::hash()); 1.71 } 1.72 1.73 //------------------------------singleton--------------------------------------