Mercurial > hg > truffle
comparison src/share/vm/opto/callnode.cpp @ 4778:35acf8f0a2e4
7128352: assert(obj_node == obj) failed
Summary: Compare uncasted object nodes.
Reviewed-by: never
author | kvn |
---|---|
date | Tue, 10 Jan 2012 18:05:38 -0800 |
parents | e9a5e0a812c8 |
children | b0ff910edfc9 |
comparison
equal
deleted
inserted
replaced
4777:e9a5e0a812c8 | 4778:35acf8f0a2e4 |
---|---|
1384 ProjNode *ctrl_proj = (ctrl->is_Proj()) ? ctrl->as_Proj() : NULL; | 1384 ProjNode *ctrl_proj = (ctrl->is_Proj()) ? ctrl->as_Proj() : NULL; |
1385 if (ctrl_proj != NULL && ctrl_proj->_con == TypeFunc::Control) { | 1385 if (ctrl_proj != NULL && ctrl_proj->_con == TypeFunc::Control) { |
1386 Node *n = ctrl_proj->in(0); | 1386 Node *n = ctrl_proj->in(0); |
1387 if (n != NULL && n->is_Unlock()) { | 1387 if (n != NULL && n->is_Unlock()) { |
1388 UnlockNode *unlock = n->as_Unlock(); | 1388 UnlockNode *unlock = n->as_Unlock(); |
1389 if ((lock->obj_node() == unlock->obj_node()) && | 1389 if (lock->obj_node()->eqv_uncast(unlock->obj_node()) && |
1390 BoxLockNode::same_slot(lock->box_node(), unlock->box_node()) && | 1390 BoxLockNode::same_slot(lock->box_node(), unlock->box_node()) && |
1391 !unlock->is_eliminated()) { | 1391 !unlock->is_eliminated()) { |
1392 lock_ops.append(unlock); | 1392 lock_ops.append(unlock); |
1393 return true; | 1393 return true; |
1394 } | 1394 } |
1429 ctrl = next_control(ctrl->in(0)); // keep searching | 1429 ctrl = next_control(ctrl->in(0)); // keep searching |
1430 } | 1430 } |
1431 } | 1431 } |
1432 if (ctrl->is_Lock()) { | 1432 if (ctrl->is_Lock()) { |
1433 LockNode *lock = ctrl->as_Lock(); | 1433 LockNode *lock = ctrl->as_Lock(); |
1434 if ((lock->obj_node() == unlock->obj_node()) && | 1434 if (lock->obj_node()->eqv_uncast(unlock->obj_node()) && |
1435 BoxLockNode::same_slot(lock->box_node(), unlock->box_node())) { | 1435 BoxLockNode::same_slot(lock->box_node(), unlock->box_node())) { |
1436 lock_result = lock; | 1436 lock_result = lock; |
1437 } | 1437 } |
1438 } | 1438 } |
1439 return lock_result; | 1439 return lock_result; |
1460 lock1_node = proj->unique_out(); | 1460 lock1_node = proj->unique_out(); |
1461 } | 1461 } |
1462 } | 1462 } |
1463 if (lock1_node != NULL && lock1_node->is_Lock()) { | 1463 if (lock1_node != NULL && lock1_node->is_Lock()) { |
1464 LockNode *lock1 = lock1_node->as_Lock(); | 1464 LockNode *lock1 = lock1_node->as_Lock(); |
1465 if ((lock->obj_node() == lock1->obj_node()) && | 1465 if (lock->obj_node()->eqv_uncast(lock1->obj_node()) && |
1466 BoxLockNode::same_slot(lock->box_node(), lock1->box_node()) && | 1466 BoxLockNode::same_slot(lock->box_node(), lock1->box_node()) && |
1467 !lock1->is_eliminated()) { | 1467 !lock1->is_eliminated()) { |
1468 lock_ops.append(lock1); | 1468 lock_ops.append(lock1); |
1469 return true; | 1469 return true; |
1470 } | 1470 } |
1648 int num_mon = jvms->nof_monitors(); | 1648 int num_mon = jvms->nof_monitors(); |
1649 // Loop over monitors | 1649 // Loop over monitors |
1650 for (int idx = 0; idx < num_mon; idx++) { | 1650 for (int idx = 0; idx < num_mon; idx++) { |
1651 Node* obj_node = sfn->monitor_obj(jvms, idx); | 1651 Node* obj_node = sfn->monitor_obj(jvms, idx); |
1652 BoxLockNode* box_node = BoxLockNode::box_node(sfn->monitor_box(jvms, idx)); | 1652 BoxLockNode* box_node = BoxLockNode::box_node(sfn->monitor_box(jvms, idx)); |
1653 if ((obj_node == obj) && (box_node->stack_slot() < stk_slot)) { | 1653 if ((box_node->stack_slot() < stk_slot) && obj_node->eqv_uncast(obj)) { |
1654 return true; | 1654 return true; |
1655 } | 1655 } |
1656 } | 1656 } |
1657 } | 1657 } |
1658 return false; | 1658 return false; |