mirror of
https://github.com/darlinghq/darling-openjdk.git
synced 2025-03-03 13:37:22 +00:00
8233159: Method::result_type should use calculated value in constMethod
Reviewed-by: lfoltan, iklam, coleenp
This commit is contained in:
parent
6df28153fd
commit
061b0a6637
@ -147,7 +147,6 @@ Symbol* Bytecode_member_ref::signature() const {
|
||||
|
||||
BasicType Bytecode_member_ref::result_type() const {
|
||||
ResultTypeFinder rts(signature());
|
||||
rts.iterate();
|
||||
return rts.type();
|
||||
}
|
||||
|
||||
|
@ -532,6 +532,10 @@ public:
|
||||
int size_of_parameters() const { return _size_of_parameters; }
|
||||
void set_size_of_parameters(int size) { _size_of_parameters = size; }
|
||||
|
||||
// result type (basic type of return value)
|
||||
BasicType result_type() const { assert(_result_type >= T_BOOLEAN, "Must be set");
|
||||
return (BasicType)_result_type; }
|
||||
|
||||
void set_result_type(BasicType rt) { assert(rt < 16, "result type too large");
|
||||
_result_type = (u1)rt; }
|
||||
// Deallocation for RedefineClasses
|
||||
|
@ -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
|
||||
|
@ -608,7 +608,7 @@ public:
|
||||
|
||||
void compute_size_of_parameters(Thread *thread); // word size of parameters (receiver if any + arguments)
|
||||
Symbol* klass_name() const; // returns the name of the method holder
|
||||
BasicType result_type() const; // type of the method result
|
||||
BasicType result_type() const { return constMethod()->result_type(); }
|
||||
bool is_returning_oop() const { BasicType r = result_type(); return is_reference_type(r); }
|
||||
bool is_returning_fp() const { BasicType r = result_type(); return (r == T_FLOAT || r == T_DOUBLE); }
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user