src/share/vm/runtime/sharedRuntime.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 8035074.01 Sdiff src/share/vm/runtime

src/share/vm/runtime/sharedRuntime.cpp

Print this page




 715 
 716 JRT_ENTRY(void, SharedRuntime::throw_NullPointerException(JavaThread* thread))
 717   throw_and_post_jvmti_exception(thread, vmSymbols::java_lang_NullPointerException());
 718 JRT_END
 719 
 720 JRT_ENTRY(void, SharedRuntime::throw_NullPointerException_at_call(JavaThread* thread))
 721   // This entry point is effectively only used for NullPointerExceptions which occur at inline
 722   // cache sites (when the callee activation is not yet set up) so we are at a call site
 723   throw_and_post_jvmti_exception(thread, vmSymbols::java_lang_NullPointerException());
 724 JRT_END
 725 
 726 JRT_ENTRY(void, SharedRuntime::throw_StackOverflowError(JavaThread* thread))
 727   // We avoid using the normal exception construction in this case because
 728   // it performs an upcall to Java, and we're already out of stack space.
 729   Klass* k = SystemDictionary::StackOverflowError_klass();
 730   oop exception_oop = InstanceKlass::cast(k)->allocate_instance(CHECK);
 731   Handle exception (thread, exception_oop);
 732   if (StackTraceInThrowable) {
 733     java_lang_Throwable::fill_in_stack_trace(exception);
 734   }


 735   throw_and_post_jvmti_exception(thread, exception);
 736 JRT_END
 737 
 738 address SharedRuntime::continuation_for_implicit_exception(JavaThread* thread,
 739                                                            address pc,
 740                                                            SharedRuntime::ImplicitExceptionKind exception_kind)
 741 {
 742   address target_pc = NULL;
 743 
 744   if (Interpreter::contains(pc)) {
 745 #ifdef CC_INTERP
 746     // C++ interpreter doesn't throw implicit exceptions
 747     ShouldNotReachHere();
 748 #else
 749     switch (exception_kind) {
 750       case IMPLICIT_NULL:           return Interpreter::throw_NullPointerException_entry();
 751       case IMPLICIT_DIVIDE_BY_ZERO: return Interpreter::throw_ArithmeticException_entry();
 752       case STACK_OVERFLOW:          return Interpreter::throw_StackOverflowError_entry();
 753       default:                      ShouldNotReachHere();
 754     }




 715 
 716 JRT_ENTRY(void, SharedRuntime::throw_NullPointerException(JavaThread* thread))
 717   throw_and_post_jvmti_exception(thread, vmSymbols::java_lang_NullPointerException());
 718 JRT_END
 719 
 720 JRT_ENTRY(void, SharedRuntime::throw_NullPointerException_at_call(JavaThread* thread))
 721   // This entry point is effectively only used for NullPointerExceptions which occur at inline
 722   // cache sites (when the callee activation is not yet set up) so we are at a call site
 723   throw_and_post_jvmti_exception(thread, vmSymbols::java_lang_NullPointerException());
 724 JRT_END
 725 
 726 JRT_ENTRY(void, SharedRuntime::throw_StackOverflowError(JavaThread* thread))
 727   // We avoid using the normal exception construction in this case because
 728   // it performs an upcall to Java, and we're already out of stack space.
 729   Klass* k = SystemDictionary::StackOverflowError_klass();
 730   oop exception_oop = InstanceKlass::cast(k)->allocate_instance(CHECK);
 731   Handle exception (thread, exception_oop);
 732   if (StackTraceInThrowable) {
 733     java_lang_Throwable::fill_in_stack_trace(exception);
 734   }
 735   // Increment counter for hs_err file reporting
 736   Atomic::inc(&Exceptions::_stack_overflow_errors);
 737   throw_and_post_jvmti_exception(thread, exception);
 738 JRT_END
 739 
 740 address SharedRuntime::continuation_for_implicit_exception(JavaThread* thread,
 741                                                            address pc,
 742                                                            SharedRuntime::ImplicitExceptionKind exception_kind)
 743 {
 744   address target_pc = NULL;
 745 
 746   if (Interpreter::contains(pc)) {
 747 #ifdef CC_INTERP
 748     // C++ interpreter doesn't throw implicit exceptions
 749     ShouldNotReachHere();
 750 #else
 751     switch (exception_kind) {
 752       case IMPLICIT_NULL:           return Interpreter::throw_NullPointerException_entry();
 753       case IMPLICIT_DIVIDE_BY_ZERO: return Interpreter::throw_ArithmeticException_entry();
 754       case STACK_OVERFLOW:          return Interpreter::throw_StackOverflowError_entry();
 755       default:                      ShouldNotReachHere();
 756     }


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