comparison src/share/vm/opto/graphKit.cpp @ 730:9c6be3edf0dc

6589834: deoptimization problem with -XX:+DeoptimizeALot Summary: Relocate the stack pointer adjustment to where uncommon_trap is actually inserted for new_array. Reviewed-by: kvn, jrose
author cfang
date Thu, 23 Apr 2009 14:04:24 -0700
parents be93aad57795
children c96bf21b756f
comparison
equal deleted inserted replaced
729:04fa5affa478 730:9c6be3edf0dc
2978 // helper for both newarray and anewarray 2978 // helper for both newarray and anewarray
2979 // The 'length' parameter is (obviously) the length of the array. 2979 // The 'length' parameter is (obviously) the length of the array.
2980 // See comments on new_instance for the meaning of the other arguments. 2980 // See comments on new_instance for the meaning of the other arguments.
2981 Node* GraphKit::new_array(Node* klass_node, // array klass (maybe variable) 2981 Node* GraphKit::new_array(Node* klass_node, // array klass (maybe variable)
2982 Node* length, // number of array elements 2982 Node* length, // number of array elements
2983 int nargs, // number of arguments to push back for uncommon trap
2983 bool raw_mem_only, // affect only raw memory 2984 bool raw_mem_only, // affect only raw memory
2984 Node* *return_size_val) { 2985 Node* *return_size_val) {
2985 jint layout_con = Klass::_lh_neutral_value; 2986 jint layout_con = Klass::_lh_neutral_value;
2986 Node* layout_val = get_layout_helper(klass_node, layout_con); 2987 Node* layout_val = get_layout_helper(klass_node, layout_con);
2987 int layout_is_con = (layout_val == NULL); 2988 int layout_is_con = (layout_val == NULL);
2993 // so that we can fold up all the address arithmetic. 2994 // so that we can fold up all the address arithmetic.
2994 layout_con = Klass::array_layout_helper(T_OBJECT); 2995 layout_con = Klass::array_layout_helper(T_OBJECT);
2995 Node* cmp_lh = _gvn.transform( new(C, 3) CmpINode(layout_val, intcon(layout_con)) ); 2996 Node* cmp_lh = _gvn.transform( new(C, 3) CmpINode(layout_val, intcon(layout_con)) );
2996 Node* bol_lh = _gvn.transform( new(C, 2) BoolNode(cmp_lh, BoolTest::eq) ); 2997 Node* bol_lh = _gvn.transform( new(C, 2) BoolNode(cmp_lh, BoolTest::eq) );
2997 { BuildCutout unless(this, bol_lh, PROB_MAX); 2998 { BuildCutout unless(this, bol_lh, PROB_MAX);
2999 _sp += nargs;
2998 uncommon_trap(Deoptimization::Reason_class_check, 3000 uncommon_trap(Deoptimization::Reason_class_check,
2999 Deoptimization::Action_maybe_recompile); 3001 Deoptimization::Action_maybe_recompile);
3000 } 3002 }
3001 layout_val = NULL; 3003 layout_val = NULL;
3002 layout_is_con = true; 3004 layout_is_con = true;