changeset 56813:5dcab10ebfbe

8225783: Incorrect use of binary operators on booleans in type.cpp Summary: Use logical operators instead. Reviewed-by: roland
author thartmann
date Fri, 14 Jun 2019 13:26:52 +0200
parents 444b2d3471e9
children b444bbe5c45c
files src/hotspot/share/opto/type.cpp
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/opto/type.cpp	Fri Jun 14 10:19:04 2019 +0530
+++ b/src/hotspot/share/opto/type.cpp	Fri Jun 14 13:26:52 2019 +0200
@@ -2109,7 +2109,7 @@
     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 @@
     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 @@
       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: {