8225783: Incorrect use of binary operators on booleans in type.cpp

Use logical operators instead.

Reviewed-by: roland
This commit is contained in:
Tobias Hartmann 2019-06-14 13:26:52 +02:00
parent a92f0016f3
commit 813a9cf6cb

View File

@ -2109,7 +2109,7 @@ const Type *TypeAry::xmeet( const Type *t ) const {
const TypeAry *a = t->is_ary();
return TypeAry::make(_elem->meet_speculative(a->_elem),
_size->xmeet(a->_size)->is_int(),
_stable & a->_stable);
_stable && a->_stable);
}
case Top:
break;
@ -3879,7 +3879,7 @@ const Type *TypeInstPtr::xmeet_helper(const Type *t) const {
bool subtype_exact = false;
if( tinst_klass->equals(this_klass) ) {
subtype = this_klass;
subtype_exact = below_centerline(ptr) ? (this_xk & tinst_xk) : (this_xk | tinst_xk);
subtype_exact = below_centerline(ptr) ? (this_xk && tinst_xk) : (this_xk || tinst_xk);
} else if( !tinst_xk && this_klass->is_subtype_of( tinst_klass ) ) {
subtype = this_klass; // Pick subtyping class
subtype_exact = this_xk;
@ -4361,7 +4361,7 @@ const Type *TypeAryPtr::xmeet_helper(const Type *t) const {
if (below_centerline(this->_ptr)) {
xk = this->_klass_is_exact;
} else {
xk = (tap->_klass_is_exact | this->_klass_is_exact);
xk = (tap->_klass_is_exact || this->_klass_is_exact);
}
return make(ptr, const_oop(), tary, lazy_klass, xk, off, instance_id, speculative, depth);
case Constant: {