Mercurial > hg > graal-compiler
comparison src/share/vm/oops/method.cpp @ 20651:600c44255e5f
8056071: compiler/whitebox/IsMethodCompilableTest.java fails with 'method() is not compilable after 3 iterations'
Summary: Always use MDO if valid and always compile trivial methods with C1 if available.
Reviewed-by: kvn, iveresov
author | thartmann |
---|---|
date | Tue, 11 Nov 2014 11:05:41 +0100 |
parents | b12a2a9b05ca |
children | 7848fc12602b |
comparison
equal
deleted
inserted
replaced
20650:f84125b6f69a | 20651:600c44255e5f |
---|---|
556 if (java_code_at(4) != Bytecodes::_areturn && | 556 if (java_code_at(4) != Bytecodes::_areturn && |
557 java_code_at(4) != Bytecodes::_ireturn ) return false; | 557 java_code_at(4) != Bytecodes::_ireturn ) return false; |
558 return true; | 558 return true; |
559 } | 559 } |
560 | 560 |
561 bool Method::is_constant_getter() const { | |
562 int last_index = code_size() - 1; | |
563 // Check if the first 1-3 bytecodes are a constant push | |
564 // and the last bytecode is a return. | |
565 return (2 <= code_size() && code_size() <= 4 && | |
566 Bytecodes::is_const(java_code_at(0)) && | |
567 Bytecodes::length_for(java_code_at(0)) == last_index && | |
568 Bytecodes::is_return(java_code_at(last_index))); | |
569 } | |
561 | 570 |
562 bool Method::is_initializer() const { | 571 bool Method::is_initializer() const { |
563 return name() == vmSymbols::object_initializer_name() || is_static_initializer(); | 572 return name() == vmSymbols::object_initializer_name() || is_static_initializer(); |
564 } | 573 } |
565 | 574 |