3882 } |
3882 } |
3883 verify_legal_class_modifiers(flags, CHECK_(nullHandle)); |
3883 verify_legal_class_modifiers(flags, CHECK_(nullHandle)); |
3884 access_flags.set_flags(flags); |
3884 access_flags.set_flags(flags); |
3885 |
3885 |
3886 // This class and superclass |
3886 // This class and superclass |
3887 u2 this_class_index = cfs->get_u2_fast(); |
3887 _this_class_index = cfs->get_u2_fast(); |
3888 check_property( |
3888 check_property( |
3889 valid_cp_range(this_class_index, cp_size) && |
3889 valid_cp_range(_this_class_index, cp_size) && |
3890 cp->tag_at(this_class_index).is_unresolved_klass(), |
3890 cp->tag_at(_this_class_index).is_unresolved_klass(), |
3891 "Invalid this class index %u in constant pool in class file %s", |
3891 "Invalid this class index %u in constant pool in class file %s", |
3892 this_class_index, CHECK_(nullHandle)); |
3892 _this_class_index, CHECK_(nullHandle)); |
3893 |
3893 |
3894 Symbol* class_name = cp->unresolved_klass_at(this_class_index); |
3894 Symbol* class_name = cp->unresolved_klass_at(_this_class_index); |
3895 assert(class_name != NULL, "class_name can't be null"); |
3895 assert(class_name != NULL, "class_name can't be null"); |
3896 |
3896 |
3897 // It's important to set parsed_name *before* resolving the super class. |
3897 // It's important to set parsed_name *before* resolving the super class. |
3898 // (it's used for cleanup by the caller if parsing fails) |
3898 // (it's used for cleanup by the caller if parsing fails) |
3899 parsed_name = class_name; |
3899 parsed_name = class_name; |
4120 // is managed on the assumption that the initial cache |
4120 // is managed on the assumption that the initial cache |
4121 // size is equal to the number of methods in the class. If |
4121 // size is equal to the number of methods in the class. If |
4122 // that changes, then InstanceKlass::idnum_can_increment() |
4122 // that changes, then InstanceKlass::idnum_can_increment() |
4123 // has to be changed accordingly. |
4123 // has to be changed accordingly. |
4124 this_klass->set_initial_method_idnum(methods->length()); |
4124 this_klass->set_initial_method_idnum(methods->length()); |
4125 this_klass->set_name(cp->klass_name_at(this_class_index)); |
4125 this_klass->set_name(cp->klass_name_at(_this_class_index)); |
4126 if (is_anonymous()) // I am well known to myself |
4126 if (is_anonymous()) // I am well known to myself |
4127 cp->klass_at_put(this_class_index, this_klass()); // eagerly resolve |
4127 cp->klass_at_put(_this_class_index, this_klass()); // eagerly resolve |
4128 |
4128 |
4129 this_klass->set_minor_version(minor_version); |
4129 this_klass->set_minor_version(minor_version); |
4130 this_klass->set_major_version(major_version); |
4130 this_klass->set_major_version(major_version); |
4131 this_klass->set_has_default_methods(has_default_methods); |
4131 this_klass->set_has_default_methods(has_default_methods); |
4132 this_klass->set_declares_default_methods(declares_default_methods); |
4132 this_klass->set_declares_default_methods(declares_default_methods); |
4259 } |
4259 } |
4260 |
4260 |
4261 // preserve result across HandleMark |
4261 // preserve result across HandleMark |
4262 preserve_this_klass = this_klass(); |
4262 preserve_this_klass = this_klass(); |
4263 } |
4263 } |
|
4264 |
|
4265 JFR_ONLY(INIT_ID(preserve_this_klass);) |
4264 |
4266 |
4265 // Create new handle outside HandleMark (might be needed for |
4267 // Create new handle outside HandleMark (might be needed for |
4266 // Extended Class Redefinition) |
4268 // Extended Class Redefinition) |
4267 instanceKlassHandle this_klass (THREAD, preserve_this_klass); |
4269 instanceKlassHandle this_klass (THREAD, preserve_this_klass); |
4268 debug_only(this_klass->verify();) |
4270 debug_only(this_klass->verify();) |