comparison src/share/vm/oops/klass.cpp @ 12264:b2e698d2276c

8014013: CallInfo structure no longer accurately reports the result of a LinkResolver operation Summary: Enhance method resolution and resulting data structures, plus some refactoring. Reviewed-by: twisti, acorn, jrose
author drchase
date Fri, 13 Sep 2013 22:38:02 -0400
parents 9758d9f36299
children cefad50507d8 ce86c36b8921 096a7e12d63f
comparison
equal deleted inserted replaced
12261:2c98370f2611 12264:b2e698d2276c
672 guarantee(obj->klass()->is_klass(), "klass field is not a klass"); 672 guarantee(obj->klass()->is_klass(), "klass field is not a klass");
673 } 673 }
674 674
675 #ifndef PRODUCT 675 #ifndef PRODUCT
676 676
677 void Klass::verify_vtable_index(int i) { 677 bool Klass::verify_vtable_index(int i) {
678 if (oop_is_instance()) { 678 if (oop_is_instance()) {
679 assert(i>=0 && i<((InstanceKlass*)this)->vtable_length()/vtableEntry::size(), "index out of bounds"); 679 int limit = ((InstanceKlass*)this)->vtable_length()/vtableEntry::size();
680 assert(i >= 0 && i < limit, err_msg("index %d out of bounds %d", i, limit));
680 } else { 681 } else {
681 assert(oop_is_array(), "Must be"); 682 assert(oop_is_array(), "Must be");
682 assert(i>=0 && i<((ArrayKlass*)this)->vtable_length()/vtableEntry::size(), "index out of bounds"); 683 int limit = ((ArrayKlass*)this)->vtable_length()/vtableEntry::size();
683 } 684 assert(i >= 0 && i < limit, err_msg("index %d out of bounds %d", i, limit));
685 }
686 return true;
687 }
688
689 bool Klass::verify_itable_index(int i) {
690 assert(oop_is_instance(), "");
691 int method_count = klassItable::method_count_for_interface(this);
692 assert(i >= 0 && i < method_count, "index out of bounds");
693 return true;
684 } 694 }
685 695
686 #endif 696 #endif