1.1 --- a/src/share/vm/oops/constantPool.cpp Fri Jan 25 15:06:18 2013 -0500 1.2 +++ b/src/share/vm/oops/constantPool.cpp Mon Jan 28 10:34:07 2013 -0500 1.3 @@ -1099,32 +1099,9 @@ 1.4 } // end compare_entry_to() 1.5 1.6 1.7 -// Copy this constant pool's entries at start_i to end_i (inclusive) 1.8 -// to the constant pool to_cp's entries starting at to_i. A total of 1.9 -// (end_i - start_i) + 1 entries are copied. 1.10 -void ConstantPool::copy_cp_to_impl(constantPoolHandle from_cp, int start_i, int end_i, 1.11 - constantPoolHandle to_cp, int to_i, TRAPS) { 1.12 - 1.13 - int dest_i = to_i; // leave original alone for debug purposes 1.14 - 1.15 - for (int src_i = start_i; src_i <= end_i; /* see loop bottom */ ) { 1.16 - copy_entry_to(from_cp, src_i, to_cp, dest_i, CHECK); 1.17 - 1.18 - switch (from_cp->tag_at(src_i).value()) { 1.19 - case JVM_CONSTANT_Double: 1.20 - case JVM_CONSTANT_Long: 1.21 - // double and long take two constant pool entries 1.22 - src_i += 2; 1.23 - dest_i += 2; 1.24 - break; 1.25 - 1.26 - default: 1.27 - // all others take one constant pool entry 1.28 - src_i++; 1.29 - dest_i++; 1.30 - break; 1.31 - } 1.32 - } 1.33 +void ConstantPool::copy_operands(constantPoolHandle from_cp, 1.34 + constantPoolHandle to_cp, 1.35 + TRAPS) { 1.36 1.37 int from_oplen = operand_array_length(from_cp->operands()); 1.38 int old_oplen = operand_array_length(to_cp->operands()); 1.39 @@ -1180,8 +1157,39 @@ 1.40 to_cp->set_operands(new_operands); 1.41 } 1.42 } 1.43 +} // end copy_operands() 1.44 1.45 -} // end copy_cp_to() 1.46 + 1.47 +// Copy this constant pool's entries at start_i to end_i (inclusive) 1.48 +// to the constant pool to_cp's entries starting at to_i. A total of 1.49 +// (end_i - start_i) + 1 entries are copied. 1.50 +void ConstantPool::copy_cp_to_impl(constantPoolHandle from_cp, int start_i, int end_i, 1.51 + constantPoolHandle to_cp, int to_i, TRAPS) { 1.52 + 1.53 + 1.54 + int dest_i = to_i; // leave original alone for debug purposes 1.55 + 1.56 + for (int src_i = start_i; src_i <= end_i; /* see loop bottom */ ) { 1.57 + copy_entry_to(from_cp, src_i, to_cp, dest_i, CHECK); 1.58 + 1.59 + switch (from_cp->tag_at(src_i).value()) { 1.60 + case JVM_CONSTANT_Double: 1.61 + case JVM_CONSTANT_Long: 1.62 + // double and long take two constant pool entries 1.63 + src_i += 2; 1.64 + dest_i += 2; 1.65 + break; 1.66 + 1.67 + default: 1.68 + // all others take one constant pool entry 1.69 + src_i++; 1.70 + dest_i++; 1.71 + break; 1.72 + } 1.73 + } 1.74 + copy_operands(from_cp, to_cp, CHECK); 1.75 + 1.76 +} // end copy_cp_to_impl() 1.77 1.78 1.79 // Copy this constant pool's entry at from_i to the constant pool