--- old/src/hotspot/share/oops/klassVtable.cpp 2019-03-11 14:26:20.966354950 +0100 +++ new/src/hotspot/share/oops/klassVtable.cpp 2019-03-11 14:26:20.758354953 +0100 @@ -1333,6 +1333,18 @@ virtual void doit(InstanceKlass* intf, int method_count) = 0; }; +int count_interface_methods_needing_itable_index(Array* methods) { + int method_count = 0; + if (methods->length() > 0) { + for (int i = methods->length(); --i >= 0; ) { + if (interface_method_needs_itable_index(methods->at(i))) { + method_count++; + } + } + } + return method_count; +} + // Visit all interfaces with at least one itable method void visit_all_interfaces(Array* transitive_intf, InterfaceVisiterClosure *blk) { // Handle array argument @@ -1401,7 +1413,7 @@ CountInterfacesClosure cic; visit_all_interfaces(transitive_interfaces, &cic); - // There's alway an extra itable entry so we can null-terminate it. + // There's always an extra itable entry so we can null-terminate it. int itable_size = calc_itable_size(cic.nof_interfaces() + 1, cic.nof_methods()); // Statistics