1
0
mirror of https://github.com/golang/go synced 2024-11-22 20:24:47 -07:00

cmd/compile: eliminate repetitive code

Change-Id: I02c8b65f7c1c1606c9964ab6c54d5ab5f1b444a5
GitHub-Last-Rev: 3d740b9ac1
GitHub-Pull-Request: golang/go#47242
Reviewed-on: https://go-review.googlesource.com/c/go/+/334990
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com>
This commit is contained in:
wangyuntao 2021-07-16 10:29:05 +00:00 committed by Matthew Dempsky
parent 62f88b6dc8
commit c927599783

View File

@ -116,12 +116,11 @@ func (v *bottomUpVisitor) visit(n *Func) uint32 {
var i int
for i = len(v.stack) - 1; i >= 0; i-- {
x := v.stack[i]
v.nodeID[x] = ^uint32(0)
if x == n {
break
}
v.nodeID[x] = ^uint32(0)
}
v.nodeID[n] = ^uint32(0)
block := v.stack[i:]
// Run escape analysis on this set of functions.
v.stack = v.stack[:i]