mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8003419: NPG: Clean up metadata created during class loading if failure
Store metadata on ClassFileParser instance to be cleaned up by destructor. This enabled some refactoring of the enormous parseClassFile function. Reviewed-by: jmasa, acorn
This commit is contained in:
parent
b243475fd2
commit
c5867cb71b
6 changed files with 1155 additions and 1105 deletions
|
@ -67,6 +67,12 @@ ConstMethod::ConstMethod(int byte_code_size,
|
|||
set_size_of_parameters(0);
|
||||
}
|
||||
|
||||
// Accessor that copies to metadata.
|
||||
void ConstMethod::copy_stackmap_data(ClassLoaderData* loader_data,
|
||||
u1* sd, int length, TRAPS) {
|
||||
_stackmap_data = MetadataFactory::new_array<u1>(loader_data, length, CHECK);
|
||||
memcpy((void*)_stackmap_data->adr_at(0), (void*)sd, length);
|
||||
}
|
||||
|
||||
// Deallocate metadata fields associated with ConstMethod*
|
||||
void ConstMethod::deallocate_contents(ClassLoaderData* loader_data) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue