1.1 --- a/src/share/vm/opto/cfgnode.cpp Fri Apr 15 12:02:37 2016 +0530 1.2 +++ b/src/share/vm/opto/cfgnode.cpp Thu Apr 21 21:53:15 2016 +0530 1.3 @@ -973,7 +973,7 @@ 1.4 #ifdef ASSERT 1.5 // The following logic has been moved into TypeOopPtr::filter. 1.6 const Type* jt = t->join_speculative(_type); 1.7 - if( jt->empty() ) { // Emptied out??? 1.8 + if (jt->empty()) { // Emptied out??? 1.9 1.10 // Check for evil case of 't' being a class and '_type' expecting an 1.11 // interface. This can happen because the bytecodes do not contain 1.12 @@ -984,14 +984,21 @@ 1.13 // be 'I' or 'j/l/O'. Thus we'll pick 'j/l/O'. If this then flows 1.14 // into a Phi which "knows" it's an Interface type we'll have to 1.15 // uplift the type. 1.16 - if( !t->empty() && ttip && ttip->is_loaded() && ttip->klass()->is_interface() ) 1.17 - { assert(ft == _type, ""); } // Uplift to interface 1.18 - else if( !t->empty() && ttkp && ttkp->is_loaded() && ttkp->klass()->is_interface() ) 1.19 - { assert(ft == _type, ""); } // Uplift to interface 1.20 - // Otherwise it's something stupid like non-overlapping int ranges 1.21 - // found on dying counted loops. 1.22 - else 1.23 - { assert(ft == Type::TOP, ""); } // Canonical empty value 1.24 + if (!t->empty() && ttip && ttip->is_loaded() && ttip->klass()->is_interface()) { 1.25 + assert(ft == _type, ""); // Uplift to interface 1.26 + } else if (!t->empty() && ttkp && ttkp->is_loaded() && ttkp->klass()->is_interface()) { 1.27 + assert(ft == _type, ""); // Uplift to interface 1.28 + } else { 1.29 + // We also have to handle 'evil cases' of interface- vs. class-arrays 1.30 + Type::get_arrays_base_elements(jt, _type, NULL, &ttip); 1.31 + if (!t->empty() && ttip != NULL && ttip->is_loaded() && ttip->klass()->is_interface()) { 1.32 + assert(ft == _type, ""); // Uplift to array of interface 1.33 + } else { 1.34 + // Otherwise it's something stupid like non-overlapping int ranges 1.35 + // found on dying counted loops. 1.36 + assert(ft == Type::TOP, ""); // Canonical empty value 1.37 + } 1.38 + } 1.39 } 1.40 1.41 else {