8257563: Remove excessive include of klass.inline.hpp

Reviewed-by: dholmes, stuefe, stefank
This commit is contained in:
Ioi Lam 2020-12-03 01:34:04 +00:00
parent cc1915b3b3
commit 02a0a027f4
85 changed files with 209 additions and 96 deletions

View file

@ -688,25 +688,8 @@ public:
objArrayOop signers() const;
// host class
InstanceKlass* unsafe_anonymous_host() const {
InstanceKlass** hk = adr_unsafe_anonymous_host();
if (hk == NULL) {
assert(!is_unsafe_anonymous(), "Unsafe anonymous classes have host klasses");
return NULL;
} else {
assert(*hk != NULL, "host klass should always be set if the address is not null");
assert(is_unsafe_anonymous(), "Only unsafe anonymous classes have host klasses");
return *hk;
}
}
void set_unsafe_anonymous_host(const InstanceKlass* host) {
assert(is_unsafe_anonymous(), "not unsafe anonymous");
const InstanceKlass** addr = (const InstanceKlass **)adr_unsafe_anonymous_host();
assert(addr != NULL, "no reversed space");
if (addr != NULL) {
*addr = host;
}
}
inline InstanceKlass* unsafe_anonymous_host() const;
inline void set_unsafe_anonymous_host(const InstanceKlass* host);
bool is_unsafe_anonymous() const {
return (_misc_flags & _misc_is_unsafe_anonymous) != 0;
}
@ -1097,60 +1080,17 @@ public:
has_stored_fingerprint());
}
intptr_t* start_of_itable() const { return (intptr_t*)start_of_vtable() + vtable_length(); }
intptr_t* end_of_itable() const { return start_of_itable() + itable_length(); }
inline intptr_t* start_of_itable() const;
inline intptr_t* end_of_itable() const;
inline int itable_offset_in_words() const;
inline oop static_field_base_raw();
int itable_offset_in_words() const { return start_of_itable() - (intptr_t*)this; }
inline OopMapBlock* start_of_nonstatic_oop_maps() const;
inline Klass** end_of_nonstatic_oop_maps() const;
oop static_field_base_raw() { return java_mirror(); }
OopMapBlock* start_of_nonstatic_oop_maps() const {
return (OopMapBlock*)(start_of_itable() + itable_length());
}
Klass** end_of_nonstatic_oop_maps() const {
return (Klass**)(start_of_nonstatic_oop_maps() +
nonstatic_oop_map_count());
}
Klass* volatile* adr_implementor() const {
if (is_interface()) {
return (Klass* volatile*)end_of_nonstatic_oop_maps();
} else {
return NULL;
}
};
InstanceKlass** adr_unsafe_anonymous_host() const {
if (is_unsafe_anonymous()) {
InstanceKlass** adr_impl = (InstanceKlass**)adr_implementor();
if (adr_impl != NULL) {
return adr_impl + 1;
} else {
return (InstanceKlass **)end_of_nonstatic_oop_maps();
}
} else {
return NULL;
}
}
address adr_fingerprint() const {
if (has_stored_fingerprint()) {
InstanceKlass** adr_host = adr_unsafe_anonymous_host();
if (adr_host != NULL) {
return (address)(adr_host + 1);
}
Klass* volatile* adr_impl = adr_implementor();
if (adr_impl != NULL) {
return (address)(adr_impl + 1);
}
return (address)end_of_nonstatic_oop_maps();
} else {
return NULL;
}
}
inline Klass* volatile* adr_implementor() const;
inline InstanceKlass** adr_unsafe_anonymous_host() const;
inline address adr_fingerprint() const;
// Use this to return the size of an instance in heap words:
int size_helper() const {