src/share/vm/oops/constMethod.cpp

changeset 4837
0c3ee6f1fa23
parent 4719
c8b31b461e1a
child 5208
a1ebd310d5c1
equal deleted inserted replaced
4823:23f2d309e855 4837:0c3ee6f1fa23
361 if (has_parameter_annotations()) offset++; 361 if (has_parameter_annotations()) offset++;
362 if (has_type_annotations()) offset++; 362 if (has_type_annotations()) offset++;
363 return (AnnotationArray**)constMethod_end() - offset; 363 return (AnnotationArray**)constMethod_end() - offset;
364 } 364 }
365 365
366 // copy annotations from 'cm' to 'this'
367 void ConstMethod::copy_annotations_from(ConstMethod* cm) {
368 if (cm->has_method_annotations()) {
369 assert(has_method_annotations(), "should be allocated already");
370 set_method_annotations(cm->method_annotations());
371 }
372 if (cm->has_parameter_annotations()) {
373 assert(has_parameter_annotations(), "should be allocated already");
374 set_parameter_annotations(cm->parameter_annotations());
375 }
376 if (cm->has_type_annotations()) {
377 assert(has_type_annotations(), "should be allocated already");
378 set_type_annotations(cm->type_annotations());
379 }
380 if (cm->has_default_annotations()) {
381 assert(has_default_annotations(), "should be allocated already");
382 set_default_annotations(cm->default_annotations());
383 }
384 }
385
366 // Printing 386 // Printing
367 387
368 void ConstMethod::print_on(outputStream* st) const { 388 void ConstMethod::print_on(outputStream* st) const {
369 ResourceMark rm; 389 ResourceMark rm;
370 assert(is_constMethod(), "must be constMethod"); 390 assert(is_constMethod(), "must be constMethod");

mercurial