1080 newm->constMethod()->set_code_size(new_code_length); |
1080 newm->constMethod()->set_code_size(new_code_length); |
1081 newm->constMethod()->set_constMethod_size(new_const_method_size); |
1081 newm->constMethod()->set_constMethod_size(new_const_method_size); |
1082 newm->set_method_size(new_method_size); |
1082 newm->set_method_size(new_method_size); |
1083 assert(newm->code_size() == new_code_length, "check"); |
1083 assert(newm->code_size() == new_code_length, "check"); |
1084 assert(newm->checked_exceptions_length() == checked_exceptions_len, "check"); |
1084 assert(newm->checked_exceptions_length() == checked_exceptions_len, "check"); |
|
1085 assert(newm->exception_table_length() == exception_table_len, "check"); |
1085 assert(newm->localvariable_table_length() == localvariable_len, "check"); |
1086 assert(newm->localvariable_table_length() == localvariable_len, "check"); |
1086 // Copy new byte codes |
1087 // Copy new byte codes |
1087 memcpy(newm->code_base(), new_code, new_code_length); |
1088 memcpy(newm->code_base(), new_code, new_code_length); |
1088 // Copy line number table |
1089 // Copy line number table |
1089 if (new_compressed_linenumber_size > 0) { |
1090 if (new_compressed_linenumber_size > 0) { |
1094 // Copy checked_exceptions |
1095 // Copy checked_exceptions |
1095 if (checked_exceptions_len > 0) { |
1096 if (checked_exceptions_len > 0) { |
1096 memcpy(newm->checked_exceptions_start(), |
1097 memcpy(newm->checked_exceptions_start(), |
1097 m->checked_exceptions_start(), |
1098 m->checked_exceptions_start(), |
1098 checked_exceptions_len * sizeof(CheckedExceptionElement)); |
1099 checked_exceptions_len * sizeof(CheckedExceptionElement)); |
|
1100 } |
|
1101 // Copy exception table |
|
1102 if (exception_table_len > 0) { |
|
1103 memcpy(newm->exception_table_start(), |
|
1104 m->exception_table_start(), |
|
1105 exception_table_len * sizeof(ExceptionTableElement)); |
1099 } |
1106 } |
1100 // Copy local variable number table |
1107 // Copy local variable number table |
1101 if (localvariable_len > 0) { |
1108 if (localvariable_len > 0) { |
1102 memcpy(newm->localvariable_table_start(), |
1109 memcpy(newm->localvariable_table_start(), |
1103 m->localvariable_table_start(), |
1110 m->localvariable_table_start(), |