< prev index next >

src/hotspot/share/oops/method.cpp

Print this page

        

*** 1093,1103 **** } return adapter->get_c2i_entry(); } void Method::restore_unshareable_info(TRAPS) { ! assert(is_method() && is_valid_method(), "ensure C++ vtable is restored"); // Since restore_unshareable_info can be called more than once for a method, don't // redo any work. if (adapter() == NULL) { methodHandle mh(THREAD, this); --- 1093,1103 ---- } return adapter->get_c2i_entry(); } void Method::restore_unshareable_info(TRAPS) { ! assert(is_method() && is_valid_method(this), "ensure C++ vtable is restored"); // Since restore_unshareable_info can be called more than once for a method, don't // redo any work. if (adapter() == NULL) { methodHandle mh(THREAD, this);
*** 2164,2183 **** // This assumes that the vtbl pointer is the first word of a C++ object. return dereference_vptr(&m) == dereference_vptr(ptr); } // Check that this pointer is valid by checking that the vtbl pointer matches ! bool Method::is_valid_method() const { ! if (this == NULL) { return false; ! } else if ((intptr_t(this) & (wordSize-1)) != 0) { // Quick sanity check on pointer. return false; ! } else if (is_shared()) { ! return MetaspaceShared::is_valid_shared_method(this); ! } else if (Metaspace::contains_non_shared(this)) { ! return has_method_vptr((const void*)this); } else { return false; } } --- 2164,2183 ---- // This assumes that the vtbl pointer is the first word of a C++ object. return dereference_vptr(&m) == dereference_vptr(ptr); } // Check that this pointer is valid by checking that the vtbl pointer matches ! bool Method::is_valid_method(const Method* m) { ! if (m == NULL) { return false; ! } else if ((intptr_t(m) & (wordSize-1)) != 0) { // Quick sanity check on pointer. return false; ! } else if (m->is_shared()) { ! return MetaspaceShared::is_valid_shared_method(m); ! } else if (Metaspace::contains_non_shared(m)) { ! return has_method_vptr((const void*)m); } else { return false; } }
< prev index next >