769 // First remove corresponding def-use edge |
769 // First remove corresponding def-use edge |
770 Node *n = in(idx); |
770 Node *n = in(idx); |
771 if (n != NULL) n->del_out((Node *)this); |
771 if (n != NULL) n->del_out((Node *)this); |
772 _in[idx] = in(--_cnt); // Compact the array |
772 _in[idx] = in(--_cnt); // Compact the array |
773 _in[_cnt] = NULL; // NULL out emptied slot |
773 _in[_cnt] = NULL; // NULL out emptied slot |
|
774 } |
|
775 |
|
776 //------------------------------del_req_ordered-------------------------------- |
|
777 // Delete the required edge and compact the edge array with preserved order |
|
778 void Node::del_req_ordered( uint idx ) { |
|
779 assert( idx < _cnt, "oob"); |
|
780 assert( !VerifyHashTableKeys || _hash_lock == 0, |
|
781 "remove node from hash table before modifying it"); |
|
782 // First remove corresponding def-use edge |
|
783 Node *n = in(idx); |
|
784 if (n != NULL) n->del_out((Node *)this); |
|
785 if (idx < _cnt - 1) { // Not last edge ? |
|
786 Copy::conjoint_words_to_lower((HeapWord*)&_in[idx+1], (HeapWord*)&_in[idx], ((_cnt-idx-1)*sizeof(Node*))); |
|
787 } |
|
788 _in[--_cnt] = NULL; // NULL out emptied slot |
774 } |
789 } |
775 |
790 |
776 //------------------------------ins_req---------------------------------------- |
791 //------------------------------ins_req---------------------------------------- |
777 // Insert a new required input at the end |
792 // Insert a new required input at the end |
778 void Node::ins_req( uint idx, Node *n ) { |
793 void Node::ins_req( uint idx, Node *n ) { |