equal
deleted
inserted
replaced
586 if (java_code_at(4) != Bytecodes::_areturn && |
586 if (java_code_at(4) != Bytecodes::_areturn && |
587 java_code_at(4) != Bytecodes::_ireturn ) return false; |
587 java_code_at(4) != Bytecodes::_ireturn ) return false; |
588 return true; |
588 return true; |
589 } |
589 } |
590 |
590 |
|
591 bool Method::is_constant_getter() const { |
|
592 int last_index = code_size() - 1; |
|
593 // Check if the first 1-3 bytecodes are a constant push |
|
594 // and the last bytecode is a return. |
|
595 return (2 <= code_size() && code_size() <= 4 && |
|
596 Bytecodes::is_const(java_code_at(0)) && |
|
597 Bytecodes::length_for(java_code_at(0)) == last_index && |
|
598 Bytecodes::is_return(java_code_at(last_index))); |
|
599 } |
591 |
600 |
592 bool Method::is_initializer() const { |
601 bool Method::is_initializer() const { |
593 return name() == vmSymbols::object_initializer_name() || is_static_initializer(); |
602 return name() == vmSymbols::object_initializer_name() || is_static_initializer(); |
594 } |
603 } |
595 |
604 |