diff options
author | Matthew Dempsky <mdempsky@google.com> | 2021-01-05 08:20:11 -0800 |
---|---|---|
committer | Matthew Dempsky <mdempsky@google.com> | 2021-01-05 21:12:11 +0000 |
commit | 98218388321c0c48a4b955792b8d1e3db63a140d (patch) | |
tree | baf143ecebd0a2c470edff01806b6bcd4c82613b /src/cmd/compile/internal/typecheck/stmt.go | |
parent | fd43831f4476dc9a3ba83aa3a2e4117ed0b8596e (diff) | |
download | go-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/typecheck/stmt.go')
-rw-r--r-- | src/cmd/compile/internal/typecheck/stmt.go | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/src/cmd/compile/internal/typecheck/stmt.go b/src/cmd/compile/internal/typecheck/stmt.go index d90d13b44c..8baa5dda78 100644 --- a/src/cmd/compile/internal/typecheck/stmt.go +++ b/src/cmd/compile/internal/typecheck/stmt.go @@ -228,7 +228,6 @@ func plural(n int) string { // tcFor typechecks an OFOR node. func tcFor(n *ir.ForStmt) ir.Node { Stmts(n.Init()) - decldepth++ n.Cond = Expr(n.Cond) n.Cond = DefaultLit(n.Cond, nil) if n.Cond != nil { @@ -242,7 +241,6 @@ func tcFor(n *ir.ForStmt) ir.Node { Stmts(n.Late) } Stmts(n.Body) - decldepth-- return n } @@ -337,9 +335,7 @@ func tcRange(n *ir.RangeStmt) { n.Value = AssignExpr(n.Value) } - decldepth++ Stmts(n.Body) - decldepth-- } // tcReturn typechecks an ORETURN node. |