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 <cuong.manhle.vn@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
diff --git a/src/cmd/compile/internal/gc/range.go b/src/cmd/compile/internal/gc/range.go
index 4744324..02131e3 100644
--- a/src/cmd/compile/internal/gc/range.go
+++ b/src/cmd/compile/internal/gc/range.go
@@ -216,7 +216,7 @@
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 @@
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 @@
}
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 @@
// // 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 82ec6f9..ef88db4 100644
--- a/src/cmd/compile/internal/gc/walk.go
+++ b/src/cmd/compile/internal/gc/walk.go
@@ -651,7 +651,7 @@
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 @@
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 @@
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 @@
// 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 @@
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 @@
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 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 @@
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.