comparison src/share/vm/prims/jvmtiRedefineClasses.cpp @ 8068:56c364daccc3

8007153: Ensure that MethodParameters API works properly with RedefineClasses Summary: Adds code to HotSpot to properly update MethodParameter attributes' constant pool indexes when redefineClasses is called Reviewed-by: coleenp, sspitsyn
author emc
date Tue, 19 Feb 2013 11:36:52 -0500
parents 927a311d00f9
children 6337ca4dcad8
comparison
equal deleted inserted replaced
8066:b5e3ec9c69fa 8068:56c364daccc3
1556 Bytes::put_Java_u2(p, new_index); 1556 Bytes::put_Java_u2(p, new_index);
1557 } 1557 }
1558 } break; 1558 } break;
1559 } 1559 }
1560 } // end for each bytecode 1560 } // end for each bytecode
1561
1562 // We also need to rewrite the parameter name indexes, if there is
1563 // method parameter data present
1564 if(method->has_method_parameters()) {
1565 const int len = method->method_parameters_length();
1566 MethodParametersElement* elem = method->method_parameters_start();
1567
1568 for (int i = 0; i < len; i++) {
1569 const u2 cp_index = elem[i].name_cp_index;
1570 elem[i].name_cp_index = find_new_index(cp_index);
1571 }
1572 }
1561 } // end rewrite_cp_refs_in_method() 1573 } // end rewrite_cp_refs_in_method()
1562 1574
1563 1575
1564 // Rewrite constant pool references in the class_annotations field. 1576 // Rewrite constant pool references in the class_annotations field.
1565 bool VM_RedefineClasses::rewrite_cp_refs_in_class_annotations( 1577 bool VM_RedefineClasses::rewrite_cp_refs_in_class_annotations(