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);
|
||||
_has_error_classes = true;
|
||||
}
|
||||
ik->compute_has_loops_flag_for_methods();
|
||||
BytecodeVerificationLocal = saved;
|
||||
return true;
|
||||
} else {
|
||||
|
@ -2624,6 +2624,16 @@ void InstanceKlass::init_shared_package_entry() {
|
||||
#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,
|
||||
PackageEntry* pkg_entry, TRAPS) {
|
||||
// InstanceKlass::add_to_hierarchy() sets the init_state to loaded
|
||||
|
@ -1141,6 +1141,7 @@ public:
|
||||
void init_shared_package_entry();
|
||||
bool can_be_verified_at_dumptime() const;
|
||||
bool methods_contain_jsr_bytecode() const;
|
||||
void compute_has_loops_flag_for_methods();
|
||||
#endif
|
||||
|
||||
jint compute_modifier_flags() const;
|
||||
|
Loading…
x
Reference in New Issue
Block a user