From 116b82354ce53dea7b139039adbda3231689b02d Mon Sep 17 00:00:00 2001 From: Sergey Slukin Date: Sat, 22 Mar 2025 21:15:18 +0300 Subject: [PATCH] cmd/compile: changed variable name due to shadowing of package name min Change-Id: I52e5de04d137238d6f6779edcc662f5c7433c61e Reviewed-on: https://go-review.googlesource.com/c/go/+/660195 Reviewed-by: Keith Randall Reviewed-by: Keith Randall Reviewed-by: Robert Griesemer LUCI-TryBot-Result: Go LUCI --- src/cmd/compile/internal/ir/scc.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/cmd/compile/internal/ir/scc.go b/src/cmd/compile/internal/ir/scc.go index b6056040f7..7beacc7849 100644 --- a/src/cmd/compile/internal/ir/scc.go +++ b/src/cmd/compile/internal/ir/scc.go @@ -22,7 +22,7 @@ package ir // Second, each function becomes two virtual nodes in the graph, // with numbers n and n+1. We record the function's node number as n // but search from node n+1. If the search tells us that the component -// number (min) is n+1, we know that this is a trivial component: one function +// number (minVisitGen) is n+1, we know that this is a trivial component: one function // plus its closures. If the search tells us that the component number is // n, then there was a path from node n+1 back to node n, meaning that // the function set is mutually recursive. The escape analysis can be @@ -70,13 +70,13 @@ func (v *bottomUpVisitor) visit(n *Func) uint32 { id := v.visitgen v.nodeID[n] = id v.visitgen++ - min := v.visitgen + minVisitGen := v.visitgen v.stack = append(v.stack, n) do := func(defn Node) { if defn != nil { - if m := v.visit(defn.(*Func)); m < min { - min = m + if m := v.visit(defn.(*Func)); m < minVisitGen { + minVisitGen = m } } } @@ -97,13 +97,13 @@ func (v *bottomUpVisitor) visit(n *Func) uint32 { } }) - if (min == id || min == id+1) && !n.IsClosure() { + if (minVisitGen == id || minVisitGen == id+1) && !n.IsClosure() { // This node is the root of a strongly connected component. - // The original min was id+1. If the bottomUpVisitor found its way + // The original minVisitGen was id+1. If the bottomUpVisitor found its way // back to id, then this block is a set of mutually recursive functions. // Otherwise, it's just a lone function that does not recurse. - recursive := min == id + recursive := minVisitGen == id // Remove connected component from stack and mark v.nodeID so that future // visits return a large number, which will not affect the caller's min. @@ -121,5 +121,5 @@ func (v *bottomUpVisitor) visit(n *Func) uint32 { v.analyze(block, recursive) } - return min + return minVisitGen } -- 2.50.0