1.1 --- a/src/share/vm/opto/escape.cpp Mon May 13 12:43:10 2013 -0700 1.2 +++ b/src/share/vm/opto/escape.cpp Mon May 13 14:36:39 2013 -0700 1.3 @@ -822,7 +822,16 @@ 1.4 ptnode_adr(call_idx)->set_scalar_replaceable(false); 1.5 } else if (meth->is_boxing_method()) { 1.6 // Returns boxing object 1.7 - add_java_object(call, PointsToNode::NoEscape); 1.8 + PointsToNode::EscapeState es; 1.9 + vmIntrinsics::ID intr = meth->intrinsic_id(); 1.10 + if (intr == vmIntrinsics::_floatValue || intr == vmIntrinsics::_doubleValue) { 1.11 + // It does not escape if object is always allocated. 1.12 + es = PointsToNode::NoEscape; 1.13 + } else { 1.14 + // It escapes globally if object could be loaded from cache. 1.15 + es = PointsToNode::GlobalEscape; 1.16 + } 1.17 + add_java_object(call, es); 1.18 } else { 1.19 BCEscapeAnalyzer* call_analyzer = meth->get_bcea(); 1.20 call_analyzer->copy_dependencies(_compile->dependencies());