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