mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8056071: compiler/whitebox/IsMethodCompilableTest.java fails with 'method() is not compilable after 3 iterations'
Always use MDO if valid and always compile trivial methods with C1 if available. Reviewed-by: kvn, iveresov
This commit is contained in:
parent
bdac822811
commit
00aa20db4a
8 changed files with 33 additions and 14 deletions
|
@ -588,6 +588,15 @@ bool Method::is_accessor() const {
|
|||
return true;
|
||||
}
|
||||
|
||||
bool Method::is_constant_getter() const {
|
||||
int last_index = code_size() - 1;
|
||||
// Check if the first 1-3 bytecodes are a constant push
|
||||
// and the last bytecode is a return.
|
||||
return (2 <= code_size() && code_size() <= 4 &&
|
||||
Bytecodes::is_const(java_code_at(0)) &&
|
||||
Bytecodes::length_for(java_code_at(0)) == last_index &&
|
||||
Bytecodes::is_return(java_code_at(last_index)));
|
||||
}
|
||||
|
||||
bool Method::is_initializer() const {
|
||||
return name() == vmSymbols::object_initializer_name() || is_static_initializer();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue