changeset 9020:67dddb025b7b

8152856: Xcode 7.3 -Wshift-negative-value compile failure on Mac OS X Summary: Implement _lh_array_tag_type_value as const, not enum. Reviewed-by: vlivanov, minqi
author gziemski
date Tue, 24 May 2016 12:42:43 -0500
parents 4fcf5ea9b9de
children 78c11f573795
files src/share/vm/oops/klass.hpp src/share/vm/opto/library_call.cpp
diffstat 2 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/oops/klass.hpp	Wed Jul 17 21:18:57 2019 +0100
+++ b/src/share/vm/oops/klass.hpp	Tue May 24 12:42:43 2016 -0500
@@ -335,10 +335,11 @@
     _lh_header_size_mask        = right_n_bits(BitsPerByte),  // shifted mask
     _lh_array_tag_bits          = 2,
     _lh_array_tag_shift         = BitsPerInt - _lh_array_tag_bits,
-    _lh_array_tag_type_value    = ~0x00,  // 0xC0000000 >> 30
     _lh_array_tag_obj_value     = ~0x01   // 0x80000000 >> 30
   };
 
+  static const unsigned int _lh_array_tag_type_value = 0Xffffffff; // ~0x00,  // 0xC0000000 >> 30
+
   static int layout_helper_size_in_bytes(jint lh) {
     assert(lh > (jint)_lh_neutral_value, "must be instance");
     return (int) lh & ~_lh_instance_slow_path_bit;
--- a/src/share/vm/opto/library_call.cpp	Wed Jul 17 21:18:57 2019 +0100
+++ b/src/share/vm/opto/library_call.cpp	Tue May 24 12:42:43 2016 -0500
@@ -3803,7 +3803,7 @@
   }
   // Now test the correct condition.
   jint  nval = (obj_array
-                ? ((jint)Klass::_lh_array_tag_type_value
+                ? (jint)(Klass::_lh_array_tag_type_value
                    <<    Klass::_lh_array_tag_shift)
                 : Klass::_lh_neutral_value);
   Node* cmp = _gvn.transform(new(C) CmpINode(layout_val, intcon(nval)));