Mercurial > hg > graal-jvmci-8
diff 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 |
line wrap: on
line diff
--- a/src/share/vm/opto/callnode.cpp Tue May 20 06:32:58 2008 -0700 +++ b/src/share/vm/opto/callnode.cpp Wed May 21 10:45:07 2008 -0700 @@ -637,7 +637,7 @@ } Compile *C = phase->C; int offset = adrInst_t->offset(); - assert(offset >= 0, "should be valid offset"); + assert(adrInst_t->klass_is_exact() && offset >= 0, "should be valid offset"); ciKlass* adr_k = adrInst_t->klass(); assert(adr_k->is_loaded() && adr_k->is_java_klass() && @@ -674,12 +674,11 @@ ciKlass* at_k = at_ptr->klass(); if ((adrInst_t->base() == at_ptr->base()) && at_k->is_loaded() && - at_k->is_java_klass() && - !at_k->is_interface()) { + at_k->is_java_klass()) { // If we have found an argument matching addr_t, check if the field // at the specified offset is modified. - int at_idx = C->get_alias_index(at_ptr->add_offset(offset)->isa_oopptr()); - if (base_idx == at_idx && + if ((at_k->is_interface() || adr_k == at_k || + adr_k->is_subclass_of(at_k) && !at_ptr->klass_is_exact()) && (bcea == NULL || bcea->is_arg_modified(i - TypeFunc::Parms, offset, size))) { return true;