hotspot/src/share/vm/oops/instanceKlass.cpp
changeset 23872 536c66fc43d3
parent 23515 f4872ef5df09
child 23873 dc33274a6248
equal deleted inserted replaced
23871:0456e228b90d 23872:536c66fc43d3
  1287     }
  1287     }
  1288   }
  1288   }
  1289 }
  1289 }
  1290 
  1290 
  1291 
  1291 
  1292 void InstanceKlass::do_local_static_fields(void f(fieldDescriptor*, TRAPS), TRAPS) {
  1292 void InstanceKlass::do_local_static_fields(void f(fieldDescriptor*, Handle, TRAPS), Handle mirror, TRAPS) {
  1293   instanceKlassHandle h_this(THREAD, this);
  1293   instanceKlassHandle h_this(THREAD, this);
  1294   do_local_static_fields_impl(h_this, f, CHECK);
  1294   do_local_static_fields_impl(h_this, f, mirror, CHECK);
  1295 }
  1295 }
  1296 
  1296 
  1297 
  1297 
  1298 void InstanceKlass::do_local_static_fields_impl(instanceKlassHandle this_k, void f(fieldDescriptor* fd, TRAPS), TRAPS) {
  1298 void InstanceKlass::do_local_static_fields_impl(instanceKlassHandle this_k,
       
  1299                              void f(fieldDescriptor* fd, Handle, TRAPS), Handle mirror, TRAPS) {
  1299   for (JavaFieldStream fs(this_k()); !fs.done(); fs.next()) {
  1300   for (JavaFieldStream fs(this_k()); !fs.done(); fs.next()) {
  1300     if (fs.access_flags().is_static()) {
  1301     if (fs.access_flags().is_static()) {
  1301       fieldDescriptor& fd = fs.field_descriptor();
  1302       fieldDescriptor& fd = fs.field_descriptor();
  1302       f(&fd, CHECK);
  1303       f(&fd, mirror, CHECK);
  1303     }
  1304     }
  1304   }
  1305   }
  1305 }
  1306 }
  1306 
  1307 
  1307 
  1308 
  2238 
  2239 
  2239   Array<Method*>* methods = ik->methods();
  2240   Array<Method*>* methods = ik->methods();
  2240   int num_methods = methods->length();
  2241   int num_methods = methods->length();
  2241   for (int index2 = 0; index2 < num_methods; ++index2) {
  2242   for (int index2 = 0; index2 < num_methods; ++index2) {
  2242     methodHandle m(THREAD, methods->at(index2));
  2243     methodHandle m(THREAD, methods->at(index2));
  2243     m()->link_method(m, CHECK);
  2244     m->restore_unshareable_info(CHECK);
  2244     // restore method's vtable by calling a virtual function
       
  2245     m->restore_vtable();
       
  2246   }
  2245   }
  2247   if (JvmtiExport::has_redefined_a_class()) {
  2246   if (JvmtiExport::has_redefined_a_class()) {
  2248     // Reinitialize vtable because RedefineClasses may have changed some
  2247     // Reinitialize vtable because RedefineClasses may have changed some
  2249     // entries in this vtable for super classes so the CDS vtable might
  2248     // entries in this vtable for super classes so the CDS vtable might
  2250     // point to old or obsolete entries.  RedefineClasses doesn't fix up
  2249     // point to old or obsolete entries.  RedefineClasses doesn't fix up