Top


定義場所(file name)

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

名前(function name)

void CallInfo::set_interface(KlassHandle resolved_klass, KlassHandle selected_klass, methodHandle resolved_method, methodHandle selected_method, TRAPS) {

本体部(body)

  {- -------------------------------------------
  (1) (変数宣言など)
      (vtable_index は, インターフェースメソッドの呼び出し時には意味はない.
      java.lang.Object のメソッドが invokeinterface で呼び出されるコーナーケース時にのみ vtable index を格納)
      ---------------------------------------- -}

      // This is only called for interface methods. If the resolved_method
      // comes from java/lang/Object, it can be the subject of a virtual call, so
      // we should pick the vtable index from the resolved method.
      // Other than that case, there is no valid vtable index to specify.
      int vtable_index = methodOopDesc::invalid_vtable_index;
      if (resolved_method->method_holder() == SystemDictionary::Object_klass()) {
        assert(resolved_method->vtable_index() == selected_method->vtable_index(), "sanity check");
        vtable_index = resolved_method->vtable_index();
      }

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

      set_common(resolved_klass, selected_klass, resolved_method, selected_method, vtable_index, CHECK);
    }

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