hotspot/src/share/vm/opto/node.cpp
changeset 19708 64e8c91f5f3e
parent 17384 4e6ea5fa04ad
child 22234 da823d78ad65
child 22854 2787e48d6df9
--- a/hotspot/src/share/vm/opto/node.cpp	Fri Aug 23 03:14:54 2013 -0700
+++ b/hotspot/src/share/vm/opto/node.cpp	Fri Aug 23 11:41:37 2013 -0700
@@ -773,6 +773,21 @@
   _in[_cnt] = NULL;       // NULL out emptied slot
 }
 
+//------------------------------del_req_ordered--------------------------------
+// Delete the required edge and compact the edge array with preserved order
+void Node::del_req_ordered( uint idx ) {
+  assert( idx < _cnt, "oob");
+  assert( !VerifyHashTableKeys || _hash_lock == 0,
+          "remove node from hash table before modifying it");
+  // First remove corresponding def-use edge
+  Node *n = in(idx);
+  if (n != NULL) n->del_out((Node *)this);
+  if (idx < _cnt - 1) { // Not last edge ?
+    Copy::conjoint_words_to_lower((HeapWord*)&_in[idx+1], (HeapWord*)&_in[idx], ((_cnt-idx-1)*sizeof(Node*)));
+  }
+  _in[--_cnt] = NULL;   // NULL out emptied slot
+}
+
 //------------------------------ins_req----------------------------------------
 // Insert a new required input at the end
 void Node::ins_req( uint idx, Node *n ) {