diff src/share/vm/opto/node.cpp @ 605:98cb887364d3

6810672: Comment typos Summary: I have collected some typos I have found while looking at the code. Reviewed-by: kvn, never
author twisti
date Fri, 27 Feb 2009 13:27:09 -0800
parents ab075d07f1ba
children cff162798819
line wrap: on
line diff
--- a/src/share/vm/opto/node.cpp	Fri Feb 27 08:34:19 2009 -0800
+++ b/src/share/vm/opto/node.cpp	Fri Feb 27 13:27:09 2009 -0800
@@ -968,22 +968,23 @@
 // Example: when reshape "(X+3)+4" into "X+7" you must leave the Node for
 // "X+3" unchanged in case it is shared.
 //
-// If you modify the 'this' pointer's inputs, you must use 'set_req' with
-// def-use info.  If you are making a new Node (either as the new root or
-// some new internal piece) you must NOT use set_req with def-use info.
-// You can make a new Node with either 'new' or 'clone'.  In either case,
-// def-use info is (correctly) not generated.
+// If you modify the 'this' pointer's inputs, you should use
+// 'set_req'.  If you are making a new Node (either as the new root or
+// some new internal piece) you may use 'init_req' to set the initial
+// value.  You can make a new Node with either 'new' or 'clone'.  In
+// either case, def-use info is correctly maintained.
+//
 // Example: reshape "(X+3)+4" into "X+7":
-//    set_req(1,in(1)->in(1) /* grab X */, du /* must use DU on 'this' */);
-//    set_req(2,phase->intcon(7),du);
+//    set_req(1, in(1)->in(1));
+//    set_req(2, phase->intcon(7));
 //    return this;
-// Example: reshape "X*4" into "X<<1"
-//    return new (C,3) LShiftINode( in(1), phase->intcon(1) );
+// Example: reshape "X*4" into "X<<2"
+//    return new (C,3) LShiftINode(in(1), phase->intcon(2));
 //
 // You must call 'phase->transform(X)' on any new Nodes X you make, except
-// for the returned root node.  Example: reshape "X*31" with "(X<<5)-1".
+// for the returned root node.  Example: reshape "X*31" with "(X<<5)-X".
 //    Node *shift=phase->transform(new(C,3)LShiftINode(in(1),phase->intcon(5)));
-//    return new (C,3) AddINode(shift, phase->intcon(-1));
+//    return new (C,3) AddINode(shift, in(1));
 //
 // When making a Node for a constant use 'phase->makecon' or 'phase->intcon'.
 // These forms are faster than 'phase->transform(new (C,1) ConNode())' and Do
@@ -1679,7 +1680,7 @@
   if (visited.member(this))  return;
   visited.push(this);
 
-  // Walk over all input edges, checking for correspondance
+  // Walk over all input edges, checking for correspondence
   for( i = 0; i < len(); i++ ) {
     n = in(i);
     if (n != NULL && !n->is_top()) {
@@ -1723,7 +1724,7 @@
   // Contained in new_space or old_space?
   VectorSet *v = C->node_arena()->contains(n) ? &new_space : &old_space;
   // Check for visited in the proper space.  Numberings are not unique
-  // across spaces so we need a seperate VectorSet for each space.
+  // across spaces so we need a separate VectorSet for each space.
   if( v->test_set(n->_idx) ) return;
 
   if (n->is_Con() && n->bottom_type() == Type::TOP) {