mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: remove duplicated zeroing of outgoing args
Outgoing arg zeroing code is inserted at walk.go:paramstoheap. Don't do it twice. Change-Id: I70afac6af9e39b3efce0a6a79d6193428d922708 Reviewed-on: https://go-review.googlesource.com/37863 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
parent
027500ce38
commit
e471ad9189
1 changed files with 0 additions and 11 deletions
|
|
@ -335,17 +335,6 @@ func compile(fn *Node) {
|
|||
|
||||
saveerrors()
|
||||
|
||||
if Curfn.Type.FuncType().Outnamed {
|
||||
// add clearing of the output parameters
|
||||
for _, t := range Curfn.Type.Results().Fields().Slice() {
|
||||
if t.Nname != nil {
|
||||
n := nod(OAS, t.Nname, nil)
|
||||
n = typecheck(n, Etop)
|
||||
Curfn.Nbody.Prepend(n)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
order(Curfn)
|
||||
if nerrors != 0 {
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue