8233159: Method::result_type should use calculated value in constMethod

Reviewed-by: lfoltan, iklam, coleenp
This commit is contained in:
Claes Redestad 2019-10-30 16:14:56 +01:00
parent 6df28153fd
commit 061b0a6637
4 changed files with 5 additions and 10 deletions

View file

@ -572,24 +572,16 @@ int Method::extra_stack_words() {
return extra_stack_entries() * Interpreter::stackElementSize;
}
void Method::compute_size_of_parameters(Thread *thread) {
ArgumentSizeComputer asc(signature());
set_size_of_parameters(asc.size() + (is_static() ? 0 : 1));
}
BasicType Method::result_type() const {
ResultTypeFinder rtf(signature());
return rtf.type();
}
bool Method::is_empty_method() const {
return code_size() == 1
&& *code_base() == Bytecodes::_return;
}
bool Method::is_vanilla_constructor() const {
// Returns true if this method is a vanilla constructor, i.e. an "<init>" "()V" method
// which only calls the superclass vanilla constructor and possibly does stores of