comparison src/share/vm/classfile/classFileParser.cpp @ 10343:6bd680e9ea35

8003421: NPG: Move oops out of InstanceKlass into mirror Summary: Inject protection_domain, signers, init_lock into java_lang_Class Reviewed-by: stefank, dholmes, sla
author coleenp
date Wed, 22 May 2013 14:37:49 -0400
parents ccdecfece956
children 3970971c91e0
comparison
equal deleted inserted replaced
10342:1a07e086ff28 10343:6bd680e9ea35
4038 if (_major_version < JAVA_8_VERSION) { 4038 if (_major_version < JAVA_8_VERSION) {
4039 check_illegal_static_method(this_klass, CHECK_(nullHandle)); 4039 check_illegal_static_method(this_klass, CHECK_(nullHandle));
4040 } 4040 }
4041 } 4041 }
4042 4042
4043 // Allocate mirror and initialize static fields
4044 java_lang_Class::create_mirror(this_klass, protection_domain, CHECK_(nullHandle));
4045
4043 4046
4044 #ifdef ASSERT 4047 #ifdef ASSERT
4045 if (ParseAllGenericSignatures) { 4048 if (ParseAllGenericSignatures) {
4046 parseAndPrintGenericSignatures(this_klass, CHECK_(nullHandle)); 4049 parseAndPrintGenericSignatures(this_klass, CHECK_(nullHandle));
4047 } 4050 }
4052 if (has_default_methods && !access_flags.is_interface() && 4055 if (has_default_methods && !access_flags.is_interface() &&
4053 local_interfaces->length() > 0) { 4056 local_interfaces->length() > 0) {
4054 DefaultMethods::generate_default_methods( 4057 DefaultMethods::generate_default_methods(
4055 this_klass(), &all_mirandas, CHECK_(nullHandle)); 4058 this_klass(), &all_mirandas, CHECK_(nullHandle));
4056 } 4059 }
4057
4058 // Allocate mirror and initialize static fields
4059 java_lang_Class::create_mirror(this_klass, CHECK_(nullHandle));
4060
4061 // Allocate a simple java object for locking during class initialization.
4062 // This needs to be a java object because it can be held across a java call.
4063 typeArrayOop r = oopFactory::new_typeArray(T_INT, 0, CHECK_NULL);
4064 this_klass->set_init_lock(r);
4065
4066 // TODO: Move these oops to the mirror
4067 this_klass->set_protection_domain(protection_domain());
4068 4060
4069 // Update the loader_data graph. 4061 // Update the loader_data graph.
4070 record_defined_class_dependencies(this_klass, CHECK_NULL); 4062 record_defined_class_dependencies(this_klass, CHECK_NULL);
4071 4063
4072 ClassLoadingService::notify_class_loaded(InstanceKlass::cast(this_klass()), 4064 ClassLoadingService::notify_class_loaded(InstanceKlass::cast(this_klass()),