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

src/share/vm/opto/graphKit.cpp

Print this page

        

*** 2725,2735 **** --- 2725,2749 ---- // (User must make the replace_in_map call.) return fail; } + Node* GraphKit::subtype_check_receiver(Node* receiver, ciKlass* klass, + Node** casted_receiver) { + const TypeKlassPtr* tklass = TypeKlassPtr::make(klass); + Node* recv_klass = load_object_klass(receiver); + Node* want_klass = makecon(tklass); + + Node* slow_ctl = gen_subtype_check(recv_klass, want_klass); + + // Cast receiver after successful check + const TypeOopPtr* recv_type = tklass->cast_to_exactness(false)->is_klassptr()->as_instance_type(); + Node* cast = new CheckCastPPNode(control(), receiver, recv_type); + (*casted_receiver) = _gvn.transform(cast); + return slow_ctl; + } //------------------------------seems_never_null------------------------------- // Use null_seen information if it is available from the profile. // If we see an unexpected null at a type check we record it and force a // recompile; the offending check will be recompiled to handle NULLs. // If we see several offending BCIs, then all checks in the
src/share/vm/opto/graphKit.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File