comparison src/share/vm/opto/escape.cpp @ 988:7e309ecb83ce

6879362: assert(!klass_is_exact(),"only non-exact klass") Summary: Do nothing for AddP node which has type not related to the type of allocated object. Reviewed-by: never
author kvn
date Tue, 15 Sep 2009 19:03:39 -0700
parents 159d56b94894
children dcdcc8c16e20
comparison
equal deleted inserted replaced
987:00977607da34 988:7e309ecb83ce
522 // 522 //
523 // It could happened on subclass's branch (from the type profiling 523 // It could happened on subclass's branch (from the type profiling
524 // inlining) which was not eliminated during parsing since the exactness 524 // inlining) which was not eliminated during parsing since the exactness
525 // of the allocation type was not propagated to the subclass type check. 525 // of the allocation type was not propagated to the subclass type check.
526 // 526 //
527 // Or the type 't' could be not related to 'base_t' at all.
528 // It could happened when CHA type is different from MDO type on a dead path
529 // (for example, from instanceof check) which is not collapsed during parsing.
530 //
527 // Do nothing for such AddP node and don't process its users since 531 // Do nothing for such AddP node and don't process its users since
528 // this code branch will go away. 532 // this code branch will go away.
529 // 533 //
530 if (!t->is_known_instance() && 534 if (!t->is_known_instance() &&
531 !t->klass()->equals(base_t->klass()) && 535 !base_t->klass()->is_subtype_of(t->klass())) {
532 t->klass()->is_subtype_of(base_t->klass())) {
533 return false; // bail out 536 return false; // bail out
534 } 537 }
535 538
536 const TypeOopPtr *tinst = base_t->add_offset(t->offset())->is_oopptr(); 539 const TypeOopPtr *tinst = base_t->add_offset(t->offset())->is_oopptr();
537 // Do NOT remove the next call: ensure an new alias index is allocated 540 // Do NOT remove the next call: ensure an new alias index is allocated