diff -r 32baebe49efe -r 70aab0c2ea8b hotspot/src/share/vm/oops/instanceKlass.cpp --- a/hotspot/src/share/vm/oops/instanceKlass.cpp Mon Apr 24 21:34:24 2017 +0200 +++ b/hotspot/src/share/vm/oops/instanceKlass.cpp Thu Apr 13 01:56:01 2017 -0700 @@ -373,8 +373,8 @@ return !is_initialized(); } -klassItable* InstanceKlass::itable() const { - return new klassItable(const_cast(this)); +klassItable InstanceKlass::itable() const { + return klassItable(const_cast(this)); } void InstanceKlass::eager_initialize(Thread *thread) { @@ -621,15 +621,14 @@ if (!(is_shared() && loader_data->is_the_null_class_loader_data())) { ResourceMark rm(THREAD); - vtable()->initialize_vtable(true, CHECK_false); - itable()->initialize_itable(true, CHECK_false); + vtable().initialize_vtable(true, CHECK_false); + itable().initialize_itable(true, CHECK_false); } #ifdef ASSERT else { - ResourceMark rm(THREAD); - vtable()->verify(tty, true); + vtable().verify(tty, true); // In case itable verification is ever added. - // itable()->verify(tty, true); + // itable().verify(tty, true); } #endif set_init_state(linked); @@ -807,8 +806,8 @@ // Step 9 if (!HAS_PENDING_EXCEPTION) { set_initialization_state_and_notify(fully_initialized, CHECK); - { ResourceMark rm(THREAD); - debug_only(vtable()->verify(tty, true);) + { + debug_only(vtable().verify(tty, true);) } } else { @@ -2041,8 +2040,8 @@ // vtables in the shared system dictionary, only the main one. // It also redefines the itable too so fix that too. ResourceMark rm(THREAD); - vtable()->initialize_vtable(false, CHECK); - itable()->initialize_itable(false, CHECK); + vtable().initialize_vtable(false, CHECK); + itable().initialize_itable(false, CHECK); } // restore constant pool resolved references @@ -3212,10 +3211,9 @@ // Verify vtables if (is_linked()) { - ResourceMark rm; // $$$ This used to be done only for m/s collections. Doing it // always seemed a valid generalization. (DLD -- 6/00) - vtable()->verify(st); + vtable().verify(st); } // Verify first subklass