comparison src/share/vm/opto/bytecodeInfo.cpp @ 10281:1da5d70655e9

8014286: failed java/lang/Math/DivModTests.java after 6934604 changes Summary: Corrected escape state for the result of boxing method. Added force inlining executed boxing methods. Reviewed-by: twisti
author kvn
date Mon, 13 May 2013 14:36:39 -0700
parents 6f3fd5150b67
children 836a62f43af9 02d7aa1456c9
comparison
equal deleted inserted replaced
10280:8bcfd9ce2c6b 10281:1da5d70655e9
83 { 83 {
84 NOT_PRODUCT(_count_inlines = 0;) 84 NOT_PRODUCT(_count_inlines = 0;)
85 assert(!UseOldInlining, "do not use for old stuff"); 85 assert(!UseOldInlining, "do not use for old stuff");
86 } 86 }
87 87
88 /**
89 * Return true when EA is ON and a java constructor is called or
90 * a super constructor is called from an inlined java constructor.
91 * Also return true for boxing methods.
92 */
88 static bool is_init_with_ea(ciMethod* callee_method, 93 static bool is_init_with_ea(ciMethod* callee_method,
89 ciMethod* caller_method, Compile* C) { 94 ciMethod* caller_method, Compile* C) {
90 // True when EA is ON and a java constructor is called or 95 if (!C->do_escape_analysis() || !EliminateAllocations) {
91 // a super constructor is called from an inlined java constructor. 96 return false; // EA is off
92 return C->do_escape_analysis() && EliminateAllocations && 97 }
93 ( callee_method->is_initializer() || 98 if (callee_method->is_initializer()) {
94 (caller_method->is_initializer() && 99 return true; // constuctor
95 caller_method != C->method() && 100 }
96 caller_method->holder()->is_subclass_of(callee_method->holder())) 101 if (caller_method->is_initializer() &&
97 ); 102 caller_method != C->method() &&
98 } 103 caller_method->holder()->is_subclass_of(callee_method->holder())) {
99 104 return true; // super constructor is called from inlined constructor
105 }
106 if (C->eliminate_boxing() && callee_method->is_boxing_method()) {
107 return true;
108 }
109 return false;
110 }
111
112 /**
113 * Force inlining unboxing accessor.
114 */
100 static bool is_unboxing_method(ciMethod* callee_method, Compile* C) { 115 static bool is_unboxing_method(ciMethod* callee_method, Compile* C) {
101 // Force inlining unboxing accessor.
102 return C->eliminate_boxing() && callee_method->is_unboxing_method(); 116 return C->eliminate_boxing() && callee_method->is_unboxing_method();
103 } 117 }
104 118
105 // positive filter: should callee be inlined? 119 // positive filter: should callee be inlined?
106 bool InlineTree::should_inline(ciMethod* callee_method, ciMethod* caller_method, 120 bool InlineTree::should_inline(ciMethod* callee_method, ciMethod* caller_method,