]> Cypherpunks.ru repositories - gostls13.git/commit
[dev.regabi] cmd/compile: transform closures during walk
authorMatthew Dempsky <mdempsky@google.com>
Tue, 12 Jan 2021 20:12:27 +0000 (12:12 -0800)
committerMatthew Dempsky <mdempsky@google.com>
Tue, 12 Jan 2021 23:23:00 +0000 (23:23 +0000)
commit41352fd401f4f22eceeca375361e018ea787f0fd
treeeb54348f6f5c5ed06ee4a2e35e78bf8a4b885d54
parentd6ad88b4db454813e1bdf09635cd853fe3b7ef13
[dev.regabi] cmd/compile: transform closures during walk

We used to transform directly called closures in a separate pass
before walk, because we couldn't guarantee whether we'd see the
closure call or the closure itself first. As of the last CL, this
ordering is always guaranteed, so we can rewrite calls and the closure
at the same time.

Change-Id: Ia6f4d504c24795e41500108589b53395d301123b
Reviewed-on: https://go-review.googlesource.com/c/go/+/283315
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/gc/main.go
src/cmd/compile/internal/walk/closure.go
src/cmd/compile/internal/walk/expr.go