489 virtual oop protection_domain() const = 0;
490
491 oop class_loader() const;
492
493 // This loads the klass's holder as a phantom. This is useful when a weak Klass
494 // pointer has been "peeked" and then must be kept alive before it may
495 // be used safely. All uses of klass_holder need to apply the appropriate barriers,
496 // except during GC.
497 oop klass_holder() const { return class_loader_data()->holder_phantom(); }
498
499 protected:
500 virtual Klass* array_klass_impl(bool or_null, int rank, TRAPS);
501 virtual Klass* array_klass_impl(bool or_null, TRAPS);
502
503 // Error handling when length > max_length or length < 0
504 static void check_array_allocation_length(int length, int max_length, TRAPS);
505
506 void set_vtable_length(int len) { _vtable_len= len; }
507
508 vtableEntry* start_of_vtable() const;
509 public:
510 Method* method_at_vtable(int index);
511
512 static ByteSize vtable_start_offset();
513 static ByteSize vtable_length_offset() {
514 return byte_offset_of(Klass, _vtable_len);
515 }
516
517 // CDS support - remove and restore oops from metadata. Oops are not shared.
518 virtual void remove_unshareable_info();
519 virtual void remove_java_mirror();
520 virtual void restore_unshareable_info(ClassLoaderData* loader_data, Handle protection_domain, TRAPS);
521
522 bool is_unshareable_info_restored() const {
523 assert(is_shared(), "use this for shared classes only");
524 if (has_raw_archived_mirror()) {
525 // _java_mirror is not a valid OopHandle but rather an encoded reference in the shared heap
526 return false;
527 } else if (_java_mirror.ptr_raw() == NULL) {
528 return false;
529 } else {
530 return true;
531 }
532 }
533
534 public:
535 // ALL FUNCTIONS BELOW THIS POINT ARE DISPATCHED FROM AN OOP
536 // These functions describe behavior for the oop not the KLASS.
537
538 // actual oop size of obj in memory
539 virtual int oop_size(oop obj) const = 0;
540
|
489 virtual oop protection_domain() const = 0;
490
491 oop class_loader() const;
492
493 // This loads the klass's holder as a phantom. This is useful when a weak Klass
494 // pointer has been "peeked" and then must be kept alive before it may
495 // be used safely. All uses of klass_holder need to apply the appropriate barriers,
496 // except during GC.
497 oop klass_holder() const { return class_loader_data()->holder_phantom(); }
498
499 protected:
500 virtual Klass* array_klass_impl(bool or_null, int rank, TRAPS);
501 virtual Klass* array_klass_impl(bool or_null, TRAPS);
502
503 // Error handling when length > max_length or length < 0
504 static void check_array_allocation_length(int length, int max_length, TRAPS);
505
506 void set_vtable_length(int len) { _vtable_len= len; }
507
508 vtableEntry* start_of_vtable() const;
509 void restore_unshareable_info(ClassLoaderData* loader_data, Handle protection_domain, TRAPS);
510 public:
511 Method* method_at_vtable(int index);
512
513 static ByteSize vtable_start_offset();
514 static ByteSize vtable_length_offset() {
515 return byte_offset_of(Klass, _vtable_len);
516 }
517
518 // CDS support - remove and restore oops from metadata. Oops are not shared.
519 virtual void remove_unshareable_info();
520 virtual void remove_java_mirror();
521
522 bool is_unshareable_info_restored() const {
523 assert(is_shared(), "use this for shared classes only");
524 if (has_raw_archived_mirror()) {
525 // _java_mirror is not a valid OopHandle but rather an encoded reference in the shared heap
526 return false;
527 } else if (_java_mirror.ptr_raw() == NULL) {
528 return false;
529 } else {
530 return true;
531 }
532 }
533
534 public:
535 // ALL FUNCTIONS BELOW THIS POINT ARE DISPATCHED FROM AN OOP
536 // These functions describe behavior for the oop not the KLASS.
537
538 // actual oop size of obj in memory
539 virtual int oop_size(oop obj) const = 0;
540
|