src/share/vm/oops/klassVtable.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File
*** old/src/share/vm/oops/klassVtable.cpp	Thu Apr 16 13:30:52 2015
--- new/src/share/vm/oops/klassVtable.cpp	Thu Apr 16 13:30:52 2015

*** 274,284 **** --- 274,284 ---- if (vtable_index < ssVtable->length()) { Method* super_method = ssVtable->method_at(vtable_index); #ifndef PRODUCT Symbol* name= target_method()->name(); Symbol* signature = target_method()->signature(); ! assert(super_method->name() == name && super_method->signature() == signature, "vtable entry name/sig mismatch"); ! assert(super_method->name()->equals(name) && super_method->signature()->equals(signature), "vtable entry name/sig mismatch"); #endif if (supersuperklass->is_override(super_method, target_loader, target_classname, THREAD)) { #ifndef PRODUCT if (PrintVtables && Verbose) { ResourceMark rm(THREAD);
*** 340,350 **** --- 340,350 ---- // If we allocate a vtable entry, we will update it to a non-negative number. target_method()->set_vtable_index(Method::nonvirtual_vtable_index); } // Static and <init> methods are never in ! if (target_method()->is_static() || target_method()->name() == vmSymbols::object_initializer_name()) { ! if (target_method()->is_static() || target_method()->name()->equals(vmSymbols::object_initializer_name())) { return false; } if (target_method->is_final_method(klass->access_flags())) { // a final method never needs a new entry; final methods can be statically
*** 397,407 **** --- 397,407 ---- Symbol* target_classname = target_klass->name(); for(int i = 0; i < super_vtable_len; i++) { Method* super_method = method_at(i); // Check if method name matches ! if (super_method->name() == name && super_method->signature() == signature) { ! if (super_method->name()->equals(name) && super_method->signature()->equals(signature)) { // get super_klass for method_holder for the found method InstanceKlass* super_klass = super_method->method_holder(); if (is_default
*** 571,581 **** --- 571,581 ---- // a final method never needs a new entry; final methods can be statically // resolved and they have to be present in the vtable only if they override // a super's method, in which case they re-use its entry (target_method()->is_static()) || // static methods don't need to be in vtable ! (target_method()->name() == vmSymbols::object_initializer_name()) ! (target_method()->name()->equals(vmSymbols::object_initializer_name())) // <init> is never called dynamically-bound ) { return false; }
*** 661,671 **** --- 661,671 ---- int klassVtable::index_of_miranda(Symbol* name, Symbol* signature) { // search from the bottom, might be faster for (int i = (length() - 1); i >= 0; i--) { Method* m = table()[i].method(); if (is_miranda_entry_at(i) && ! m->name() == name && m->signature() == signature) { ! m->name()->equals(name) && m->signature()->equals(signature)) { return i; } } return Method::invalid_vtable_index; }
*** 756,767 **** --- 756,767 ---- bool is_duplicate = false; int num_of_current_mirandas = new_mirandas->length(); // check for duplicate mirandas in different interfaces we implement for (int j = 0; j < num_of_current_mirandas; j++) { Method* miranda = new_mirandas->at(j); ! if ((im->name() == miranda->name()) && ! (im->signature() == miranda->signature())) { ! if ((im->name()->equals(miranda->name())) && ! (im->signature()->equals(miranda->signature()))) { is_duplicate = true; break; } }
*** 1430,1441 **** --- 1430,1441 ---- } } void klassVtable::verify_against(outputStream* st, klassVtable* vt, int index) { vtableEntry* vte = &vt->table()[index]; ! if (vte->method()->name() != table()[index].method()->name() || ! vte->method()->signature() != table()[index].method()->signature()) { ! if (vte->method()->name()->not_equals(table()[index].method()->name()) || ! vte->method()->signature()->not_equals(table()[index].method()->signature())) { fatal("mismatched name/signature of vtable entries"); } } #ifndef PRODUCT

src/share/vm/oops/klassVtable.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File