3750 if (callee->is_synchronized() && 3751 !InlineSynchronizedMethods ) INLINE_BAILOUT("callee is synchronized"); 3752 if (!callee->holder()->is_initialized()) INLINE_BAILOUT("callee's klass not initialized yet"); 3753 if (!callee->has_balanced_monitors()) INLINE_BAILOUT("callee's monitors do not match"); 3754 3755 // Proper inlining of methods with jsrs requires a little more work. 3756 if (callee->has_jsrs() ) INLINE_BAILOUT("jsrs not handled properly by inliner yet"); 3757 3758 // When SSE2 is used on intel, then no special handling is needed 3759 // for strictfp because the enum-constant is fixed at compile time, 3760 // the check for UseSSE2 is needed here 3761 if (strict_fp_requires_explicit_rounding && UseSSE < 2 && method()->is_strict() != callee->is_strict()) { 3762 INLINE_BAILOUT("caller and callee have different strict fp requirements"); 3763 } 3764 3765 if (is_profiling() && !callee->ensure_method_data()) { 3766 INLINE_BAILOUT("mdo allocation failed"); 3767 } 3768 3769 // now perform tests that are based on flag settings 3770 if (callee->force_inline()) { 3771 if (inline_level() > MaxForceInlineLevel) INLINE_BAILOUT("MaxForceInlineLevel"); 3772 print_inlining(callee, "force inline by annotation"); 3773 } else if (callee->should_inline()) { 3774 print_inlining(callee, "force inline by CompileOracle"); 3775 } else { 3776 // use heuristic controls on inlining 3777 if (inline_level() > MaxInlineLevel ) INLINE_BAILOUT("inlining too deep"); 3778 if (recursive_inline_level(callee) > MaxRecursiveInlineLevel) INLINE_BAILOUT("recursive inlining too deep"); 3779 if (callee->code_size_for_inlining() > max_inline_size() ) INLINE_BAILOUT("callee is too large"); 3780 3781 // don't inline throwable methods unless the inlining tree is rooted in a throwable class 3782 if (callee->name() == ciSymbol::object_initializer_name() && 3783 callee->holder()->is_subclass_of(ciEnv::current()->Throwable_klass())) { 3784 // Throwable constructor call 3785 IRScope* top = scope(); 3786 while (top->caller() != NULL) { 3787 top = top->caller(); 3788 } 3789 if (!top->method()->holder()->is_subclass_of(ciEnv::current()->Throwable_klass())) { 3790 INLINE_BAILOUT("don't inline Throwable constructors"); 3791 } 3792 } 3793 3794 if (compilation()->env()->num_inlined_bytecodes() > DesiredMethodLimit) { | 3750 if (callee->is_synchronized() && 3751 !InlineSynchronizedMethods ) INLINE_BAILOUT("callee is synchronized"); 3752 if (!callee->holder()->is_initialized()) INLINE_BAILOUT("callee's klass not initialized yet"); 3753 if (!callee->has_balanced_monitors()) INLINE_BAILOUT("callee's monitors do not match"); 3754 3755 // Proper inlining of methods with jsrs requires a little more work. 3756 if (callee->has_jsrs() ) INLINE_BAILOUT("jsrs not handled properly by inliner yet"); 3757 3758 // When SSE2 is used on intel, then no special handling is needed 3759 // for strictfp because the enum-constant is fixed at compile time, 3760 // the check for UseSSE2 is needed here 3761 if (strict_fp_requires_explicit_rounding && UseSSE < 2 && method()->is_strict() != callee->is_strict()) { 3762 INLINE_BAILOUT("caller and callee have different strict fp requirements"); 3763 } 3764 3765 if (is_profiling() && !callee->ensure_method_data()) { 3766 INLINE_BAILOUT("mdo allocation failed"); 3767 } 3768 3769 // now perform tests that are based on flag settings 3770 if (callee->force_inline() || callee->should_inline()) { 3771 if (inline_level() > MaxForceInlineLevel ) INLINE_BAILOUT("MaxForceInlineLevel"); 3772 if (recursive_inline_level(callee) > MaxRecursiveInlineLevel) INLINE_BAILOUT("recursive inlining too deep"); 3773 3774 const char* msg; 3775 if (callee->force_inline()) msg = "force inline by annotation"; 3776 if (callee->should_inline()) msg = "force inline by CompileOracle"; 3777 print_inlining(callee, msg); 3778 } else { 3779 // use heuristic controls on inlining 3780 if (inline_level() > MaxInlineLevel ) INLINE_BAILOUT("inlining too deep"); 3781 if (recursive_inline_level(callee) > MaxRecursiveInlineLevel) INLINE_BAILOUT("recursive inlining too deep"); 3782 if (callee->code_size_for_inlining() > max_inline_size() ) INLINE_BAILOUT("callee is too large"); 3783 3784 // don't inline throwable methods unless the inlining tree is rooted in a throwable class 3785 if (callee->name() == ciSymbol::object_initializer_name() && 3786 callee->holder()->is_subclass_of(ciEnv::current()->Throwable_klass())) { 3787 // Throwable constructor call 3788 IRScope* top = scope(); 3789 while (top->caller() != NULL) { 3790 top = top->caller(); 3791 } 3792 if (!top->method()->holder()->is_subclass_of(ciEnv::current()->Throwable_klass())) { 3793 INLINE_BAILOUT("don't inline Throwable constructors"); 3794 } 3795 } 3796 3797 if (compilation()->env()->num_inlined_bytecodes() > DesiredMethodLimit) { |