31 #include "oops/klassVtable.hpp"
32 #include "oops/markWord.hpp"
33
34 // This loads and keeps the klass's loader alive.
35 inline oop Klass::klass_holder() const {
36 return class_loader_data()->holder();
37 }
38
39 inline bool Klass::is_non_strong_hidden() const {
40 return access_flags().is_hidden_class() &&
41 class_loader_data()->has_class_mirror_holder();
42 }
43
44 // Iff the class loader (or mirror for non-strong hidden classes) is alive the
45 // Klass is considered alive. This is safe to call before the CLD is marked as
46 // unloading, and hence during concurrent class unloading.
47 inline bool Klass::is_loader_alive() const {
48 return class_loader_data()->is_alive();
49 }
50
51 inline oop Klass::java_mirror() const {
52 return _java_mirror.resolve();
53 }
54
55 inline klassVtable Klass::vtable() const {
56 return klassVtable(const_cast<Klass*>(this), start_of_vtable(), vtable_length() / vtableEntry::size());
57 }
58
59 inline oop Klass::class_loader() const {
60 return class_loader_data()->class_loader();
61 }
62
63 inline vtableEntry* Klass::start_of_vtable() const {
64 return (vtableEntry*) ((address)this + in_bytes(vtable_start_offset()));
65 }
66
67 inline ByteSize Klass::vtable_start_offset() {
68 return in_ByteSize(InstanceKlass::header_size() * wordSize);
69 }
70
|
31 #include "oops/klassVtable.hpp"
32 #include "oops/markWord.hpp"
33
34 // This loads and keeps the klass's loader alive.
35 inline oop Klass::klass_holder() const {
36 return class_loader_data()->holder();
37 }
38
39 inline bool Klass::is_non_strong_hidden() const {
40 return access_flags().is_hidden_class() &&
41 class_loader_data()->has_class_mirror_holder();
42 }
43
44 // Iff the class loader (or mirror for non-strong hidden classes) is alive the
45 // Klass is considered alive. This is safe to call before the CLD is marked as
46 // unloading, and hence during concurrent class unloading.
47 inline bool Klass::is_loader_alive() const {
48 return class_loader_data()->is_alive();
49 }
50
51 inline void Klass::set_prototype_header(markWord header) {
52 _prototype_header = header;
53 }
54
55 inline oop Klass::java_mirror() const {
56 return _java_mirror.resolve();
57 }
58
59 inline klassVtable Klass::vtable() const {
60 return klassVtable(const_cast<Klass*>(this), start_of_vtable(), vtable_length() / vtableEntry::size());
61 }
62
63 inline oop Klass::class_loader() const {
64 return class_loader_data()->class_loader();
65 }
66
67 inline vtableEntry* Klass::start_of_vtable() const {
68 return (vtableEntry*) ((address)this + in_bytes(vtable_start_offset()));
69 }
70
71 inline ByteSize Klass::vtable_start_offset() {
72 return in_ByteSize(InstanceKlass::header_size() * wordSize);
73 }
74
|