< prev index next >

src/hotspot/share/oops/constMethod.cpp

Print this page

403   if (cm->has_parameter_annotations()) {
404     assert(has_parameter_annotations(), "should be allocated already");
405     a = copy_annotations(loader_data, cm->parameter_annotations(), CHECK);
406     set_parameter_annotations(a);
407   }
408   if (cm->has_type_annotations()) {
409     assert(has_type_annotations(), "should be allocated already");
410     a = copy_annotations(loader_data, cm->type_annotations(), CHECK);
411     set_type_annotations(a);
412   }
413   if (cm->has_default_annotations()) {
414     assert(has_default_annotations(), "should be allocated already");
415     a = copy_annotations(loader_data, cm->default_annotations(), CHECK);
416     set_default_annotations(a);
417   }
418 }
419 
420 void ConstMethod::metaspace_pointers_do(MetaspaceClosure* it) {
421   log_trace(cds)("Iter(ConstMethod): %p", this);
422 
423   if (!method()->method_holder()->is_rewritten()) {

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

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