hotspot/src/share/vm/interpreter/interpreterRuntime.cpp
IRT_ENTRY(void, InterpreterRuntime::throw_ClassCastException(
JavaThread* thread, oopDesc* obj))
{- -------------------------------------------
(1) (変数宣言など)
---------------------------------------- -}
ResourceMark rm(thread);
char* message = SharedRuntime::generate_class_cast_message(
thread, Klass::cast(obj->klass())->external_name());
{- -------------------------------------------
(1) (デバッグ用の処理)
---------------------------------------- -}
if (ProfileTraps) {
note_trap(thread, Deoptimization::Reason_class_check, CHECK);
}
{- -------------------------------------------
(1) THROW_MSG() で, 例外オブジェクトの生成と送出を行う.
---------------------------------------- -}
// create exception
THROW_MSG(vmSymbols::java_lang_ClassCastException(), message);
IRT_END
This document is available under the GNU GENERAL PUBLIC LICENSE Version 2.