Mercurial > hg > truffle
comparison src/share/vm/oops/method.cpp @ 12170:8947af8a9cec
8023976: assert(!CompilationPolicy::can_be_compiled(this, comp_level)) failed: sanity check
Reviewed-by: kvn, twisti
author | vlivanov |
---|---|
date | Thu, 29 Aug 2013 22:44:19 +0400 |
parents | 6725044c5725 |
children | b2e698d2276c |
comparison
equal
deleted
inserted
replaced
12169:29aa8936f03c | 12170:8947af8a9cec |
---|---|
718 xtty->stamp(); | 718 xtty->stamp(); |
719 xtty->end_elem(); | 719 xtty->end_elem(); |
720 } | 720 } |
721 } | 721 } |
722 | 722 |
723 bool Method::is_always_compilable() const { | |
724 // Generated adapters must be compiled | |
725 if (is_method_handle_intrinsic() && is_synthetic()) { | |
726 assert(!is_not_c1_compilable(), "sanity check"); | |
727 assert(!is_not_c2_compilable(), "sanity check"); | |
728 return true; | |
729 } | |
730 | |
731 return false; | |
732 } | |
733 | |
723 bool Method::is_not_compilable(int comp_level) const { | 734 bool Method::is_not_compilable(int comp_level) const { |
724 if (number_of_breakpoints() > 0) | 735 if (number_of_breakpoints() > 0) |
725 return true; | 736 return true; |
726 if (is_method_handle_intrinsic()) | 737 if (is_always_compilable()) |
727 return !is_synthetic(); // the generated adapters must be compiled | 738 return false; |
728 if (comp_level == CompLevel_any) | 739 if (comp_level == CompLevel_any) |
729 return is_not_c1_compilable() || is_not_c2_compilable(); | 740 return is_not_c1_compilable() || is_not_c2_compilable(); |
730 if (is_c1_compile(comp_level)) | 741 if (is_c1_compile(comp_level)) |
731 return is_not_c1_compilable(); | 742 return is_not_c1_compilable(); |
732 if (is_c2_compile(comp_level)) | 743 if (is_c2_compile(comp_level)) |
734 return false; | 745 return false; |
735 } | 746 } |
736 | 747 |
737 // call this when compiler finds that this method is not compilable | 748 // call this when compiler finds that this method is not compilable |
738 void Method::set_not_compilable(int comp_level, bool report, const char* reason) { | 749 void Method::set_not_compilable(int comp_level, bool report, const char* reason) { |
750 if (is_always_compilable()) { | |
751 // Don't mark a method which should be always compilable | |
752 return; | |
753 } | |
739 print_made_not_compilable(comp_level, /*is_osr*/ false, report, reason); | 754 print_made_not_compilable(comp_level, /*is_osr*/ false, report, reason); |
740 if (comp_level == CompLevel_all) { | 755 if (comp_level == CompLevel_all) { |
741 set_not_c1_compilable(); | 756 set_not_c1_compilable(); |
742 set_not_c2_compilable(); | 757 set_not_c2_compilable(); |
743 } else { | 758 } else { |