Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8264732: Clean up LinkResolver::vtable_index_of_interface_method() #3346

Changes from 1 commit
File filter
Filter file types
Jump to
Jump to file
Failed to load files.


Just for now

@@ -3193,28 +3193,28 @@ Method* InstanceKlass::method_at_itable_or_null(InstanceKlass* holder, int index

int InstanceKlass::vtable_index_of_interface_method(Method* intf_method) {
assert(this->is_linked(), "required");
assert(is_linked(), "required");
assert(intf_method->method_holder()->is_interface(), "not an interface method");
assert(this->is_subtype_of(intf_method->method_holder()), "interface not implemented");
assert(is_subtype_of(intf_method->method_holder()), "interface not implemented");

int vtable_index = Method::invalid_vtable_index;
Symbol* name = intf_method->name();
Symbol* signature = intf_method->signature();

// First check in default method array
if (!intf_method->is_abstract() && this->default_methods() != NULL) {
int index = InstanceKlass::find_method_index(this->default_methods(),
name, signature,
if (index >= 0 ) {
vtable_index = this->default_vtable_indices()->at(index);
if (!intf_method->is_abstract() && default_methods() != NULL) {
int index = find_method_index(default_methods(),
name, signature,
if (index >= 0) {
vtable_index = default_vtable_indices()->at(index);
if (vtable_index == Method::invalid_vtable_index) {
// get vtable_index for miranda methods
klassVtable vt = this->vtable();
klassVtable vt = vtable();
vtable_index = vt.index_of_miranda(name, signature);
return vtable_index;
ProTip! Use n and p to navigate between commits in a pull request.