hotspot/src/share/vm/opto/node.cpp
changeset 10011 e8b38f7b9959
parent 8921 14bfe81f2a9d
child 11446 fd87432a895b
--- a/hotspot/src/share/vm/opto/node.cpp	Tue Jun 28 15:04:39 2011 -0700
+++ b/hotspot/src/share/vm/opto/node.cpp	Tue Jun 28 15:24:29 2011 -0700
@@ -2012,6 +2012,16 @@
   _inode_top = _inodes + old_top;        // restore _top
 }
 
+// Node_Stack is used to map nodes.
+Node* Node_Stack::find(uint idx) const {
+  uint sz = size();
+  for (uint i=0; i < sz; i++) {
+    if (idx == index_at(i) )
+      return node_at(i);
+  }
+  return NULL;
+}
+
 //=============================================================================
 uint TypeNode::size_of() const { return sizeof(*this); }
 #ifndef PRODUCT