820 // Returns a newly allocated unescaped object. |
820 // Returns a newly allocated unescaped object. |
821 add_java_object(call, PointsToNode::NoEscape); |
821 add_java_object(call, PointsToNode::NoEscape); |
822 ptnode_adr(call_idx)->set_scalar_replaceable(false); |
822 ptnode_adr(call_idx)->set_scalar_replaceable(false); |
823 } else if (meth->is_boxing_method()) { |
823 } else if (meth->is_boxing_method()) { |
824 // Returns boxing object |
824 // Returns boxing object |
825 add_java_object(call, PointsToNode::NoEscape); |
825 PointsToNode::EscapeState es; |
|
826 vmIntrinsics::ID intr = meth->intrinsic_id(); |
|
827 if (intr == vmIntrinsics::_floatValue || intr == vmIntrinsics::_doubleValue) { |
|
828 // It does not escape if object is always allocated. |
|
829 es = PointsToNode::NoEscape; |
|
830 } else { |
|
831 // It escapes globally if object could be loaded from cache. |
|
832 es = PointsToNode::GlobalEscape; |
|
833 } |
|
834 add_java_object(call, es); |
826 } else { |
835 } else { |
827 BCEscapeAnalyzer* call_analyzer = meth->get_bcea(); |
836 BCEscapeAnalyzer* call_analyzer = meth->get_bcea(); |
828 call_analyzer->copy_dependencies(_compile->dependencies()); |
837 call_analyzer->copy_dependencies(_compile->dependencies()); |
829 if (call_analyzer->is_return_allocated()) { |
838 if (call_analyzer->is_return_allocated()) { |
830 // Returns a newly allocated unescaped object, simply |
839 // Returns a newly allocated unescaped object, simply |