402 if (cm->has_parameter_annotations()) {
403 assert(has_parameter_annotations(), "should be allocated already");
404 a = copy_annotations(loader_data, cm->parameter_annotations(), CHECK);
405 set_parameter_annotations(a);
406 }
407 if (cm->has_type_annotations()) {
408 assert(has_type_annotations(), "should be allocated already");
409 a = copy_annotations(loader_data, cm->type_annotations(), CHECK);
410 set_type_annotations(a);
411 }
412 if (cm->has_default_annotations()) {
413 assert(has_default_annotations(), "should be allocated already");
414 a = copy_annotations(loader_data, cm->default_annotations(), CHECK);
415 set_default_annotations(a);
416 }
417 }
418
419 void ConstMethod::metaspace_pointers_do(MetaspaceClosure* it) {
420 log_trace(cds)("Iter(ConstMethod): %p", this);
421
422 if (!method()->method_holder()->is_rewritten()) {
423 it->push(&_constants, MetaspaceClosure::_writable);
424 } else {
425 it->push(&_constants);
426 }
427 it->push(&_stackmap_data);
428 if (has_method_annotations()) {
429 it->push(method_annotations_addr());
430 }
431 if (has_parameter_annotations()) {
432 it->push(parameter_annotations_addr());
433 }
434 if (has_type_annotations()) {
435 it->push(type_annotations_addr());
436 }
437 if (has_default_annotations()) {
438 it->push(default_annotations_addr());
439 }
440 }
441
442 // Printing
|
402 if (cm->has_parameter_annotations()) {
403 assert(has_parameter_annotations(), "should be allocated already");
404 a = copy_annotations(loader_data, cm->parameter_annotations(), CHECK);
405 set_parameter_annotations(a);
406 }
407 if (cm->has_type_annotations()) {
408 assert(has_type_annotations(), "should be allocated already");
409 a = copy_annotations(loader_data, cm->type_annotations(), CHECK);
410 set_type_annotations(a);
411 }
412 if (cm->has_default_annotations()) {
413 assert(has_default_annotations(), "should be allocated already");
414 a = copy_annotations(loader_data, cm->default_annotations(), CHECK);
415 set_default_annotations(a);
416 }
417 }
418
419 void ConstMethod::metaspace_pointers_do(MetaspaceClosure* it) {
420 log_trace(cds)("Iter(ConstMethod): %p", this);
421
422 if (constants()->pool_holder() != nullptr && !method()->method_holder()->is_rewritten()) {
423 // holder is null for MH intrinsic methods
424 it->push(&_constants, MetaspaceClosure::_writable);
425 } else {
426 it->push(&_constants);
427 }
428 it->push(&_stackmap_data);
429 if (has_method_annotations()) {
430 it->push(method_annotations_addr());
431 }
432 if (has_parameter_annotations()) {
433 it->push(parameter_annotations_addr());
434 }
435 if (has_type_annotations()) {
436 it->push(type_annotations_addr());
437 }
438 if (has_default_annotations()) {
439 it->push(default_annotations_addr());
440 }
441 }
442
443 // Printing
|