src/share/vm/interpreter/interpreterRuntime.cpp

Print this page




 297   exception = Handle(THREAD, exception_oop);
 298   if (StackTraceInThrowable) {
 299     java_lang_Throwable::fill_in_stack_trace(exception);
 300   }
 301   return exception;
 302 }
 303 
 304 // Special handling for stack overflow: since we don't have any (java) stack
 305 // space left we use the pre-allocated & pre-initialized StackOverflowError
 306 // klass to create an stack overflow error instance.  We do not call its
 307 // constructor for the same reason (it is empty, anyway).
 308 IRT_ENTRY(void, InterpreterRuntime::throw_StackOverflowError(JavaThread* thread))
 309   Handle exception = get_preinitialized_exception(
 310                                  SystemDictionary::StackOverflowError_klass(),
 311                                  CHECK);
 312   // Increment counter for hs_err file reporting
 313   Atomic::inc(&Exceptions::_stack_overflow_errors);
 314   THROW_HANDLE(exception);
 315 IRT_END
 316 



















 317 
 318 IRT_ENTRY(void, InterpreterRuntime::create_exception(JavaThread* thread, char* name, char* message))
 319   // lookup exception klass
 320   TempNewSymbol s = SymbolTable::new_symbol(name, CHECK);
 321   if (ProfileTraps) {
 322     if (s == vmSymbols::java_lang_ArithmeticException()) {
 323       note_trap(thread, Deoptimization::Reason_div0_check, CHECK);
 324     } else if (s == vmSymbols::java_lang_NullPointerException()) {
 325       note_trap(thread, Deoptimization::Reason_null_check, CHECK);
 326     }
 327   }
 328   // create exception
 329   Handle exception = Exceptions::new_exception(thread, s, message);
 330   thread->set_vm_result(exception());
 331 IRT_END
 332 
 333 
 334 IRT_ENTRY(void, InterpreterRuntime::create_klass_exception(JavaThread* thread, char* name, oopDesc* obj))
 335   ResourceMark rm(thread);
 336   const char* klass_name = obj->klass()->external_name();




 297   exception = Handle(THREAD, exception_oop);
 298   if (StackTraceInThrowable) {
 299     java_lang_Throwable::fill_in_stack_trace(exception);
 300   }
 301   return exception;
 302 }
 303 
 304 // Special handling for stack overflow: since we don't have any (java) stack
 305 // space left we use the pre-allocated & pre-initialized StackOverflowError
 306 // klass to create an stack overflow error instance.  We do not call its
 307 // constructor for the same reason (it is empty, anyway).
 308 IRT_ENTRY(void, InterpreterRuntime::throw_StackOverflowError(JavaThread* thread))
 309   Handle exception = get_preinitialized_exception(
 310                                  SystemDictionary::StackOverflowError_klass(),
 311                                  CHECK);
 312   // Increment counter for hs_err file reporting
 313   Atomic::inc(&Exceptions::_stack_overflow_errors);
 314   THROW_HANDLE(exception);
 315 IRT_END
 316 
 317 IRT_ENTRY(address, InterpreterRuntime::check_ReservedStackAccess_annotated_methods(JavaThread* thread))
 318   frame fr = thread->last_frame();
 319   assert(fr.is_java_frame(), "Must be a Java frame");
 320   frame activation = SharedRuntime::look_for_reserved_stack_annotated_method(thread, fr);
 321   if (activation.sp() != NULL) {
 322     thread->disable_stack_reserved_zone();
 323     thread->set_reserved_stack_activation(activation.unextended_sp());
 324   }
 325   return (address)activation.sp();
 326 IRT_END
 327 
 328  IRT_ENTRY(void, InterpreterRuntime::throw_delayed_StackOverflowError(JavaThread* thread))
 329   Handle exception = get_preinitialized_exception(
 330                                  SystemDictionary::StackOverflowError_klass(),
 331                                  CHECK);
 332   java_lang_Throwable::set_message(exception(),
 333           Universe::delayed_stack_overflow_error_message());
 334   THROW_HANDLE(exception);
 335 IRT_END 
 336 
 337 IRT_ENTRY(void, InterpreterRuntime::create_exception(JavaThread* thread, char* name, char* message))
 338   // lookup exception klass
 339   TempNewSymbol s = SymbolTable::new_symbol(name, CHECK);
 340   if (ProfileTraps) {
 341     if (s == vmSymbols::java_lang_ArithmeticException()) {
 342       note_trap(thread, Deoptimization::Reason_div0_check, CHECK);
 343     } else if (s == vmSymbols::java_lang_NullPointerException()) {
 344       note_trap(thread, Deoptimization::Reason_null_check, CHECK);
 345     }
 346   }
 347   // create exception
 348   Handle exception = Exceptions::new_exception(thread, s, message);
 349   thread->set_vm_result(exception());
 350 IRT_END
 351 
 352 
 353 IRT_ENTRY(void, InterpreterRuntime::create_klass_exception(JavaThread* thread, char* name, oopDesc* obj))
 354   ResourceMark rm(thread);
 355   const char* klass_name = obj->klass()->external_name();