< prev index next >

src/hotspot/share/c1/c1_GraphBuilder.cpp

Print this page
rev 48535 : [mq]: 8194984
   1 /*
   2  * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


1529     // released before we jump to the continuation block.
1530     if (method()->is_synchronized()) {
1531       assert(state()->locks_size() == 1, "receiver must be locked here");
1532       monitorexit(state()->lock_at(0), SynchronizationEntryBCI);
1533     }
1534 
1535     if (need_mem_bar) {
1536       append(new MemBar(lir_membar_storestore));
1537     }
1538 
1539     // State at end of inlined method is the state of the caller
1540     // without the method parameters on stack, including the
1541     // return value, if any, of the inlined method on operand stack.
1542     set_state(state()->caller_state()->copy_for_parsing());
1543     if (x != NULL) {
1544       if (!ignore_return) {
1545         state()->push(x->type(), x);
1546       }
1547       if (profile_return() && x->type()->is_object_kind()) {
1548         ciMethod* caller = state()->scope()->method();
1549         ciMethodData* md = caller->method_data_or_null();
1550         ciProfileData* data = md->bci_to_data(invoke_bci);
1551         profile_return_type(x, method(), caller, invoke_bci);
1552       }
1553     }
1554     Goto* goto_callee = new Goto(continuation(), false);
1555 
1556     // See whether this is the first return; if so, store off some
1557     // of the state for later examination
1558     if (num_returns() == 0) {
1559       set_inline_cleanup_info();
1560     }
1561 
1562     // The current bci() is in the wrong scope, so use the bci() of
1563     // the continuation point.
1564     append_with_bci(goto_callee, scope_data()->continuation()->bci());
1565     incr_num_returns();
1566     return;
1567   }
1568 
1569   state()->truncate_stack(0);
1570   if (method()->is_synchronized()) {


   1 /*
   2  * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


1529     // released before we jump to the continuation block.
1530     if (method()->is_synchronized()) {
1531       assert(state()->locks_size() == 1, "receiver must be locked here");
1532       monitorexit(state()->lock_at(0), SynchronizationEntryBCI);
1533     }
1534 
1535     if (need_mem_bar) {
1536       append(new MemBar(lir_membar_storestore));
1537     }
1538 
1539     // State at end of inlined method is the state of the caller
1540     // without the method parameters on stack, including the
1541     // return value, if any, of the inlined method on operand stack.
1542     set_state(state()->caller_state()->copy_for_parsing());
1543     if (x != NULL) {
1544       if (!ignore_return) {
1545         state()->push(x->type(), x);
1546       }
1547       if (profile_return() && x->type()->is_object_kind()) {
1548         ciMethod* caller = state()->scope()->method();


1549         profile_return_type(x, method(), caller, invoke_bci);
1550       }
1551     }
1552     Goto* goto_callee = new Goto(continuation(), false);
1553 
1554     // See whether this is the first return; if so, store off some
1555     // of the state for later examination
1556     if (num_returns() == 0) {
1557       set_inline_cleanup_info();
1558     }
1559 
1560     // The current bci() is in the wrong scope, so use the bci() of
1561     // the continuation point.
1562     append_with_bci(goto_callee, scope_data()->continuation()->bci());
1563     incr_num_returns();
1564     return;
1565   }
1566 
1567   state()->truncate_stack(0);
1568   if (method()->is_synchronized()) {


< prev index next >