mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.regabi] cmd/compile: rename addinit(n, init) to initExpr(init, n)
Recreated manually to push below some CLs it depended on. Change-Id: I1b3316fcdce39cbb33e5cbb471f5cd1cd2efc1f5 Reviewed-on: https://go-review.googlesource.com/c/go/+/274599 Trust: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
parent
6e30fc10fc
commit
7e81135be7
5 changed files with 11 additions and 11 deletions
|
|
@ -180,7 +180,7 @@ func walkstmt(n ir.Node) ir.Node {
|
|||
n = mkcall1(chanfn("chanrecv1", 2, n.Left().Type()), nil, &init, n.Left(), nodnil())
|
||||
n = walkexpr(n, &init)
|
||||
|
||||
n = addinit(n, init.Slice())
|
||||
n = initExpr(init.Slice(), n)
|
||||
|
||||
case ir.OBREAK,
|
||||
ir.OCONTINUE,
|
||||
|
|
@ -268,7 +268,7 @@ func walkstmt(n ir.Node) ir.Node {
|
|||
init := n.Left().Init()
|
||||
n.Left().PtrInit().Set(nil)
|
||||
n.SetLeft(walkexpr(n.Left(), &init))
|
||||
n.SetLeft(addinit(n.Left(), init.Slice()))
|
||||
n.SetLeft(initExpr(init.Slice(), n.Left()))
|
||||
}
|
||||
|
||||
n.SetRight(walkstmt(n.Right()))
|
||||
|
|
@ -557,7 +557,7 @@ opswitch:
|
|||
var ll ir.Nodes
|
||||
|
||||
n.SetRight(walkexpr(n.Right(), &ll))
|
||||
n.SetRight(addinit(n.Right(), ll.Slice()))
|
||||
n.SetRight(initExpr(ll.Slice(), n.Right()))
|
||||
|
||||
case ir.OPRINT, ir.OPRINTN:
|
||||
n = walkprint(n, init)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue