Top


定義場所(file name)

hotspot/src/share/vm/interpreter/interpreterRuntime.cpp

名前(function name)

IRT_ENTRY(void, InterpreterRuntime::resolve_ldc(JavaThread* thread, Bytecodes::Code bytecode)) {

本体部(body)

  {- -------------------------------------------
  (1) (assert)
      ---------------------------------------- -}

      assert(bytecode == Bytecodes::_fast_aldc ||
             bytecode == Bytecodes::_fast_aldc_w, "wrong bc");

  {- -------------------------------------------
  (1) (ResourceMark)
      ---------------------------------------- -}

      ResourceMark rm(thread);

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

      methodHandle m (thread, method(thread));

  {- -------------------------------------------
  (1) Bytecode_loadconstant::resolve_constant() を呼んで, 解決処理を行う
      ---------------------------------------- -}

      Bytecode_loadconstant ldc(m, bci(thread));
      oop result = ldc.resolve_constant(CHECK);

  {- -------------------------------------------
  (1) (デバッグ用の処理) (#ifdef ASSERT 時にのみ実行)
      ---------------------------------------- -}

    #ifdef ASSERT
      {
        // The bytecode wrappers aren't GC-safe so construct a new one
        Bytecode_loadconstant ldc2(m, bci(thread));
        ConstantPoolCacheEntry* cpce = m->constants()->cache()->entry_at(ldc2.cache_index());
        assert(result == cpce->f1(), "expected result for assembly code");
      }
    #endif
    }
    IRT_END

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