src/hotspot/share/oops/instanceKlass.cpp
changeset 52514 f4e3900c8d08
parent 52356 19c4a3eec4d7
child 52619 5b4242996d8c
equal deleted inserted replaced
52513:d4f3e37d1fda 52514:f4e3900c8d08
   420   _nest_host_index(0),
   420   _nest_host_index(0),
   421   _nest_host(NULL),
   421   _nest_host(NULL),
   422   _static_field_size(parser.static_field_size()),
   422   _static_field_size(parser.static_field_size()),
   423   _nonstatic_oop_map_size(nonstatic_oop_map_size(parser.total_oop_map_count())),
   423   _nonstatic_oop_map_size(nonstatic_oop_map_size(parser.total_oop_map_count())),
   424   _itable_len(parser.itable_size()),
   424   _itable_len(parser.itable_size()),
   425   _reference_type(parser.reference_type()) {
   425   _reference_type(parser.reference_type())
   426     set_vtable_length(parser.vtable_size());
   426 {
   427     set_kind(kind);
   427   set_vtable_length(parser.vtable_size());
   428     set_access_flags(parser.access_flags());
   428   set_kind(kind);
   429     set_is_unsafe_anonymous(parser.is_unsafe_anonymous());
   429   set_access_flags(parser.access_flags());
   430     set_layout_helper(Klass::instance_layout_helper(parser.layout_size(),
   430   set_is_unsafe_anonymous(parser.is_unsafe_anonymous());
       
   431   set_layout_helper(Klass::instance_layout_helper(parser.layout_size(),
   431                                                     false));
   432                                                     false));
   432 
   433 
   433     assert(NULL == _methods, "underlying memory not zeroed?");
   434   assert(NULL == _methods, "underlying memory not zeroed?");
   434     assert(is_instance_klass(), "is layout incorrect?");
   435   assert(is_instance_klass(), "is layout incorrect?");
   435     assert(size_helper() == parser.layout_size(), "incorrect size_helper?");
   436   assert(size_helper() == parser.layout_size(), "incorrect size_helper?");
       
   437 
       
   438   if (DumpSharedSpaces) {
       
   439     SystemDictionaryShared::init_dumptime_info(this);
       
   440   }
   436 }
   441 }
   437 
   442 
   438 void InstanceKlass::deallocate_methods(ClassLoaderData* loader_data,
   443 void InstanceKlass::deallocate_methods(ClassLoaderData* loader_data,
   439                                        Array<Method*>* methods) {
   444                                        Array<Method*>* methods) {
   440   if (methods != NULL && methods != Universe::the_empty_method_array() &&
   445   if (methods != NULL && methods != Universe::the_empty_method_array() &&
   577   // We should deallocate the Annotations instance if it's not in shared spaces.
   582   // We should deallocate the Annotations instance if it's not in shared spaces.
   578   if (annotations() != NULL && !annotations()->is_shared()) {
   583   if (annotations() != NULL && !annotations()->is_shared()) {
   579     MetadataFactory::free_metadata(loader_data, annotations());
   584     MetadataFactory::free_metadata(loader_data, annotations());
   580   }
   585   }
   581   set_annotations(NULL);
   586   set_annotations(NULL);
       
   587 
       
   588   if (DumpSharedSpaces) {
       
   589     SystemDictionaryShared::remove_dumptime_info(this);
       
   590   }
   582 }
   591 }
   583 
   592 
   584 bool InstanceKlass::should_be_initialized() const {
   593 bool InstanceKlass::should_be_initialized() const {
   585   return !is_initialized();
   594   return !is_initialized();
   586 }
   595 }