1446 // Update the version number of the constant pool |
1446 // Update the version number of the constant pool |
1447 merge_cp->increment_and_save_version(old_cp->version()); |
1447 merge_cp->increment_and_save_version(old_cp->version()); |
1448 |
1448 |
1449 ResourceMark rm(THREAD); |
1449 ResourceMark rm(THREAD); |
1450 _index_map_count = 0; |
1450 _index_map_count = 0; |
1451 _index_map_p = new intArray(scratch_cp->length(), -1); |
1451 _index_map_p = new intArray(scratch_cp->length(), scratch_cp->length(), -1); |
1452 |
1452 |
1453 _operands_cur_length = ConstantPool::operand_array_length(old_cp->operands()); |
1453 _operands_cur_length = ConstantPool::operand_array_length(old_cp->operands()); |
1454 _operands_index_map_count = 0; |
1454 _operands_index_map_count = 0; |
1455 _operands_index_map_p = new intArray( |
1455 int operands_index_map_len = ConstantPool::operand_array_length(scratch_cp->operands()); |
1456 ConstantPool::operand_array_length(scratch_cp->operands()), -1); |
1456 _operands_index_map_p = new intArray(operands_index_map_len, operands_index_map_len, -1); |
1457 |
1457 |
1458 // reference to the cp holder is needed for copy_operands() |
1458 // reference to the cp holder is needed for copy_operands() |
1459 merge_cp->set_pool_holder(scratch_class()); |
1459 merge_cp->set_pool_holder(scratch_class()); |
1460 bool result = merge_constant_pools(old_cp, scratch_cp, &merge_cp, |
1460 bool result = merge_constant_pools(old_cp, scratch_cp, &merge_cp, |
1461 &merge_cp_length, THREAD); |
1461 &merge_cp_length, THREAD); |