ダイナミックディスパッチ用のテーブルは各 instanceKlass オブジェクト内に格納されている. これらのテーブルは vtable および itable と呼ばれており, それぞれ invokevirtual および invokeinterface 用 (See: here for details).
vtable と itable はクラスファイルのパース時に生成され, 実際の呼び出し時に参照される.
クラスファイルのパースによる instanceKlassOop の作成時に, ClassFileParser::parseClassFile() 内で以下のようにして領域が確保される. (See: here for details)
その後のリンク処理時に, instanceKlass::link_class_impl() 内でテーブルの中身が書き込まれる. (See: here for details)
| Type | Related Links |
|---|---|
| Runtime(C++ コード) からのダイナミックディスパッチ | (See: here for details) |
| Template Interpreter からのダイナミックディスパッチ | (See: here for details), (See: here for details) |
| CPP Interpreter からのダイナミックディスパッチ | (#Under Construction) |
| C1 JIT 生成コードからのダイナミックディスパッチ | (#Under Construction) |
| C2 JIT 生成コードからのダイナミックディスパッチ | (See: here for details) |
| Shark JIT 生成コードからのダイナミックディスパッチ | (#Under Construction) |
| JNI からのダイナミックディスパッチ | (See: here for details) |
This document is available under the GNU GENERAL PUBLIC LICENSE Version 2.