src/hotspot/share/oops/method.cpp
changeset 58861 2c3cc4b01880
parent 58775 ba524a5f7cc2
child 59016 3b9eeae66fa0
equal deleted inserted replaced
58860:506bd2e1f840 58861:2c3cc4b01880
   570 int Method::extra_stack_words() {
   570 int Method::extra_stack_words() {
   571   // not an inline function, to avoid a header dependency on Interpreter
   571   // not an inline function, to avoid a header dependency on Interpreter
   572   return extra_stack_entries() * Interpreter::stackElementSize;
   572   return extra_stack_entries() * Interpreter::stackElementSize;
   573 }
   573 }
   574 
   574 
   575 
       
   576 void Method::compute_size_of_parameters(Thread *thread) {
   575 void Method::compute_size_of_parameters(Thread *thread) {
   577   ArgumentSizeComputer asc(signature());
   576   ArgumentSizeComputer asc(signature());
   578   set_size_of_parameters(asc.size() + (is_static() ? 0 : 1));
   577   set_size_of_parameters(asc.size() + (is_static() ? 0 : 1));
   579 }
   578 }
   580 
   579 
   581 BasicType Method::result_type() const {
       
   582   ResultTypeFinder rtf(signature());
       
   583   return rtf.type();
       
   584 }
       
   585 
       
   586 
       
   587 bool Method::is_empty_method() const {
   580 bool Method::is_empty_method() const {
   588   return  code_size() == 1
   581   return  code_size() == 1
   589       && *code_base() == Bytecodes::_return;
   582       && *code_base() == Bytecodes::_return;
   590 }
   583 }
   591 
       
   592 
   584 
   593 bool Method::is_vanilla_constructor() const {
   585 bool Method::is_vanilla_constructor() const {
   594   // Returns true if this method is a vanilla constructor, i.e. an "<init>" "()V" method
   586   // Returns true if this method is a vanilla constructor, i.e. an "<init>" "()V" method
   595   // which only calls the superclass vanilla constructor and possibly does stores of
   587   // which only calls the superclass vanilla constructor and possibly does stores of
   596   // zero constants to local fields:
   588   // zero constants to local fields: