Commit 6a5cfa8b authored by Matthew Dempsky's avatar Matthew Dempsky

cmd/compile: remove two out-of-phase calls to walk

All calls to walkstmt/walkexpr/etc should be rooted from funccompile,
whereas transformclosure and fninit are called by main.

Passes toolstash-check.

Change-Id: Ic880e2d2d83af09618ce4daa8e7716f6b389e53e
Reviewed-on: https://go-review.googlesource.com/99418
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 8b766e5d
......@@ -417,7 +417,6 @@ func transformclosure(xfunc *Node) {
if len(body) > 0 {
typecheckslice(body, Etop)
walkstmtlist(body)
xfunc.Func.Enter.Set(body)
xfunc.Func.SetNeedctxt(true)
}
......
......@@ -182,7 +182,6 @@ func fninit(n []*Node) {
loop.Ninit.Set1(zero)
loop = typecheck(loop, Etop)
loop = walkstmt(loop)
r = append(r, loop)
}
......
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