Mercurial > hg > truffle
comparison src/share/vm/opto/callnode.cpp @ 163:885ed790ecf0
6695810: null oop passed to encode_heap_oop_not_null
Summary: fix several problems in C2 related to Escape Analysis and Compressed Oops.
Reviewed-by: never, jrose
author | kvn |
---|---|
date | Wed, 21 May 2008 10:45:07 -0700 |
parents | 2a9af0b9cb1c |
children | d1605aabd0a1 1dd146f17531 |
comparison
equal
deleted
inserted
replaced
162:8aa010f60e0f | 163:885ed790ecf0 |
---|---|
635 if (adrInst_t == NULL || !adrInst_t->is_instance_field()) { | 635 if (adrInst_t == NULL || !adrInst_t->is_instance_field()) { |
636 return true; | 636 return true; |
637 } | 637 } |
638 Compile *C = phase->C; | 638 Compile *C = phase->C; |
639 int offset = adrInst_t->offset(); | 639 int offset = adrInst_t->offset(); |
640 assert(offset >= 0, "should be valid offset"); | 640 assert(adrInst_t->klass_is_exact() && offset >= 0, "should be valid offset"); |
641 ciKlass* adr_k = adrInst_t->klass(); | 641 ciKlass* adr_k = adrInst_t->klass(); |
642 assert(adr_k->is_loaded() && | 642 assert(adr_k->is_loaded() && |
643 adr_k->is_java_klass() && | 643 adr_k->is_java_klass() && |
644 !adr_k->is_interface(), | 644 !adr_k->is_interface(), |
645 "only non-abstract classes are expected"); | 645 "only non-abstract classes are expected"); |
672 t->isa_ptr() && at_ptr != NULL)) { | 672 t->isa_ptr() && at_ptr != NULL)) { |
673 assert(at_ptr != NULL, "expecting an OopPtr"); | 673 assert(at_ptr != NULL, "expecting an OopPtr"); |
674 ciKlass* at_k = at_ptr->klass(); | 674 ciKlass* at_k = at_ptr->klass(); |
675 if ((adrInst_t->base() == at_ptr->base()) && | 675 if ((adrInst_t->base() == at_ptr->base()) && |
676 at_k->is_loaded() && | 676 at_k->is_loaded() && |
677 at_k->is_java_klass() && | 677 at_k->is_java_klass()) { |
678 !at_k->is_interface()) { | |
679 // If we have found an argument matching addr_t, check if the field | 678 // If we have found an argument matching addr_t, check if the field |
680 // at the specified offset is modified. | 679 // at the specified offset is modified. |
681 int at_idx = C->get_alias_index(at_ptr->add_offset(offset)->isa_oopptr()); | 680 if ((at_k->is_interface() || adr_k == at_k || |
682 if (base_idx == at_idx && | 681 adr_k->is_subclass_of(at_k) && !at_ptr->klass_is_exact()) && |
683 (bcea == NULL || | 682 (bcea == NULL || |
684 bcea->is_arg_modified(i - TypeFunc::Parms, offset, size))) { | 683 bcea->is_arg_modified(i - TypeFunc::Parms, offset, size))) { |
685 return true; | 684 return true; |
686 } | 685 } |
687 } | 686 } |