8305757: Call Method::compute_has_loops_flag() when creating CDS archive
Reviewed-by: coleenp, ccheung
This commit is contained in:
parent
eb8d8cdddd
commit
c7faf60201
@ -838,6 +838,7 @@ bool MetaspaceShared::try_link_class(JavaThread* current, InstanceKlass* ik) {
|
|||||||
SystemDictionaryShared::set_class_has_failed_verification(ik);
|
SystemDictionaryShared::set_class_has_failed_verification(ik);
|
||||||
_has_error_classes = true;
|
_has_error_classes = true;
|
||||||
}
|
}
|
||||||
|
ik->compute_has_loops_flag_for_methods();
|
||||||
BytecodeVerificationLocal = saved;
|
BytecodeVerificationLocal = saved;
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
|
@ -2624,6 +2624,16 @@ void InstanceKlass::init_shared_package_entry() {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void InstanceKlass::compute_has_loops_flag_for_methods() {
|
||||||
|
Array<Method*>* methods = this->methods();
|
||||||
|
for (int index = 0; index < methods->length(); ++index) {
|
||||||
|
Method* m = methods->at(index);
|
||||||
|
if (!m->is_overpass()) { // work around JDK-8305771
|
||||||
|
m->compute_has_loops_flag();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void InstanceKlass::restore_unshareable_info(ClassLoaderData* loader_data, Handle protection_domain,
|
void InstanceKlass::restore_unshareable_info(ClassLoaderData* loader_data, Handle protection_domain,
|
||||||
PackageEntry* pkg_entry, TRAPS) {
|
PackageEntry* pkg_entry, TRAPS) {
|
||||||
// InstanceKlass::add_to_hierarchy() sets the init_state to loaded
|
// InstanceKlass::add_to_hierarchy() sets the init_state to loaded
|
||||||
|
@ -1141,6 +1141,7 @@ public:
|
|||||||
void init_shared_package_entry();
|
void init_shared_package_entry();
|
||||||
bool can_be_verified_at_dumptime() const;
|
bool can_be_verified_at_dumptime() const;
|
||||||
bool methods_contain_jsr_bytecode() const;
|
bool methods_contain_jsr_bytecode() const;
|
||||||
|
void compute_has_loops_flag_for_methods();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
jint compute_modifier_flags() const;
|
jint compute_modifier_flags() const;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user