diff 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
line wrap: on
line diff
--- a/src/share/vm/opto/graphKit.cpp	Wed Apr 22 17:03:18 2009 -0700
+++ b/src/share/vm/opto/graphKit.cpp	Thu Apr 23 14:04:24 2009 -0700
@@ -2980,6 +2980,7 @@
 // See comments on new_instance for the meaning of the other arguments.
 Node* GraphKit::new_array(Node* klass_node,     // array klass (maybe variable)
                           Node* length,         // number of array elements
+                          int   nargs,          // number of arguments to push back for uncommon trap
                           bool raw_mem_only,    // affect only raw memory
                           Node* *return_size_val) {
   jint  layout_con = Klass::_lh_neutral_value;
@@ -2995,6 +2996,7 @@
     Node* cmp_lh = _gvn.transform( new(C, 3) CmpINode(layout_val, intcon(layout_con)) );
     Node* bol_lh = _gvn.transform( new(C, 2) BoolNode(cmp_lh, BoolTest::eq) );
     { BuildCutout unless(this, bol_lh, PROB_MAX);
+      _sp += nargs;
       uncommon_trap(Deoptimization::Reason_class_check,
                     Deoptimization::Action_maybe_recompile);
     }