hotspot/src/cpu/x86/vm/interp_masm_x86_64.cpp
void InterpreterMacroAssembler::check_and_handle_popframe(Register java_thread) {
{- -------------------------------------------
(1) (JvmtiExport::can_pop_frame() が true でない場合は, (何もする必要が無いので) 以降の処理は全て省略)
---------------------------------------- -}
if (JvmtiExport::can_pop_frame()) {
{- -------------------------------------------
(1) (変数宣言など)
---------------------------------------- -}
Label L;
{- -------------------------------------------
(1) コード生成:
「JavaThread::_popframe_condition フィールドをチェックし,
(JavaThread::popframe_pending_bit が立っていて, かつ JavaThread::popframe_processing_bit が立っていなければ)
Interpreter::remove_activation_preserving_args_entry() が返すアドレスにジャンプする.」
(なお JavaThread::popframe_processing_bit が立っていれば,
それは「現在 PopFrame() の処理中」という意味. そのため再度処理する必要は無い.
(See: TemplateInterpreterGenerator::generate_throw_exception()))
---------------------------------------- -}
// Initiate popframe handling only if it is not already being
// processed. If the flag has the popframe_processing bit set, it
// means that this code is called *during* popframe handling - we
// don't want to reenter.
// This method is only called just after the call into the vm in
// call_VM_base, so the arg registers are available.
movl(c_rarg0, Address(r15_thread, JavaThread::popframe_condition_offset()));
testl(c_rarg0, JavaThread::popframe_pending_bit);
jcc(Assembler::zero, L);
testl(c_rarg0, JavaThread::popframe_processing_bit);
jcc(Assembler::notZero, L);
// Call Interpreter::remove_activation_preserving_args_entry() to get the
// address of the same-named entrypoint in the generated interpreter code.
call_VM_leaf(CAST_FROM_FN_PTR(address, Interpreter::remove_activation_preserving_args_entry));
jmp(rax);
bind(L);
}
}
This document is available under the GNU GENERAL PUBLIC LICENSE Version 2.