src/share/vm/opto/callnode.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/opto

src/share/vm/opto/callnode.cpp

Print this page
rev 8833 : 8130847: Cloned object's fields observed as null after C2 escape analysis
Summary: Eliminated instance/array written to by an array copy variant must be correctly initialized when reallocated at a deopt
Reviewed-by:


 707 
 708   case TypeFunc::ReturnAdr:
 709   case TypeFunc::FramePtr:
 710   default:
 711     ShouldNotReachHere();
 712   }
 713   return NULL;
 714 }
 715 
 716 // Do we Match on this edge index or not?  Match no edges
 717 uint CallNode::match_edge(uint idx) const {
 718   return 0;
 719 }
 720 
 721 //
 722 // Determine whether the call could modify the field of the specified
 723 // instance at the specified offset.
 724 //
 725 bool CallNode::may_modify(const TypeOopPtr *t_oop, PhaseTransform *phase) {
 726   assert((t_oop != NULL), "sanity");
 727   if (is_call_to_arraycopystub()) {
 728     const TypeTuple* args = _tf->domain();
 729     Node* dest = NULL;
 730     // Stubs that can be called once an ArrayCopyNode is expanded have
 731     // different signatures. Look for the second pointer argument,
 732     // that is the destination of the copy.
 733     for (uint i = TypeFunc::Parms, j = 0; i < args->cnt(); i++) {
 734       if (args->field_at(i)->isa_ptr()) {
 735         j++;
 736         if (j == 2) {
 737           dest = in(i);
 738           break;
 739         }
 740       }
 741     }
 742     if (!dest->is_top() && may_modify_arraycopy_helper(phase->type(dest)->is_oopptr(), t_oop, phase)) {
 743       return true;
 744     }
 745     return false;
 746   }
 747   if (t_oop->is_known_instance()) {




 707 
 708   case TypeFunc::ReturnAdr:
 709   case TypeFunc::FramePtr:
 710   default:
 711     ShouldNotReachHere();
 712   }
 713   return NULL;
 714 }
 715 
 716 // Do we Match on this edge index or not?  Match no edges
 717 uint CallNode::match_edge(uint idx) const {
 718   return 0;
 719 }
 720 
 721 //
 722 // Determine whether the call could modify the field of the specified
 723 // instance at the specified offset.
 724 //
 725 bool CallNode::may_modify(const TypeOopPtr *t_oop, PhaseTransform *phase) {
 726   assert((t_oop != NULL), "sanity");
 727   if (is_call_to_arraycopystub() && strcmp(_name, "unsafe_arraycopy")) {
 728     const TypeTuple* args = _tf->domain();
 729     Node* dest = NULL;
 730     // Stubs that can be called once an ArrayCopyNode is expanded have
 731     // different signatures. Look for the second pointer argument,
 732     // that is the destination of the copy.
 733     for (uint i = TypeFunc::Parms, j = 0; i < args->cnt(); i++) {
 734       if (args->field_at(i)->isa_ptr()) {
 735         j++;
 736         if (j == 2) {
 737           dest = in(i);
 738           break;
 739         }
 740       }
 741     }
 742     if (!dest->is_top() && may_modify_arraycopy_helper(phase->type(dest)->is_oopptr(), t_oop, phase)) {
 743       return true;
 744     }
 745     return false;
 746   }
 747   if (t_oop->is_known_instance()) {


src/share/vm/opto/callnode.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File