Top


定義場所(file name)

hotspot/src/cpu/sparc/vm/interp_masm_sparc.cpp

名前(function name)

void InterpreterMacroAssembler::check_and_handle_popframe(Register scratch_reg) {

本体部(body)

  {- -------------------------------------------
  (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()))
      ---------------------------------------- -}

        // Check the "pending popframe condition" flag in the current thread
        ld(G2_thread, JavaThread::popframe_condition_offset(), scratch_reg);

        // 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.
        btst(JavaThread::popframe_pending_bit, scratch_reg);
        br(zero, false, pt, L);
        delayed()->nop();
        btst(JavaThread::popframe_processing_bit, scratch_reg);
        br(notZero, false, pt, L);
        delayed()->nop();

        // Call Interpreter::remove_activation_preserving_args_entry() to get the
        // address of the same-named entrypoint in the generated interpreter code.
        call_VM_leaf(noreg, CAST_FROM_FN_PTR(address, Interpreter::remove_activation_preserving_args_entry));

        // Jump to Interpreter::_remove_activation_preserving_args_entry
        jmpl(O0, G0, G0);
        delayed()->nop();
        bind(L);
      }
    }

This document is available under the GNU GENERAL PUBLIC LICENSE Version 2.