6832293: JIT compiler got wrong result in type checking with -server

Check for an object array of interface in CmpPNode::sub().

Reviewed-by: never
This commit is contained in:
Vladimir Kozlov 2009-05-11 17:59:54 -07:00
parent 09e524e11b
commit 6202395cb2
2 changed files with 140 additions and 1 deletions

View file

@ -640,7 +640,11 @@ const Type *CmpPNode::sub( const Type *t1, const Type *t2 ) const {
if (klass0 && klass1 &&
kps != 1 && // both or neither are klass pointers
klass0->is_loaded() && !klass0->is_interface() && // do not trust interfaces
klass1->is_loaded() && !klass1->is_interface()) {
klass1->is_loaded() && !klass1->is_interface() &&
(!klass0->is_obj_array_klass() ||
!klass0->as_obj_array_klass()->base_element_klass()->is_interface()) &&
(!klass1->is_obj_array_klass() ||
!klass1->as_obj_array_klass()->base_element_klass()->is_interface())) {
bool unrelated_classes = false;
// See if neither subclasses the other, or if the class on top
// is precise. In either of these cases, the compare is known