comparison src/share/vm/prims/jvmtiRedefineClasses.cpp @ 11173:6b0fd0964b87

Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/
author Doug Simon <doug.simon@oracle.com>
date Wed, 31 Jul 2013 11:00:54 +0200
parents 825e6cb66923
children 85147f28faba
comparison
equal deleted inserted replaced
10912:4ea54634f03e 11173:6b0fd0964b87
3340 // with them was cached on the scratch class, move to the_class. 3340 // with them was cached on the scratch class, move to the_class.
3341 // Note: we still want to do this if nothing needed caching since it 3341 // Note: we still want to do this if nothing needed caching since it
3342 // should get cleared in the_class too. 3342 // should get cleared in the_class too.
3343 if (the_class->get_cached_class_file_bytes() == 0) { 3343 if (the_class->get_cached_class_file_bytes() == 0) {
3344 // the_class doesn't have a cache yet so copy it 3344 // the_class doesn't have a cache yet so copy it
3345 the_class->set_cached_class_file( 3345 the_class->set_cached_class_file(scratch_class->get_cached_class_file());
3346 scratch_class->get_cached_class_file_bytes(),
3347 scratch_class->get_cached_class_file_len());
3348 } 3346 }
3349 #ifndef PRODUCT 3347 #ifndef PRODUCT
3350 else { 3348 else {
3351 assert(the_class->get_cached_class_file_bytes() == 3349 assert(the_class->get_cached_class_file_bytes() ==
3352 scratch_class->get_cached_class_file_bytes(), "cache ptrs must match"); 3350 scratch_class->get_cached_class_file_bytes(), "cache ptrs must match");
3355 } 3353 }
3356 #endif 3354 #endif
3357 3355
3358 // NULL out in scratch class to not delete twice. The class to be redefined 3356 // NULL out in scratch class to not delete twice. The class to be redefined
3359 // always owns these bytes. 3357 // always owns these bytes.
3360 scratch_class->set_cached_class_file(NULL, 0); 3358 scratch_class->set_cached_class_file(NULL);
3361 3359
3362 // Replace inner_classes 3360 // Replace inner_classes
3363 Array<u2>* old_inner_classes = the_class->inner_classes(); 3361 Array<u2>* old_inner_classes = the_class->inner_classes();
3364 the_class->set_inner_classes(scratch_class->inner_classes()); 3362 the_class->set_inner_classes(scratch_class->inner_classes());
3365 scratch_class->set_inner_classes(old_inner_classes); 3363 scratch_class->set_inner_classes(old_inner_classes);