提交 9a9900af 编写于 作者: T thartmann

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

Summary: Use logical operators instead.
Reviewed-by: roland
上级 a69cdcd3
......@@ -2093,7 +2093,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;
......@@ -3850,7 +3850,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;
......@@ -4311,7 +4311,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: {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册