src/share/vm/opto/callnode.cpp

changeset 3419
b0ff910edfc9
parent 3407
35acf8f0a2e4
child 3651
ee138854b3a6
     1.1 --- a/src/share/vm/opto/callnode.cpp	Thu Jan 12 12:28:59 2012 -0800
     1.2 +++ b/src/share/vm/opto/callnode.cpp	Thu Jan 12 14:45:04 2012 -0800
     1.3 @@ -1625,21 +1625,20 @@
     1.4  
     1.5  //=============================================================================
     1.6  bool LockNode::is_nested_lock_region() {
     1.7 -  Node* box = box_node();
     1.8 -  if (!box->is_BoxLock() || box->as_BoxLock()->stack_slot() <= 0)
     1.9 +  BoxLockNode* box = box_node()->as_BoxLock();
    1.10 +  int stk_slot = box->stack_slot();
    1.11 +  if (stk_slot <= 0)
    1.12      return false; // External lock or it is not Box (Phi node).
    1.13  
    1.14    // Ignore complex cases: merged locks or multiple locks.
    1.15 -  BoxLockNode* box_lock = box->as_BoxLock();
    1.16    Node* obj = obj_node();
    1.17    LockNode* unique_lock = NULL;
    1.18 -  if (!box_lock->is_simple_lock_region(&unique_lock, obj) ||
    1.19 +  if (!box->is_simple_lock_region(&unique_lock, obj) ||
    1.20        (unique_lock != this)) {
    1.21      return false;
    1.22    }
    1.23  
    1.24    // Look for external lock for the same object.
    1.25 -  int stk_slot = box_lock->stack_slot();
    1.26    SafePointNode* sfn = this->as_SafePoint();
    1.27    JVMState* youngest_jvms = sfn->jvms();
    1.28    int max_depth = youngest_jvms->depth();
    1.29 @@ -1649,7 +1648,7 @@
    1.30      // Loop over monitors
    1.31      for (int idx = 0; idx < num_mon; idx++) {
    1.32        Node* obj_node = sfn->monitor_obj(jvms, idx);
    1.33 -      BoxLockNode* box_node = BoxLockNode::box_node(sfn->monitor_box(jvms, idx));
    1.34 +      BoxLockNode* box_node = sfn->monitor_box(jvms, idx)->as_BoxLock();
    1.35        if ((box_node->stack_slot() < stk_slot) && obj_node->eqv_uncast(obj)) {
    1.36          return true;
    1.37        }

mercurial