8003421: NPG: Move oops out of InstanceKlass into mirror

Inject protection_domain, signers, init_lock into java_lang_Class

Reviewed-by: stefank, dholmes, sla
This commit is contained in:
Coleen Phillimore 2013-05-22 14:37:49 -04:00
parent a1b903879f
commit 6ed8c8fcea
18 changed files with 130 additions and 136 deletions

View file

@ -4040,6 +4040,9 @@ instanceKlassHandle ClassFileParser::parseClassFile(Symbol* name,
}
}
// Allocate mirror and initialize static fields
java_lang_Class::create_mirror(this_klass, protection_domain, CHECK_(nullHandle));
#ifdef ASSERT
if (ParseAllGenericSignatures) {
@ -4055,17 +4058,6 @@ instanceKlassHandle ClassFileParser::parseClassFile(Symbol* name,
this_klass(), &all_mirandas, CHECK_(nullHandle));
}
// Allocate mirror and initialize static fields
java_lang_Class::create_mirror(this_klass, CHECK_(nullHandle));
// Allocate a simple java object for locking during class initialization.
// This needs to be a java object because it can be held across a java call.
typeArrayOop r = oopFactory::new_typeArray(T_INT, 0, CHECK_NULL);
this_klass->set_init_lock(r);
// TODO: Move these oops to the mirror
this_klass->set_protection_domain(protection_domain());
// Update the loader_data graph.
record_defined_class_dependencies(this_klass, CHECK_NULL);