aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/gc/main.go
diff options
context:
space:
mode:
authorMatthew Dempsky <mdempsky@google.com>2021-01-05 08:20:11 -0800
committerMatthew Dempsky <mdempsky@google.com>2021-01-05 21:12:11 +0000
commit98218388321c0c48a4b955792b8d1e3db63a140d (patch)
treebaf143ecebd0a2c470edff01806b6bcd4c82613b /src/cmd/compile/internal/gc/main.go
parentfd43831f4476dc9a3ba83aa3a2e4117ed0b8596e (diff)
downloadgo-98218388321c0c48a4b955792b8d1e3db63a140d.tar.gz
go-98218388321c0c48a4b955792b8d1e3db63a140d.zip
[dev.regabi] cmd/compile: remove CaptureVars
Capture analysis is now part of escape analysis. Passes toolstash -cmp. Change-Id: Ifcd3ecc342074c590e0db1ff0646dfa1ea2ff57b Reviewed-on: https://go-review.googlesource.com/c/go/+/281543 Trust: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Diffstat (limited to 'src/cmd/compile/internal/gc/main.go')
-rw-r--r--src/cmd/compile/internal/gc/main.go16
1 files changed, 0 insertions, 16 deletions
diff --git a/src/cmd/compile/internal/gc/main.go b/src/cmd/compile/internal/gc/main.go
index 2ea614e17f..c3756309ea 100644
--- a/src/cmd/compile/internal/gc/main.go
+++ b/src/cmd/compile/internal/gc/main.go
@@ -232,22 +232,6 @@ func Main(archInit func(*ssagen.ArchInfo)) {
}
typecheck.IncrementalAddrtaken = true
- // Decide how to capture closed variables.
- // This needs to run before escape analysis,
- // because variables captured by value do not escape.
- base.Timer.Start("fe", "capturevars")
- for _, n := range typecheck.Target.Decls {
- if n.Op() == ir.ODCLFUNC {
- n := n.(*ir.Func)
- if n.OClosure != nil {
- ir.CurFunc = n
- typecheck.CaptureVars(n)
- }
- }
- }
- typecheck.CaptureVarsComplete = true
- ir.CurFunc = nil
-
if base.Debug.TypecheckInl != 0 {
// Typecheck imported function bodies if Debug.l > 1,
// otherwise lazily when used or re-exported.