From: Cuong Manh Le Date: Tue, 5 Nov 2019 16:56:35 +0000 (+0700) Subject: cmd/compile: update comments to refer to Order methods X-Git-Tag: go1.14beta1~212 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=bf4990522263503a1219372cd8f1ee9422b51324;p=gostls13.git cmd/compile: update comments to refer to Order methods Change-Id: I09090effcc5d814d4e024da3f944e825365588f1 Reviewed-on: https://go-review.googlesource.com/c/go/+/205477 Run-TryBot: Cuong Manh Le TryBot-Result: Gobot Gobot Reviewed-by: Brad Fitzpatrick --- diff --git a/src/cmd/compile/internal/gc/range.go b/src/cmd/compile/internal/gc/range.go index 4744324a7c..02131e32be 100644 --- a/src/cmd/compile/internal/gc/range.go +++ b/src/cmd/compile/internal/gc/range.go @@ -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]) diff --git a/src/cmd/compile/internal/gc/walk.go b/src/cmd/compile/internal/gc/walk.go index 82ec6f912d..ef88db4742 100644 --- a/src/cmd/compile/internal/gc/walk.go +++ b/src/cmd/compile/internal/gc/walk.go @@ -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.