< prev index next >

src/share/vm/interpreter/interpreterRuntime.cpp

Print this page




 303          "this klass should have been initialized during VM initialization");
 304   // create instance - do not call constructor since we may have no
 305   // (java) stack space left (should assert constructor is empty)
 306   Handle exception;
 307   oop exception_oop = klass->allocate_instance(CHECK_(exception));
 308   exception = Handle(THREAD, exception_oop);
 309   if (StackTraceInThrowable) {
 310     java_lang_Throwable::fill_in_stack_trace(exception);
 311   }
 312   return exception;
 313 }
 314 
 315 // Special handling for stack overflow: since we don't have any (java) stack
 316 // space left we use the pre-allocated & pre-initialized StackOverflowError
 317 // klass to create an stack overflow error instance.  We do not call its
 318 // constructor for the same reason (it is empty, anyway).
 319 IRT_ENTRY(void, InterpreterRuntime::throw_StackOverflowError(JavaThread* thread))
 320   Handle exception = get_preinitialized_exception(
 321                                  SystemDictionary::StackOverflowError_klass(),
 322                                  CHECK);


 323   THROW_HANDLE(exception);
 324 IRT_END
 325 
 326 
 327 IRT_ENTRY(void, InterpreterRuntime::create_exception(JavaThread* thread, char* name, char* message))
 328   // lookup exception klass
 329   TempNewSymbol s = SymbolTable::new_symbol(name, CHECK);
 330   if (ProfileTraps) {
 331     if (s == vmSymbols::java_lang_ArithmeticException()) {
 332       note_trap(thread, Deoptimization::Reason_div0_check, CHECK);
 333     } else if (s == vmSymbols::java_lang_NullPointerException()) {
 334       note_trap(thread, Deoptimization::Reason_null_check, CHECK);
 335     }
 336   }
 337   // create exception
 338   Handle exception = Exceptions::new_exception(thread, s, message);
 339   thread->set_vm_result(exception());
 340 IRT_END
 341 
 342 




 303          "this klass should have been initialized during VM initialization");
 304   // create instance - do not call constructor since we may have no
 305   // (java) stack space left (should assert constructor is empty)
 306   Handle exception;
 307   oop exception_oop = klass->allocate_instance(CHECK_(exception));
 308   exception = Handle(THREAD, exception_oop);
 309   if (StackTraceInThrowable) {
 310     java_lang_Throwable::fill_in_stack_trace(exception);
 311   }
 312   return exception;
 313 }
 314 
 315 // Special handling for stack overflow: since we don't have any (java) stack
 316 // space left we use the pre-allocated & pre-initialized StackOverflowError
 317 // klass to create an stack overflow error instance.  We do not call its
 318 // constructor for the same reason (it is empty, anyway).
 319 IRT_ENTRY(void, InterpreterRuntime::throw_StackOverflowError(JavaThread* thread))
 320   Handle exception = get_preinitialized_exception(
 321                                  SystemDictionary::StackOverflowError_klass(),
 322                                  CHECK);
 323   // Increment counter for hs_err file reporting
 324   Atomic::inc(&Exceptions::_stack_overflow_errors);
 325   THROW_HANDLE(exception);
 326 IRT_END
 327 
 328 
 329 IRT_ENTRY(void, InterpreterRuntime::create_exception(JavaThread* thread, char* name, char* message))
 330   // lookup exception klass
 331   TempNewSymbol s = SymbolTable::new_symbol(name, CHECK);
 332   if (ProfileTraps) {
 333     if (s == vmSymbols::java_lang_ArithmeticException()) {
 334       note_trap(thread, Deoptimization::Reason_div0_check, CHECK);
 335     } else if (s == vmSymbols::java_lang_NullPointerException()) {
 336       note_trap(thread, Deoptimization::Reason_null_check, CHECK);
 337     }
 338   }
 339   // create exception
 340   Handle exception = Exceptions::new_exception(thread, s, message);
 341   thread->set_vm_result(exception());
 342 IRT_END
 343 
 344 


< prev index next >