Top


定義場所(file name)

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

説明(description)

//------------------------------------------------------------------------------------------------------------------------
// Invoke resolution
//
// Naming conventions:
//
// resolved_method    the specified method (i.e., static receiver specified via constant pool index)
// sel_method         the selected method  (selected via run-time lookup; e.g., based on dynamic receiver class)
// resolved_klass     the specified klass  (i.e., specified via constant pool index)
// recv_klass         the receiver klass

名前(function name)

void LinkResolver::resolve_static_call(CallInfo& result, KlassHandle& resolved_klass, Symbol* method_name,
                                       Symbol* method_signature, KlassHandle current_klass,
                                       bool check_access, bool initialize_class, TRAPS) {

本体部(body)

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

      methodHandle resolved_method;

  {- -------------------------------------------
  (1) LinkResolver::linktime_resolve_static_method() を呼んで, 
      対象メソッドの解決処理を行う.
      ---------------------------------------- -}

      linktime_resolve_static_method(resolved_method, resolved_klass, method_name, method_signature, current_klass, check_access, CHECK);

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

      resolved_klass = KlassHandle(THREAD, Klass::cast(resolved_method->method_holder()));

  {- -------------------------------------------
  (1) 必要があれば, Klass::initialize() を呼んで定義クラスを初期化しておく.
      (この場合, もう一度
      ---------------------------------------- -}

      // Initialize klass (this should only happen if everything is ok)
      if (initialize_class && resolved_klass->should_be_initialized()) {
        resolved_klass->initialize(CHECK);
        linktime_resolve_static_method(resolved_method, resolved_klass, method_name, method_signature, current_klass, check_access, CHECK);
      }

  {- -------------------------------------------
  (1) CallInfo::set_static() を呼んで, 
      引数で渡された CallInfo オブジェクト内に
      解決結果をセットする
      ---------------------------------------- -}

      // setup result
      result.set_static(resolved_klass, resolved_method, CHECK);
    }

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