1
0
mirror of https://github.com/golang/go synced 2024-11-23 03:20:03 -07:00

cmd/compile: eliminate repetitive code

This commit is contained in:
wangyuntao 2021-07-16 18:20:51 +08:00
parent aa4e0f528e
commit 3d740b9ac1

View File

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