mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.regabi] cmd/compile: remove Nodes.Set [generated]
Just "=". It's cleaner.
Passes toolstash -cmp.
[git-generate]
cd src/cmd/compile/internal/ir
pkgs=$(go list . ../...)
rf '
ex '"$(echo $pkgs)"' {
var l Nodes
var p *Nodes
p.Set(l) -> *p = l
}
ex '"$(echo $pkgs)"' {
var n InitNode
var l Nodes
*n.PtrInit() = l -> n.SetInit(l)
}
rm Nodes.Set
'
Change-Id: Ic97219792243667146a02776553942ae1189ff7d
Reviewed-on: https://go-review.googlesource.com/c/go/+/281002
Trust: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
This commit is contained in:
parent
2f2d4b4e68
commit
f2538033c0
21 changed files with 74 additions and 78 deletions
|
|
@ -264,7 +264,7 @@ func walkReturn(n *ir.ReturnStmt) ir.Node {
|
|||
// move function calls out, to make ascompatee's job easier.
|
||||
walkExprListSafe(n.Results, n.PtrInit())
|
||||
|
||||
n.Results.Set(ascompatee(n.Op(), rl, n.Results, n.PtrInit()))
|
||||
n.Results = ascompatee(n.Op(), rl, n.Results, n.PtrInit())
|
||||
return n
|
||||
}
|
||||
walkExprList(n.Results, n.PtrInit())
|
||||
|
|
@ -281,7 +281,7 @@ func walkReturn(n *ir.ReturnStmt) ir.Node {
|
|||
a := ir.NewAssignStmt(base.Pos, nname, rhs[i])
|
||||
res[i] = convas(a, n.PtrInit())
|
||||
}
|
||||
n.Results.Set(res)
|
||||
n.Results = res
|
||||
return n
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue