1.1 --- a/src/share/vm/oops/constMethod.cpp Tue Mar 26 15:20:05 2013 -0700 1.2 +++ b/src/share/vm/oops/constMethod.cpp Wed Mar 27 08:19:50 2013 -0400 1.3 @@ -363,6 +363,26 @@ 1.4 return (AnnotationArray**)constMethod_end() - offset; 1.5 } 1.6 1.7 +// copy annotations from 'cm' to 'this' 1.8 +void ConstMethod::copy_annotations_from(ConstMethod* cm) { 1.9 + if (cm->has_method_annotations()) { 1.10 + assert(has_method_annotations(), "should be allocated already"); 1.11 + set_method_annotations(cm->method_annotations()); 1.12 + } 1.13 + if (cm->has_parameter_annotations()) { 1.14 + assert(has_parameter_annotations(), "should be allocated already"); 1.15 + set_parameter_annotations(cm->parameter_annotations()); 1.16 + } 1.17 + if (cm->has_type_annotations()) { 1.18 + assert(has_type_annotations(), "should be allocated already"); 1.19 + set_type_annotations(cm->type_annotations()); 1.20 + } 1.21 + if (cm->has_default_annotations()) { 1.22 + assert(has_default_annotations(), "should be allocated already"); 1.23 + set_default_annotations(cm->default_annotations()); 1.24 + } 1.25 +} 1.26 + 1.27 // Printing 1.28 1.29 void ConstMethod::print_on(outputStream* st) const {