Top


定義場所(file name)

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

名前(function name)

void InterpreterRuntime::SignatureHandlerGenerator::pass_object() {

本体部(body)

  {- -------------------------------------------
  (1) (変数宣言など)
      ---------------------------------------- -}

      Argument  jni_arg(jni_offset(), false);
      Argument java_arg(    offset(), true);
      Register    Rtmp1 = O0;
      Register    Rtmp2 =  jni_arg.is_register() ?  jni_arg.as_register() : O0;
      Register    Rtmp3 =  G3_scratch;

      // the handle for a receiver will never be null
      bool do_NULL_check = offset() != 0 || is_static();

      Address     h_arg = Address(Llocals, Interpreter::local_offset_in_bytes(offset()));

  {- -------------------------------------------
  (1) コード生成:
      「まずインタープリタのフレーム内に置かれている引数を Rtmp にロード.
        (なお, ロードする際のフレーム内の位置は Interpreter::local_offset_in_bytes() で計算)」
      ---------------------------------------- -}

      __ ld_ptr(h_arg, Rtmp1);

  {- -------------------------------------------
  (1) #TODO
      ---------------------------------------- -}

      if (!do_NULL_check) {
        __ add(h_arg.base(), h_arg.disp(), Rtmp2);
      } else {
        if (Rtmp1 == Rtmp2)
              __ tst(Rtmp1);
        else  __ addcc(G0, Rtmp1, Rtmp2); // optimize mov/test pair
        Label L;
        __ brx(Assembler::notZero, true, Assembler::pt, L);
        __ delayed()->add(h_arg.base(), h_arg.disp(), Rtmp2);
        __ bind(L);
      }

  {- -------------------------------------------
  (1) #TODO
      ---------------------------------------- -}

      __ store_ptr_argument(Rtmp2, jni_arg);    // this is often a no-op
    }

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