8223171: Redundant nmethod dependencies for effectively final methods

Reviewed-by: dlong
This commit is contained in:
Vladimir Ivanov 2019-05-06 12:15:49 -07:00
parent c7faef0785
commit 75d4f24c97
8 changed files with 38 additions and 7 deletions

View file

@ -624,6 +624,10 @@ bool Method::can_be_statically_bound() const {
return can_be_statically_bound(method_holder()->access_flags());
}
bool Method::can_be_statically_bound(InstanceKlass* context) const {
return (method_holder() == context) && can_be_statically_bound();
}
bool Method::is_accessor() const {
return is_getter() || is_setter();
}