< prev index next >

src/hotspot/share/classfile/classFileParser.cpp

Print this page

        

*** 4379,4397 **** return; } else { // add super class dependency Klass* const super = defined_klass->super(); if (super != NULL) { ! defining_loader_data->record_dependency(super, CHECK); } // add super interface dependencies const Array<Klass*>* const local_interfaces = defined_klass->local_interfaces(); if (local_interfaces != NULL) { const int length = local_interfaces->length(); for (int i = 0; i < length; i++) { ! defining_loader_data->record_dependency(local_interfaces->at(i), CHECK); } } } } --- 4379,4397 ---- return; } else { // add super class dependency Klass* const super = defined_klass->super(); if (super != NULL) { ! defining_loader_data->record_dependency(super); } // add super interface dependencies const Array<Klass*>* const local_interfaces = defined_klass->local_interfaces(); if (local_interfaces != NULL) { const int length = local_interfaces->length(); for (int i = 0; i < length; i++) { ! defining_loader_data->record_dependency(local_interfaces->at(i)); } } } }
*** 5360,5369 **** --- 5360,5379 ---- } void ClassFileParser::fill_instance_klass(InstanceKlass* ik, bool changed_by_loadhook, TRAPS) { assert(ik != NULL, "invariant"); + // Set name and CLD before adding to CLD + ik->set_class_loader_data(_loader_data); + ik->set_name(_class_name); + + // Add all classes to our internal class loader list here, + // including classes in the bootstrap (NULL) class loader. + const bool publicize = !is_internal(); + + _loader_data->add_class(ik, publicize); + set_klass_to_deallocate(ik); assert(_field_info != NULL, "invariant"); assert(ik->static_field_size() == _field_info->static_field_size, "sanity"); assert(ik->nonstatic_oop_map_count() == _field_info->total_oop_map_count,
*** 5374,5384 **** // Fill in information already parsed ik->set_should_verify_class(_need_verify); // Not yet: supers are done below to support the new subtype-checking fields - ik->set_class_loader_data(_loader_data); ik->set_nonstatic_field_size(_field_info->nonstatic_field_size); ik->set_has_nonstatic_fields(_field_info->has_nonstatic_fields); assert(_fac != NULL, "invariant"); ik->set_static_oop_field_count(_fac->count[STATIC_OOP]); --- 5384,5393 ----
*** 5405,5416 **** // size is equal to the number of methods in the class. If // that changes, then InstanceKlass::idnum_can_increment() // has to be changed accordingly. ik->set_initial_method_idnum(ik->methods()->length()); - ik->set_name(_class_name); - if (is_anonymous()) { // _this_class_index is a CONSTANT_Class entry that refers to this // anonymous class itself. If this class needs to refer to its own methods or // fields, it would use a CONSTANT_MethodRef, etc, which would reference // _this_class_index. However, because this class is anonymous (it's --- 5414,5423 ----
< prev index next >