[dev.regabi] cmd/compile: remove idempotent Name() calls [generated]

[git-generate]
cd src/cmd/compile/internal/ir
pkgs=$(grep -l -w Name ../*/*.go | xargs dirname | sort -u | grep -v '/ir$')
rf '
	ex . '"$(echo $pkgs)"' {
		var n *Name
		n.Name() -> n
	}
'

Change-Id: I6bfce6417a6dba833d2f652ae212a32c11bc5ef6
Reviewed-on: https://go-review.googlesource.com/c/go/+/280972
Trust: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
This commit is contained in:
Matthew Dempsky 2020-12-31 18:25:35 -08:00
parent dfbcff80c6
commit fd22df9905
17 changed files with 59 additions and 59 deletions

View file

@ -1835,7 +1835,7 @@ func oldname(s *types.Sym) ir.Node {
// the := it looks like a reference to the outer x so we'll
// make x a closure variable unnecessarily.
n := n.(*ir.Name)
c := n.Name().Innermost
c := n.Innermost
if c == nil || c.Curfn != ir.CurFunc {
// Do not have a closure var for the active closure yet; make one.
c = typecheck.NewName(s)
@ -1845,8 +1845,8 @@ func oldname(s *types.Sym) ir.Node {
// Link into list of active closure variables.
// Popped from list in func funcLit.
c.Outer = n.Name().Innermost
n.Name().Innermost = c
c.Outer = n.Innermost
n.Innermost = c
ir.CurFunc.ClosureVars = append(ir.CurFunc.ClosureVars, c)
}