3961 3962 // Fill in information already parsed 3963 this_klass->set_should_verify_class(verify); 3964 jint lh = Klass::instance_layout_helper(info.instance_size, false); 3965 this_klass->set_layout_helper(lh); 3966 assert(this_klass->oop_is_instance(), "layout is correct"); 3967 assert(this_klass->size_helper() == info.instance_size, "correct size_helper"); 3968 // Not yet: supers are done below to support the new subtype-checking fields 3969 //this_klass->set_super(super_klass()); 3970 this_klass->set_class_loader_data(loader_data); 3971 this_klass->set_nonstatic_field_size(info.nonstatic_field_size); 3972 this_klass->set_has_nonstatic_fields(info.has_nonstatic_fields); 3973 this_klass->set_static_oop_field_count(fac.count[STATIC_OOP]); 3974 3975 apply_parsed_class_metadata(this_klass, java_fields_count, CHECK_NULL); 3976 3977 if (has_final_method) { 3978 this_klass->set_has_final_method(); 3979 } 3980 this_klass->copy_method_ordering(method_ordering, CHECK_NULL); 3981 // The InstanceKlass::_methods_jmethod_ids cache and the 3982 // InstanceKlass::_methods_cached_itable_indices cache are 3983 // both managed on the assumption that the initial cache 3984 // size is equal to the number of methods in the class. If 3985 // that changes, then InstanceKlass::idnum_can_increment() 3986 // has to be changed accordingly. 3987 this_klass->set_initial_method_idnum(methods->length()); 3988 this_klass->set_name(cp->klass_name_at(this_class_index)); 3989 if (is_anonymous()) // I am well known to myself 3990 cp->klass_at_put(this_class_index, this_klass()); // eagerly resolve 3991 3992 this_klass->set_minor_version(minor_version); 3993 this_klass->set_major_version(major_version); 3994 this_klass->set_has_default_methods(has_default_methods); 3995 3996 // Set up Method*::intrinsic_id as soon as we know the names of methods. 3997 // (We used to do this lazily, but now we query it in Rewriter, 3998 // which is eagerly done for every method, so we might as well do it now, 3999 // when everything is fresh in memory.) 4000 if (Method::klass_id_for_intrinsics(this_klass()) != vmSymbols::NO_SID) { 4001 for (int j = 0; j < methods->length(); j++) { 4002 methods->at(j)->init_intrinsic_id(); 4003 } | 3961 3962 // Fill in information already parsed 3963 this_klass->set_should_verify_class(verify); 3964 jint lh = Klass::instance_layout_helper(info.instance_size, false); 3965 this_klass->set_layout_helper(lh); 3966 assert(this_klass->oop_is_instance(), "layout is correct"); 3967 assert(this_klass->size_helper() == info.instance_size, "correct size_helper"); 3968 // Not yet: supers are done below to support the new subtype-checking fields 3969 //this_klass->set_super(super_klass()); 3970 this_klass->set_class_loader_data(loader_data); 3971 this_klass->set_nonstatic_field_size(info.nonstatic_field_size); 3972 this_klass->set_has_nonstatic_fields(info.has_nonstatic_fields); 3973 this_klass->set_static_oop_field_count(fac.count[STATIC_OOP]); 3974 3975 apply_parsed_class_metadata(this_klass, java_fields_count, CHECK_NULL); 3976 3977 if (has_final_method) { 3978 this_klass->set_has_final_method(); 3979 } 3980 this_klass->copy_method_ordering(method_ordering, CHECK_NULL); 3981 // The InstanceKlass::_methods_jmethod_ids cache 3982 // is managed on the assumption that the initial cache 3983 // size is equal to the number of methods in the class. If 3984 // that changes, then InstanceKlass::idnum_can_increment() 3985 // has to be changed accordingly. 3986 this_klass->set_initial_method_idnum(methods->length()); 3987 this_klass->set_name(cp->klass_name_at(this_class_index)); 3988 if (is_anonymous()) // I am well known to myself 3989 cp->klass_at_put(this_class_index, this_klass()); // eagerly resolve 3990 3991 this_klass->set_minor_version(minor_version); 3992 this_klass->set_major_version(major_version); 3993 this_klass->set_has_default_methods(has_default_methods); 3994 3995 // Set up Method*::intrinsic_id as soon as we know the names of methods. 3996 // (We used to do this lazily, but now we query it in Rewriter, 3997 // which is eagerly done for every method, so we might as well do it now, 3998 // when everything is fresh in memory.) 3999 if (Method::klass_id_for_intrinsics(this_klass()) != vmSymbols::NO_SID) { 4000 for (int j = 0; j < methods->length(); j++) { 4001 methods->at(j)->init_intrinsic_id(); 4002 } |