# HG changeset patch # User coleenp # Date 1361298819 18000 # Node ID fc43fd9458ce818321fae3832c4dc035a09b9c72 # Parent f708934a12e7599e504369f5b2c6338502212ee9# Parent fd58c7e770b3198e15c6cd40b85a5e7ffa159ddf Merge diff -r f708934a12e7 -r fc43fd9458ce hotspot/src/share/vm/oops/method.hpp --- a/hotspot/src/share/vm/oops/method.hpp Tue Feb 19 08:51:56 2013 -0500 +++ b/hotspot/src/share/vm/oops/method.hpp Tue Feb 19 13:33:39 2013 -0500 @@ -456,6 +456,8 @@ void print_codes_on(int from, int to, outputStream* st) const PRODUCT_RETURN; // method parameters + bool has_method_parameters() const + { return constMethod()->has_method_parameters(); } int method_parameters_length() const { return constMethod()->method_parameters_length(); } MethodParametersElement* method_parameters_start() const diff -r f708934a12e7 -r fc43fd9458ce hotspot/src/share/vm/prims/jvmtiRedefineClasses.cpp --- a/hotspot/src/share/vm/prims/jvmtiRedefineClasses.cpp Tue Feb 19 08:51:56 2013 -0500 +++ b/hotspot/src/share/vm/prims/jvmtiRedefineClasses.cpp Tue Feb 19 13:33:39 2013 -0500 @@ -1558,6 +1558,18 @@ } break; } } // end for each bytecode + + // We also need to rewrite the parameter name indexes, if there is + // method parameter data present + if(method->has_method_parameters()) { + const int len = method->method_parameters_length(); + MethodParametersElement* elem = method->method_parameters_start(); + + for (int i = 0; i < len; i++) { + const u2 cp_index = elem[i].name_cp_index; + elem[i].name_cp_index = find_new_index(cp_index); + } + } } // end rewrite_cp_refs_in_method()