610 nmethod* nm = NULL;
611 address continuation = NULL;
612 {
613 // Enter VM mode by calling the helper
614 ResetNoHandleMark rnhm;
615 continuation = exception_handler_for_pc_helper(thread, exception, pc, nm);
616 }
617 // Back in JAVA, use no oops DON'T safepoint
618
619 // Now check to see if the nmethod we were called from is now deoptimized.
620 // If so we must return to the deopt blob and deoptimize the nmethod
621 if (nm != NULL && caller_is_deopted()) {
622 continuation = SharedRuntime::deopt_blob()->unpack_with_exception_in_tls();
623 }
624
625 assert(continuation != NULL, "no handler found");
626 return continuation;
627 }
628
629
630 JRT_ENTRY(void, Runtime1::throw_range_check_exception(JavaThread* thread, int index))
631 NOT_PRODUCT(_throw_range_check_exception_count++;)
632 char message[jintAsStringSize];
633 sprintf(message, "%d", index);
634 SharedRuntime::throw_and_post_jvmti_exception(thread, vmSymbols::java_lang_ArrayIndexOutOfBoundsException(), message);
635 JRT_END
636
637
638 JRT_ENTRY(void, Runtime1::throw_index_exception(JavaThread* thread, int index))
639 NOT_PRODUCT(_throw_index_exception_count++;)
640 char message[16];
641 sprintf(message, "%d", index);
642 SharedRuntime::throw_and_post_jvmti_exception(thread, vmSymbols::java_lang_IndexOutOfBoundsException(), message);
643 JRT_END
644
645
646 JRT_ENTRY(void, Runtime1::throw_div0_exception(JavaThread* thread))
647 NOT_PRODUCT(_throw_div0_exception_count++;)
648 SharedRuntime::throw_and_post_jvmti_exception(thread, vmSymbols::java_lang_ArithmeticException(), "/ by zero");
649 JRT_END
650
651
652 JRT_ENTRY(void, Runtime1::throw_null_pointer_exception(JavaThread* thread))
653 NOT_PRODUCT(_throw_null_pointer_exception_count++;)
654 SharedRuntime::throw_and_post_jvmti_exception(thread, vmSymbols::java_lang_NullPointerException());
|
610 nmethod* nm = NULL;
611 address continuation = NULL;
612 {
613 // Enter VM mode by calling the helper
614 ResetNoHandleMark rnhm;
615 continuation = exception_handler_for_pc_helper(thread, exception, pc, nm);
616 }
617 // Back in JAVA, use no oops DON'T safepoint
618
619 // Now check to see if the nmethod we were called from is now deoptimized.
620 // If so we must return to the deopt blob and deoptimize the nmethod
621 if (nm != NULL && caller_is_deopted()) {
622 continuation = SharedRuntime::deopt_blob()->unpack_with_exception_in_tls();
623 }
624
625 assert(continuation != NULL, "no handler found");
626 return continuation;
627 }
628
629
630 JRT_ENTRY(void, Runtime1::throw_range_check_exception(JavaThread* thread, int index, arrayOopDesc* a))
631 NOT_PRODUCT(_throw_range_check_exception_count++;)
632 JavaCallArguments args;
633 args.push_int(index);
634 args.push_int(a->length());
635 THROW_ARG(vmSymbols::java_lang_ArrayIndexOutOfBoundsException(), vmSymbols::int_int_void_signature(), &args);
636 JRT_END
637
638
639 JRT_ENTRY(void, Runtime1::throw_index_exception(JavaThread* thread, int index))
640 NOT_PRODUCT(_throw_index_exception_count++;)
641 char message[16];
642 sprintf(message, "%d", index);
643 SharedRuntime::throw_and_post_jvmti_exception(thread, vmSymbols::java_lang_IndexOutOfBoundsException(), message);
644 JRT_END
645
646
647 JRT_ENTRY(void, Runtime1::throw_div0_exception(JavaThread* thread))
648 NOT_PRODUCT(_throw_div0_exception_count++;)
649 SharedRuntime::throw_and_post_jvmti_exception(thread, vmSymbols::java_lang_ArithmeticException(), "/ by zero");
650 JRT_END
651
652
653 JRT_ENTRY(void, Runtime1::throw_null_pointer_exception(JavaThread* thread))
654 NOT_PRODUCT(_throw_null_pointer_exception_count++;)
655 SharedRuntime::throw_and_post_jvmti_exception(thread, vmSymbols::java_lang_NullPointerException());
|