Commit e471ad91 authored by Cherry Zhang's avatar Cherry Zhang

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: 's avatarMatthew Dempsky <mdempsky@google.com>
parent 027500ce
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment