35 // pointer has been "peeked" and then must be kept alive before it may
36 // be used safely. All uses of klass_holder need to apply the appropriate barriers,
37 // except during GC.
38 inline oop Klass::klass_holder() const {
39 return class_loader_data()->holder_phantom();
40 }
41
42 inline bool Klass::is_non_strong_hidden() const {
43 return access_flags().is_hidden_class() &&
44 class_loader_data()->has_class_mirror_holder();
45 }
46
47 // Iff the class loader (or mirror for non-strong hidden classes) is alive the
48 // Klass is considered alive. This is safe to call before the CLD is marked as
49 // unloading, and hence during concurrent class unloading.
50 inline bool Klass::is_loader_alive() const {
51 return class_loader_data()->is_alive();
52 }
53
54 inline void Klass::set_prototype_header(markWord header) {
55 assert(!header.has_bias_pattern() || is_instance_klass(), "biased locking currently only supported for Java instances");
56 _prototype_header = header;
57 }
58
59 inline oop Klass::java_mirror() const {
60 return _java_mirror.resolve();
61 }
62
63 inline klassVtable Klass::vtable() const {
64 return klassVtable(const_cast<Klass*>(this), start_of_vtable(), vtable_length() / vtableEntry::size());
65 }
66
67 inline oop Klass::class_loader() const {
68 return class_loader_data()->class_loader();
69 }
70
71 inline vtableEntry* Klass::start_of_vtable() const {
72 return (vtableEntry*) ((address)this + in_bytes(vtable_start_offset()));
73 }
74
75 inline ByteSize Klass::vtable_start_offset() {
|
35 // pointer has been "peeked" and then must be kept alive before it may
36 // be used safely. All uses of klass_holder need to apply the appropriate barriers,
37 // except during GC.
38 inline oop Klass::klass_holder() const {
39 return class_loader_data()->holder_phantom();
40 }
41
42 inline bool Klass::is_non_strong_hidden() const {
43 return access_flags().is_hidden_class() &&
44 class_loader_data()->has_class_mirror_holder();
45 }
46
47 // Iff the class loader (or mirror for non-strong hidden classes) is alive the
48 // Klass is considered alive. This is safe to call before the CLD is marked as
49 // unloading, and hence during concurrent class unloading.
50 inline bool Klass::is_loader_alive() const {
51 return class_loader_data()->is_alive();
52 }
53
54 inline void Klass::set_prototype_header(markWord header) {
55 assert(UseCompactObjectHeaders || !header.has_bias_pattern() || is_instance_klass(), "biased locking currently only supported for Java instances");
56 _prototype_header = header;
57 }
58
59 inline oop Klass::java_mirror() const {
60 return _java_mirror.resolve();
61 }
62
63 inline klassVtable Klass::vtable() const {
64 return klassVtable(const_cast<Klass*>(this), start_of_vtable(), vtable_length() / vtableEntry::size());
65 }
66
67 inline oop Klass::class_loader() const {
68 return class_loader_data()->class_loader();
69 }
70
71 inline vtableEntry* Klass::start_of_vtable() const {
72 return (vtableEntry*) ((address)this + in_bytes(vtable_start_offset()));
73 }
74
75 inline ByteSize Klass::vtable_start_offset() {
|