mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-20 07:15:31 +00:00
8152856: Xcode 7.3 -Wshift-negative-value compile failure on Mac OS X
Implement _lh_array_tag_type_value as const, not enum. Reviewed-by: vlivanov, minqi
This commit is contained in:
parent
255569b3a9
commit
f1c490f5fa
@ -309,10 +309,11 @@ protected:
|
||||
_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;
|
||||
|
||||
@ -3740,7 +3740,7 @@ Node* LibraryCallKit::generate_array_guard_common(Node* kls, RegionNode* region,
|
||||
}
|
||||
// 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 CmpINode(layout_val, intcon(nval)));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user