mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: remove Value.RemoveArg
It's only used in two places: - The one in regalloc.go can be replaced with v.resetArgs() - The one in rewrite.go can be open coded and can cause wrong usage like the bug that CL 358117 fixed. Change-Id: I125baf237db159d056fe4b1c73072331eea4d06a Reviewed-on: https://go-review.googlesource.com/c/go/+/357965 Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com> Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
This commit is contained in:
parent
8dbf3e9393
commit
f686f6a963
3 changed files with 6 additions and 8 deletions
|
|
@ -1840,7 +1840,7 @@ func (s *regAllocState) regalloc(f *Func) {
|
|||
if s.f.pass.debug > regDebug {
|
||||
fmt.Printf("delete copied value %s\n", c.LongString())
|
||||
}
|
||||
c.RemoveArg(0)
|
||||
c.resetArgs()
|
||||
f.freeValue(c)
|
||||
delete(s.copies, c)
|
||||
progress = true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue