mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8003848: Make ConstMethod::generic_signature_index optional and move Method::_max_stack to ConstMethod
Make ConstMethod::generic_signature_index optional and move Method::_max_stack to ConstMethod. Reviewed-by: bdelsart, sspitsyn, coleenp
This commit is contained in:
parent
a054222634
commit
10f71a3f72
13 changed files with 144 additions and 70 deletions
|
@ -64,6 +64,7 @@ Method* Method::allocate(ClassLoaderData* loader_data,
|
|||
int localvariable_table_length,
|
||||
int exception_table_length,
|
||||
int checked_exceptions_length,
|
||||
u2 generic_signature_index,
|
||||
ConstMethod::MethodType method_type,
|
||||
TRAPS) {
|
||||
assert(!access_flags.is_native() || byte_code_size == 0,
|
||||
|
@ -74,6 +75,7 @@ Method* Method::allocate(ClassLoaderData* loader_data,
|
|||
localvariable_table_length,
|
||||
exception_table_length,
|
||||
checked_exceptions_length,
|
||||
generic_signature_index,
|
||||
method_type,
|
||||
CHECK_NULL);
|
||||
|
||||
|
@ -1034,7 +1036,7 @@ methodHandle Method::make_method_handle_intrinsic(vmIntrinsics::ID iid,
|
|||
methodHandle m;
|
||||
{
|
||||
Method* m_oop = Method::allocate(loader_data, 0, accessFlags_from(flags_bits),
|
||||
0, 0, 0, 0, ConstMethod::NORMAL, CHECK_(empty));
|
||||
0, 0, 0, 0, 0, ConstMethod::NORMAL, CHECK_(empty));
|
||||
m = methodHandle(THREAD, m_oop);
|
||||
}
|
||||
m->set_constants(cp());
|
||||
|
@ -1082,6 +1084,7 @@ methodHandle Method::clone_with_new_data(methodHandle m, u_char* new_code, int n
|
|||
assert(!m->is_native(), "cannot rewrite native methods");
|
||||
// Allocate new Method*
|
||||
AccessFlags flags = m->access_flags();
|
||||
u2 generic_signature_index = m->generic_signature_index();
|
||||
int checked_exceptions_len = m->checked_exceptions_length();
|
||||
int localvariable_len = m->localvariable_table_length();
|
||||
int exception_table_len = m->exception_table_length();
|
||||
|
@ -1094,6 +1097,7 @@ methodHandle Method::clone_with_new_data(methodHandle m, u_char* new_code, int n
|
|||
localvariable_len,
|
||||
exception_table_len,
|
||||
checked_exceptions_len,
|
||||
generic_signature_index,
|
||||
m->method_type(),
|
||||
CHECK_(methodHandle()));
|
||||
methodHandle newm (THREAD, newm_oop);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue