6730192: expression stack wrong at deoptimization point

Tue, 29 Jul 2008 14:48:25 -0700

author
rasbold
date
Tue, 29 Jul 2008 14:48:25 -0700
changeset 689
3e333d6f35dd
parent 688
b0fe4deeb9fb
child 690
ef72a36b968e

6730192: expression stack wrong at deoptimization point
Summary: add safepoint before popping expression stack, not after
Reviewed-by: kvn

src/share/vm/opto/parse2.cpp file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/vm/opto/parse2.cpp	Mon Jul 28 17:12:52 2008 -0700
     1.2 +++ b/src/share/vm/opto/parse2.cpp	Tue Jul 29 14:48:25 2008 -0700
     1.3 @@ -925,9 +925,6 @@
     1.4      return;
     1.5    }
     1.6  
     1.7 -  // If this is a backwards branch in the bytecodes, add Safepoint
     1.8 -  maybe_add_safepoint(target_bci);
     1.9 -
    1.10    explicit_null_checks_inserted++;
    1.11  
    1.12    // Generate real control flow
    1.13 @@ -1009,9 +1006,6 @@
    1.14      return;
    1.15    }
    1.16  
    1.17 -  // If this is a backwards branch in the bytecodes, add Safepoint
    1.18 -  maybe_add_safepoint(target_bci);
    1.19 -
    1.20    // Sanity check the probability value
    1.21    assert(0.0f < prob && prob < 1.0f,"Bad probability in Parser");
    1.22  
    1.23 @@ -2100,6 +2094,8 @@
    1.24    case Bytecodes::_ifnull:    btest = BoolTest::eq; goto handle_if_null;
    1.25    case Bytecodes::_ifnonnull: btest = BoolTest::ne; goto handle_if_null;
    1.26    handle_if_null:
    1.27 +    // If this is a backwards branch in the bytecodes, add Safepoint
    1.28 +    maybe_add_safepoint(iter().get_dest());
    1.29      a = null();
    1.30      b = pop();
    1.31      c = _gvn.transform( new (C, 3) CmpPNode(b, a) );
    1.32 @@ -2109,6 +2105,8 @@
    1.33    case Bytecodes::_if_acmpeq: btest = BoolTest::eq; goto handle_if_acmp;
    1.34    case Bytecodes::_if_acmpne: btest = BoolTest::ne; goto handle_if_acmp;
    1.35    handle_if_acmp:
    1.36 +    // If this is a backwards branch in the bytecodes, add Safepoint
    1.37 +    maybe_add_safepoint(iter().get_dest());
    1.38      a = pop();
    1.39      b = pop();
    1.40      c = _gvn.transform( new (C, 3) CmpPNode(b, a) );
    1.41 @@ -2122,6 +2120,8 @@
    1.42    case Bytecodes::_ifgt: btest = BoolTest::gt; goto handle_ifxx;
    1.43    case Bytecodes::_ifge: btest = BoolTest::ge; goto handle_ifxx;
    1.44    handle_ifxx:
    1.45 +    // If this is a backwards branch in the bytecodes, add Safepoint
    1.46 +    maybe_add_safepoint(iter().get_dest());
    1.47      a = _gvn.intcon(0);
    1.48      b = pop();
    1.49      c = _gvn.transform( new (C, 3) CmpINode(b, a) );
    1.50 @@ -2135,6 +2135,8 @@
    1.51    case Bytecodes::_if_icmpgt: btest = BoolTest::gt; goto handle_if_icmp;
    1.52    case Bytecodes::_if_icmpge: btest = BoolTest::ge; goto handle_if_icmp;
    1.53    handle_if_icmp:
    1.54 +    // If this is a backwards branch in the bytecodes, add Safepoint
    1.55 +    maybe_add_safepoint(iter().get_dest());
    1.56      a = pop();
    1.57      b = pop();
    1.58      c = _gvn.transform( new (C, 3) CmpINode( b, a ) );

mercurial