]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: update comments to refer to Order methods
authorCuong Manh Le <cuong.manhle.vn@gmail.com>
Tue, 5 Nov 2019 16:56:35 +0000 (23:56 +0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 13 Nov 2019 15:52:21 +0000 (15:52 +0000)
Change-Id: I09090effcc5d814d4e024da3f944e825365588f1
Reviewed-on: https://go-review.googlesource.com/c/go/+/205477
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/compile/internal/gc/range.go
src/cmd/compile/internal/gc/walk.go

index 4744324a7c8fbc519cfb4691be8e275711ff0ef7..02131e32be8531c30b16b90eee072c2fef64f5e0 100644 (file)
@@ -216,7 +216,7 @@ func walkrange(n *Node) *Node {
                        return n
                }
 
-               // orderstmt arranged for a copy of the array/slice variable if needed.
+               // order.stmt arranged for a copy of the array/slice variable if needed.
                ha := a
 
                hv1 := temp(types.Types[TINT])
@@ -291,7 +291,7 @@ func walkrange(n *Node) *Node {
                n.List.Set1(a)
 
        case TMAP:
-               // orderstmt allocated the iterator for us.
+               // order.stmt allocated the iterator for us.
                // we only use a once, so no copy needed.
                ha := a
 
@@ -327,7 +327,7 @@ func walkrange(n *Node) *Node {
                }
 
        case TCHAN:
-               // orderstmt arranged for a copy of the channel variable.
+               // order.stmt arranged for a copy of the channel variable.
                ha := a
 
                n.Left = nil
@@ -371,7 +371,7 @@ func walkrange(n *Node) *Node {
                //   // original body
                // }
 
-               // orderstmt arranged for a copy of the string variable.
+               // order.stmt arranged for a copy of the string variable.
                ha := a
 
                hv1 := temp(types.Types[TINT])
index 82ec6f912d01c4538d7b96559ac78fb2f8c1c146..ef88db4742ceb4d8a4a4b7bccbfebcaa43872a21 100644 (file)
@@ -651,7 +651,7 @@ opswitch:
 
                case ORECV:
                        // x = <-c; n.Left is x, n.Right.Left is c.
-                       // orderstmt made sure x is addressable.
+                       // order.stmt made sure x is addressable.
                        n.Right.Left = walkexpr(n.Right.Left, init)
 
                        n1 := nod(OADDR, n.Left, nil)
@@ -753,7 +753,7 @@ opswitch:
                        key = r.Right
                } else {
                        // standard version takes key by reference
-                       // orderexpr made sure key is addressable.
+                       // order.expr made sure key is addressable.
                        key = nod(OADDR, r.Right, nil)
                }
 
@@ -806,7 +806,7 @@ opswitch:
                t := map_.Type
                fast := mapfast(t)
                if fast == mapslow {
-                       // orderstmt made sure key is addressable.
+                       // order.stmt made sure key is addressable.
                        key = nod(OADDR, key, nil)
                }
                n = mkcall1(mapfndel(mapdelete[fast], t), nil, init, typename(t), map_, key)
@@ -945,7 +945,7 @@ opswitch:
                        // Orderexpr arranged for n.Left to be a temporary for all
                        // the conversions it could see. Comparison of an interface
                        // with a non-interface, especially in a switch on interface value
-                       // with non-interface cases, is not visible to orderstmt, so we
+                       // with non-interface cases, is not visible to order.stmt, so we
                        // have to fall back on allocating a temp here.
                        if !islvalue(v) {
                                v = copyexpr(v, v.Type, init)
@@ -1098,7 +1098,7 @@ opswitch:
                        fast := mapfast(t)
                        if fast == mapslow {
                                // standard version takes key by reference.
-                               // orderexpr made sure key is addressable.
+                               // order.expr made sure key is addressable.
                                key = nod(OADDR, key, nil)
                        }
                        n = mkcall1(mapfn(mapassign[fast], t), nil, init, typename(t), map_, key)
@@ -1107,7 +1107,7 @@ opswitch:
                        fast := mapfast(t)
                        if fast == mapslow {
                                // standard version takes key by reference.
-                               // orderexpr made sure key is addressable.
+                               // order.expr made sure key is addressable.
                                key = nod(OADDR, key, nil)
                        }
 
@@ -2526,7 +2526,7 @@ func writebarrierfn(name string, l *types.Type, r *types.Type) *Node {
 }
 
 func addstr(n *Node, init *Nodes) *Node {
-       // orderexpr rewrote OADDSTR to have a list of strings.
+       // order.expr rewrote OADDSTR to have a list of strings.
        c := n.List.Len()
 
        if c < 2 {
@@ -2559,7 +2559,7 @@ func addstr(n *Node, init *Nodes) *Node {
        var fn string
        if c <= 5 {
                // small numbers of strings use direct runtime helpers.
-               // note: orderexpr knows this cutoff too.
+               // note: order.expr knows this cutoff too.
                fn = fmt.Sprintf("concatstring%d", c)
        } else {
                // large numbers of strings are passed to the runtime as a slice.