mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8140485: Class load and creation cleanup
Reviewed-by: hseigel, coleenp, sspitsyn
This commit is contained in:
parent
24c8c40bb8
commit
2ad9d3192f
59 changed files with 4174 additions and 3258 deletions
|
@ -30,6 +30,7 @@
|
|||
#include "memory/allocation.hpp"
|
||||
#include "memory/metadataFactory.hpp"
|
||||
#include "memory/resourceArea.hpp"
|
||||
#include "runtime/handles.inline.hpp"
|
||||
#include "runtime/signature.hpp"
|
||||
#include "runtime/thread.hpp"
|
||||
#include "oops/instanceKlass.hpp"
|
||||
|
@ -606,7 +607,7 @@ static bool already_in_vtable_slots(GrowableArray<EmptyVtableSlot*>* slots, Meth
|
|||
}
|
||||
|
||||
static GrowableArray<EmptyVtableSlot*>* find_empty_vtable_slots(
|
||||
InstanceKlass* klass, GrowableArray<Method*>* mirandas, TRAPS) {
|
||||
InstanceKlass* klass, const GrowableArray<Method*>* mirandas, TRAPS) {
|
||||
|
||||
assert(klass != NULL, "Must be valid class");
|
||||
|
||||
|
@ -777,7 +778,8 @@ static void create_default_methods( InstanceKlass* klass,
|
|||
// candidate). These methods are then added to the class's method list.
|
||||
// The JVM does not create bridges nor handle generic signatures here.
|
||||
void DefaultMethods::generate_default_methods(
|
||||
InstanceKlass* klass, GrowableArray<Method*>* mirandas, TRAPS) {
|
||||
InstanceKlass* klass, const GrowableArray<Method*>* mirandas, TRAPS) {
|
||||
assert(klass != NULL, "invariant");
|
||||
|
||||
// This resource mark is the bound for all memory allocation that takes
|
||||
// place during default method processing. After this goes out of scope,
|
||||
|
@ -787,6 +789,7 @@ void DefaultMethods::generate_default_methods(
|
|||
ResourceMark rm(THREAD);
|
||||
|
||||
// Keep entire hierarchy alive for the duration of the computation
|
||||
constantPoolHandle cp(THREAD, klass->constants());
|
||||
KeepAliveRegistrar keepAlive(THREAD);
|
||||
KeepAliveVisitor loadKeepAlive(&keepAlive);
|
||||
loadKeepAlive.run(klass);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue