comparison src/share/vm/prims/jvmtiRedefineClasses.cpp @ 12067:e22ee8e7ae62

8021948: Change InstanceKlass::_source_file_name and _generic_signature from Symbol* to constant pool indexes. Summary: Change InstanceKlass::_source_file_name and _generic_signature to u2 fields. Reviewed-by: coleenp, iklam
author jiangli
date Mon, 19 Aug 2013 14:59:54 -0400
parents 85147f28faba
children ff2520b97b00
comparison
equal deleted inserted replaced
12061:e5003079dfa5 12067:e22ee8e7ae62
1550 // rewrite constant pool references in the methods_default_annotations: 1550 // rewrite constant pool references in the methods_default_annotations:
1551 if (!rewrite_cp_refs_in_methods_default_annotations(scratch_class, 1551 if (!rewrite_cp_refs_in_methods_default_annotations(scratch_class,
1552 THREAD)) { 1552 THREAD)) {
1553 // propagate failure back to caller 1553 // propagate failure back to caller
1554 return false; 1554 return false;
1555 }
1556
1557 // rewrite sourc file name index:
1558 u2 source_file_name_idx = scratch_class->source_file_name_index();
1559 if (source_file_name_idx != 0) {
1560 u2 new_source_file_name_idx = find_new_index(source_file_name_idx);
1561 scratch_class->set_source_file_name_index(new_source_file_name_idx);
1562 }
1563
1564 // rewrite class generic signature index:
1565 u2 generic_signature_index = scratch_class->generic_signature_index();
1566 if (generic_signature_index != 0) {
1567 u2 new_generic_signature_index = find_new_index(generic_signature_index);
1568 scratch_class->set_generic_signature_index(new_generic_signature_index);
1555 } 1569 }
1556 1570
1557 return true; 1571 return true;
1558 } // end rewrite_cp_refs() 1572 } // end rewrite_cp_refs()
1559 1573
3368 } 3382 }
3369 3383
3370 // Leave arrays of jmethodIDs and itable index cache unchanged 3384 // Leave arrays of jmethodIDs and itable index cache unchanged
3371 3385
3372 // Copy the "source file name" attribute from new class version 3386 // Copy the "source file name" attribute from new class version
3373 the_class->set_source_file_name(scratch_class->source_file_name()); 3387 the_class->set_source_file_name_index(
3388 scratch_class->source_file_name_index());
3374 3389
3375 // Copy the "source debug extension" attribute from new class version 3390 // Copy the "source debug extension" attribute from new class version
3376 the_class->set_source_debug_extension( 3391 the_class->set_source_debug_extension(
3377 scratch_class->source_debug_extension(), 3392 scratch_class->source_debug_extension(),
3378 scratch_class->source_debug_extension() == NULL ? 0 : 3393 scratch_class->source_debug_extension() == NULL ? 0 :