mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8021948: Change InstanceKlass::_source_file_name and _generic_signature from Symbol* to constant pool indexes
Change InstanceKlass::_source_file_name and _generic_signature to u2 fields. Reviewed-by: coleenp, iklam
This commit is contained in:
parent
2c28ff340a
commit
553b498f51
7 changed files with 67 additions and 42 deletions
|
@ -1554,6 +1554,20 @@ bool VM_RedefineClasses::rewrite_cp_refs(instanceKlassHandle scratch_class,
|
|||
return false;
|
||||
}
|
||||
|
||||
// rewrite sourc file name index:
|
||||
u2 source_file_name_idx = scratch_class->source_file_name_index();
|
||||
if (source_file_name_idx != 0) {
|
||||
u2 new_source_file_name_idx = find_new_index(source_file_name_idx);
|
||||
scratch_class->set_source_file_name_index(new_source_file_name_idx);
|
||||
}
|
||||
|
||||
// rewrite class generic signature index:
|
||||
u2 generic_signature_index = scratch_class->generic_signature_index();
|
||||
if (generic_signature_index != 0) {
|
||||
u2 new_generic_signature_index = find_new_index(generic_signature_index);
|
||||
scratch_class->set_generic_signature_index(new_generic_signature_index);
|
||||
}
|
||||
|
||||
return true;
|
||||
} // end rewrite_cp_refs()
|
||||
|
||||
|
@ -3370,7 +3384,8 @@ void VM_RedefineClasses::redefine_single_class(jclass the_jclass,
|
|||
// Leave arrays of jmethodIDs and itable index cache unchanged
|
||||
|
||||
// Copy the "source file name" attribute from new class version
|
||||
the_class->set_source_file_name(scratch_class->source_file_name());
|
||||
the_class->set_source_file_name_index(
|
||||
scratch_class->source_file_name_index());
|
||||
|
||||
// Copy the "source debug extension" attribute from new class version
|
||||
the_class->set_source_debug_extension(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue