977 patching_info = state_for (x, x->state_before()); |
977 patching_info = state_for (x, x->state_before()); |
978 } |
978 } |
979 obj.load_item(); |
979 obj.load_item(); |
980 |
980 |
981 // info for exceptions |
981 // info for exceptions |
982 CodeEmitInfo* info_for_exception = state_for (x); |
982 CodeEmitInfo* info_for_exception = |
|
983 (x->needs_exception_state() ? state_for(x) : |
|
984 state_for(x, x->state_before(), true /*ignore_xhandler*/)); |
983 |
985 |
984 CodeStub* stub; |
986 CodeStub* stub; |
985 if (x->is_incompatible_class_change_check()) { |
987 if (x->is_incompatible_class_change_check()) { |
986 assert(patching_info == NULL, "can't patch this"); |
988 assert(patching_info == NULL, "can't patch this"); |
987 stub = new SimpleExceptionStub(Runtime1::throw_incompatible_class_change_error_id, LIR_OprFact::illegalOpr, info_for_exception); |
989 stub = new SimpleExceptionStub(Runtime1::throw_incompatible_class_change_error_id, LIR_OprFact::illegalOpr, info_for_exception); |
|
990 } else if (x->is_invokespecial_receiver_check()) { |
|
991 assert(patching_info == NULL, "can't patch this"); |
|
992 stub = new DeoptimizeStub(info_for_exception, |
|
993 Deoptimization::Reason_class_check, |
|
994 Deoptimization::Action_none); |
988 } else { |
995 } else { |
989 stub = new SimpleExceptionStub(Runtime1::throw_class_cast_exception_id, obj.result(), info_for_exception); |
996 stub = new SimpleExceptionStub(Runtime1::throw_class_cast_exception_id, obj.result(), info_for_exception); |
990 } |
997 } |
991 LIR_Opr reg = rlock_result(x); |
998 LIR_Opr reg = rlock_result(x); |
992 LIR_Opr tmp1 = new_register(objectType); |
999 LIR_Opr tmp1 = new_register(objectType); |