From 2d4c95565a770227ef2943b68ebe9fac02f79377 Mon Sep 17 00:00:00 2001 From: Matthew Dempsky Date: Sat, 5 Dec 2020 16:33:59 -0800 Subject: [PATCH] [dev.regabi] cmd/compile: change nowritebarrierrec to use map[*ir.Func] All of the uses were already using *ir.Func index operands, so only needs the map type itself updated. Passes buildall w/ toolstash -cmp. Updates #42982. Change-Id: I568d8601f3eb077e07e887f2071aa1a2667d803c Reviewed-on: https://go-review.googlesource.com/c/go/+/275754 Reviewed-by: Cuong Manh Le Trust: Matthew Dempsky Run-TryBot: Matthew Dempsky --- src/cmd/compile/internal/gc/dcl.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cmd/compile/internal/gc/dcl.go b/src/cmd/compile/internal/gc/dcl.go index 56f8d1b9bf..5936aeb950 100644 --- a/src/cmd/compile/internal/gc/dcl.go +++ b/src/cmd/compile/internal/gc/dcl.go @@ -838,7 +838,7 @@ type nowritebarrierrecChecker struct { // extraCalls contains extra function calls that may not be // visible during later analysis. It maps from the ODCLFUNC of // the caller to a list of callees. - extraCalls map[ir.Node][]nowritebarrierrecCall + extraCalls map[*ir.Func][]nowritebarrierrecCall // curfn is the current function during AST walks. curfn *ir.Func @@ -853,7 +853,7 @@ type nowritebarrierrecCall struct { // must be called before transformclosure and walk. func newNowritebarrierrecChecker() *nowritebarrierrecChecker { c := &nowritebarrierrecChecker{ - extraCalls: make(map[ir.Node][]nowritebarrierrecCall), + extraCalls: make(map[*ir.Func][]nowritebarrierrecCall), } // Find all systemstack calls and record their targets. In @@ -929,7 +929,7 @@ func (c *nowritebarrierrecChecker) check() { // that are directly marked go:nowritebarrierrec are in this // map with a zero-valued nowritebarrierrecCall. This also // acts as the set of marks for the BFS of the call graph. - funcs := make(map[ir.Node]nowritebarrierrecCall) + funcs := make(map[*ir.Func]nowritebarrierrecCall) // q is the queue of ODCLFUNC Nodes to visit in BFS order. var q ir.NameQueue