774 } 775 } 776 } 777 // at least pass along a good guess 778 if (expected_type == NULL) expected_type = dst_exact_type; 779 if (expected_type == NULL) expected_type = src_declared_type; 780 if (expected_type == NULL) expected_type = dst_declared_type; 781 782 src_objarray = (src_exact_type && src_exact_type->is_obj_array_klass()) || (src_declared_type && src_declared_type->is_obj_array_klass()); 783 dst_objarray = (dst_exact_type && dst_exact_type->is_obj_array_klass()) || (dst_declared_type && dst_declared_type->is_obj_array_klass()); 784 } 785 786 // if a probable array type has been identified, figure out if any 787 // of the required checks for a fast case can be elided. 788 int flags = LIR_OpArrayCopy::all_flags; 789 790 if (!src->is_loaded_flattened_array() && !dst->is_loaded_flattened_array()) { 791 flags &= ~LIR_OpArrayCopy::always_slow_path; 792 } 793 if (!src->maybe_flattened_array()) { 794 flags &= ~LIR_OpArrayCopy::src_flat_check; 795 } 796 if (!dst->maybe_flattened_array()) { 797 flags &= ~LIR_OpArrayCopy::dst_flat_check; 798 } 799 800 if (!src_objarray) 801 flags &= ~LIR_OpArrayCopy::src_objarray; 802 if (!dst_objarray) 803 flags &= ~LIR_OpArrayCopy::dst_objarray; 804 805 if (!x->arg_needs_null_check(0)) 806 flags &= ~LIR_OpArrayCopy::src_null_check; 807 if (!x->arg_needs_null_check(2)) 808 flags &= ~LIR_OpArrayCopy::dst_null_check; 809 810 811 if (expected_type != NULL) { 812 Value length_limit = NULL; 813 814 IfOp* ifop = length->as_IfOp(); 815 if (ifop != NULL) { 816 // look for expressions like min(v, a.length) which ends up as 817 // x > y ? y : x or x >= y ? y : x | 774 } 775 } 776 } 777 // at least pass along a good guess 778 if (expected_type == NULL) expected_type = dst_exact_type; 779 if (expected_type == NULL) expected_type = src_declared_type; 780 if (expected_type == NULL) expected_type = dst_declared_type; 781 782 src_objarray = (src_exact_type && src_exact_type->is_obj_array_klass()) || (src_declared_type && src_declared_type->is_obj_array_klass()); 783 dst_objarray = (dst_exact_type && dst_exact_type->is_obj_array_klass()) || (dst_declared_type && dst_declared_type->is_obj_array_klass()); 784 } 785 786 // if a probable array type has been identified, figure out if any 787 // of the required checks for a fast case can be elided. 788 int flags = LIR_OpArrayCopy::all_flags; 789 790 if (!src->is_loaded_flattened_array() && !dst->is_loaded_flattened_array()) { 791 flags &= ~LIR_OpArrayCopy::always_slow_path; 792 } 793 if (!src->maybe_flattened_array()) { 794 flags &= ~LIR_OpArrayCopy::src_valuetype_check; 795 } 796 if (!dst->maybe_flattened_array() && !dst->maybe_null_free_array()) { 797 flags &= ~LIR_OpArrayCopy::dst_valuetype_check; 798 } 799 800 if (!src_objarray) 801 flags &= ~LIR_OpArrayCopy::src_objarray; 802 if (!dst_objarray) 803 flags &= ~LIR_OpArrayCopy::dst_objarray; 804 805 if (!x->arg_needs_null_check(0)) 806 flags &= ~LIR_OpArrayCopy::src_null_check; 807 if (!x->arg_needs_null_check(2)) 808 flags &= ~LIR_OpArrayCopy::dst_null_check; 809 810 811 if (expected_type != NULL) { 812 Value length_limit = NULL; 813 814 IfOp* ifop = length->as_IfOp(); 815 if (ifop != NULL) { 816 // look for expressions like min(v, a.length) which ends up as 817 // x > y ? y : x or x >= y ? y : x |