hotspot/src/share/vm/interpreter/interpreterRuntime.cpp
IRT_ENTRY(void, InterpreterRuntime::create_klass_exception(JavaThread* thread, char* name, oopDesc* obj))
{- -------------------------------------------
(1) (変数宣言など)
---------------------------------------- -}
ResourceMark rm(thread);
const char* klass_name = Klass::cast(obj->klass())->external_name();
{- -------------------------------------------
(1) (変数宣言など)
(s は, 引数で指定された名前の例外クラスを SymbolTable 内から lookup したもの)
---------------------------------------- -}
// lookup exception klass
TempNewSymbol s = SymbolTable::new_symbol(name, CHECK);
{- -------------------------------------------
(1) (デバッグ用の処理)
---------------------------------------- -}
if (ProfileTraps) {
note_trap(thread, Deoptimization::Reason_class_check, CHECK);
}
{- -------------------------------------------
(1) Exceptions::new_exception() で例外オブジェクトを生成し,
引数で指定されたスレッドの vm_result フィールドに格納する.
---------------------------------------- -}
// create exception, with klass name as detail message
Handle exception = Exceptions::new_exception(thread, s, klass_name);
thread->set_vm_result(exception());
IRT_END
This document is available under the GNU GENERAL PUBLIC LICENSE Version 2.