< prev index next >

src/hotspot/share/classfile/classFileParser.cpp

Print this page




5407   assert(NULL == _cp, "invariant");
5408   assert(NULL == _fields, "invariant");
5409   assert(NULL == _methods, "invariant");
5410   assert(NULL == _inner_classes, "invariant");
5411   assert(NULL == _local_interfaces, "invariant");
5412   assert(NULL == _transitive_interfaces, "invariant");
5413   assert(NULL == _combined_annotations, "invariant");
5414 
5415   if (_has_final_method) {
5416     ik->set_has_final_method();
5417   }
5418 
5419   ik->copy_method_ordering(_method_ordering, CHECK);
5420   // The InstanceKlass::_methods_jmethod_ids cache
5421   // is managed on the assumption that the initial cache
5422   // size is equal to the number of methods in the class. If
5423   // that changes, then InstanceKlass::idnum_can_increment()
5424   // has to be changed accordingly.
5425   ik->set_initial_method_idnum(ik->methods()->length());
5426 


5427   if (is_anonymous()) {
5428     // _this_class_index is a CONSTANT_Class entry that refers to this
5429     // anonymous class itself. If this class needs to refer to its own methods or
5430     // fields, it would use a CONSTANT_MethodRef, etc, which would reference
5431     // _this_class_index. However, because this class is anonymous (it's
5432     // not stored in SystemDictionary), _this_class_index cannot be resolved
5433     // with ConstantPool::klass_at_impl, which does a SystemDictionary lookup.
5434     // Therefore, we must eagerly resolve _this_class_index now.
5435     ik->constants()->klass_at_put(_this_class_index, ik);
5436   }
5437 
5438   ik->set_minor_version(_minor_version);
5439   ik->set_major_version(_major_version);
5440   ik->set_has_nonstatic_concrete_methods(_has_nonstatic_concrete_methods);
5441   ik->set_declares_nonstatic_concrete_methods(_declares_nonstatic_concrete_methods);
5442 
5443   if (_host_klass != NULL) {
5444     assert (ik->is_anonymous(), "should be the same");
5445     ik->set_host_klass(_host_klass);
5446   }




5407   assert(NULL == _cp, "invariant");
5408   assert(NULL == _fields, "invariant");
5409   assert(NULL == _methods, "invariant");
5410   assert(NULL == _inner_classes, "invariant");
5411   assert(NULL == _local_interfaces, "invariant");
5412   assert(NULL == _transitive_interfaces, "invariant");
5413   assert(NULL == _combined_annotations, "invariant");
5414 
5415   if (_has_final_method) {
5416     ik->set_has_final_method();
5417   }
5418 
5419   ik->copy_method_ordering(_method_ordering, CHECK);
5420   // The InstanceKlass::_methods_jmethod_ids cache
5421   // is managed on the assumption that the initial cache
5422   // size is equal to the number of methods in the class. If
5423   // that changes, then InstanceKlass::idnum_can_increment()
5424   // has to be changed accordingly.
5425   ik->set_initial_method_idnum(ik->methods()->length());
5426 
5427   ik->set_this_class_index(_this_class_index);
5428 
5429   if (is_anonymous()) {
5430     // _this_class_index is a CONSTANT_Class entry that refers to this
5431     // anonymous class itself. If this class needs to refer to its own methods or
5432     // fields, it would use a CONSTANT_MethodRef, etc, which would reference
5433     // _this_class_index. However, because this class is anonymous (it's
5434     // not stored in SystemDictionary), _this_class_index cannot be resolved
5435     // with ConstantPool::klass_at_impl, which does a SystemDictionary lookup.
5436     // Therefore, we must eagerly resolve _this_class_index now.
5437     ik->constants()->klass_at_put(_this_class_index, ik);
5438   }
5439 
5440   ik->set_minor_version(_minor_version);
5441   ik->set_major_version(_major_version);
5442   ik->set_has_nonstatic_concrete_methods(_has_nonstatic_concrete_methods);
5443   ik->set_declares_nonstatic_concrete_methods(_declares_nonstatic_concrete_methods);
5444 
5445   if (_host_klass != NULL) {
5446     assert (ik->is_anonymous(), "should be the same");
5447     ik->set_host_klass(_host_klass);
5448   }


< prev index next >