提交 b9bfd3d8 编写于 作者: R rasbold

6730192: expression stack wrong at deoptimization point

Summary: add safepoint before popping expression stack, not after
Reviewed-by: kvn
上级 b4e0131b
...@@ -925,9 +925,6 @@ void Parse::do_ifnull(BoolTest::mask btest, Node *c) { ...@@ -925,9 +925,6 @@ void Parse::do_ifnull(BoolTest::mask btest, Node *c) {
return; return;
} }
// If this is a backwards branch in the bytecodes, add Safepoint
maybe_add_safepoint(target_bci);
explicit_null_checks_inserted++; explicit_null_checks_inserted++;
// Generate real control flow // Generate real control flow
...@@ -1009,9 +1006,6 @@ void Parse::do_if(BoolTest::mask btest, Node* c) { ...@@ -1009,9 +1006,6 @@ void Parse::do_if(BoolTest::mask btest, Node* c) {
return; return;
} }
// If this is a backwards branch in the bytecodes, add Safepoint
maybe_add_safepoint(target_bci);
// Sanity check the probability value // Sanity check the probability value
assert(0.0f < prob && prob < 1.0f,"Bad probability in Parser"); assert(0.0f < prob && prob < 1.0f,"Bad probability in Parser");
...@@ -2100,6 +2094,8 @@ void Parse::do_one_bytecode() { ...@@ -2100,6 +2094,8 @@ void Parse::do_one_bytecode() {
case Bytecodes::_ifnull: btest = BoolTest::eq; goto handle_if_null; case Bytecodes::_ifnull: btest = BoolTest::eq; goto handle_if_null;
case Bytecodes::_ifnonnull: btest = BoolTest::ne; goto handle_if_null; case Bytecodes::_ifnonnull: btest = BoolTest::ne; goto handle_if_null;
handle_if_null: handle_if_null:
// If this is a backwards branch in the bytecodes, add Safepoint
maybe_add_safepoint(iter().get_dest());
a = null(); a = null();
b = pop(); b = pop();
c = _gvn.transform( new (C, 3) CmpPNode(b, a) ); c = _gvn.transform( new (C, 3) CmpPNode(b, a) );
...@@ -2109,6 +2105,8 @@ void Parse::do_one_bytecode() { ...@@ -2109,6 +2105,8 @@ void Parse::do_one_bytecode() {
case Bytecodes::_if_acmpeq: btest = BoolTest::eq; goto handle_if_acmp; case Bytecodes::_if_acmpeq: btest = BoolTest::eq; goto handle_if_acmp;
case Bytecodes::_if_acmpne: btest = BoolTest::ne; goto handle_if_acmp; case Bytecodes::_if_acmpne: btest = BoolTest::ne; goto handle_if_acmp;
handle_if_acmp: handle_if_acmp:
// If this is a backwards branch in the bytecodes, add Safepoint
maybe_add_safepoint(iter().get_dest());
a = pop(); a = pop();
b = pop(); b = pop();
c = _gvn.transform( new (C, 3) CmpPNode(b, a) ); c = _gvn.transform( new (C, 3) CmpPNode(b, a) );
...@@ -2122,6 +2120,8 @@ void Parse::do_one_bytecode() { ...@@ -2122,6 +2120,8 @@ void Parse::do_one_bytecode() {
case Bytecodes::_ifgt: btest = BoolTest::gt; goto handle_ifxx; case Bytecodes::_ifgt: btest = BoolTest::gt; goto handle_ifxx;
case Bytecodes::_ifge: btest = BoolTest::ge; goto handle_ifxx; case Bytecodes::_ifge: btest = BoolTest::ge; goto handle_ifxx;
handle_ifxx: handle_ifxx:
// If this is a backwards branch in the bytecodes, add Safepoint
maybe_add_safepoint(iter().get_dest());
a = _gvn.intcon(0); a = _gvn.intcon(0);
b = pop(); b = pop();
c = _gvn.transform( new (C, 3) CmpINode(b, a) ); c = _gvn.transform( new (C, 3) CmpINode(b, a) );
...@@ -2135,6 +2135,8 @@ void Parse::do_one_bytecode() { ...@@ -2135,6 +2135,8 @@ void Parse::do_one_bytecode() {
case Bytecodes::_if_icmpgt: btest = BoolTest::gt; goto handle_if_icmp; case Bytecodes::_if_icmpgt: btest = BoolTest::gt; goto handle_if_icmp;
case Bytecodes::_if_icmpge: btest = BoolTest::ge; goto handle_if_icmp; case Bytecodes::_if_icmpge: btest = BoolTest::ge; goto handle_if_icmp;
handle_if_icmp: handle_if_icmp:
// If this is a backwards branch in the bytecodes, add Safepoint
maybe_add_safepoint(iter().get_dest());
a = pop(); a = pop();
b = pop(); b = pop();
c = _gvn.transform( new (C, 3) CmpINode( b, a ) ); c = _gvn.transform( new (C, 3) CmpINode( b, a ) );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册