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