src/hotspot/share/opto/graphKit.cpp
changeset 53595 8462b295c08b
parent 52424 e3d79743f57d
child 53625 0a9dfdbb01d1
equal deleted inserted replaced
53594:47a8fdf84424 53595:8462b295c08b
  2792   // (User must make the replace_in_map call.)
  2792   // (User must make the replace_in_map call.)
  2793 
  2793 
  2794   return fail;
  2794   return fail;
  2795 }
  2795 }
  2796 
  2796 
       
  2797 //------------------------------subtype_check_receiver-------------------------
       
  2798 Node* GraphKit::subtype_check_receiver(Node* receiver, ciKlass* klass,
       
  2799                                        Node** casted_receiver) {
       
  2800   const TypeKlassPtr* tklass = TypeKlassPtr::make(klass);
       
  2801   Node* recv_klass = load_object_klass(receiver);
       
  2802   Node* want_klass = makecon(tklass);
       
  2803 
       
  2804   Node* slow_ctl = gen_subtype_check(recv_klass, want_klass);
       
  2805 
       
  2806   // Cast receiver after successful check
       
  2807   const TypeOopPtr* recv_type = tklass->cast_to_exactness(false)->is_klassptr()->as_instance_type();
       
  2808   Node* cast = new CheckCastPPNode(control(), receiver, recv_type);
       
  2809   (*casted_receiver) = _gvn.transform(cast);
       
  2810 
       
  2811   return slow_ctl;
       
  2812 }
  2797 
  2813 
  2798 //------------------------------seems_never_null-------------------------------
  2814 //------------------------------seems_never_null-------------------------------
  2799 // Use null_seen information if it is available from the profile.
  2815 // Use null_seen information if it is available from the profile.
  2800 // If we see an unexpected null at a type check we record it and force a
  2816 // If we see an unexpected null at a type check we record it and force a
  2801 // recompile; the offending check will be recompiled to handle NULLs.
  2817 // recompile; the offending check will be recompiled to handle NULLs.