From 24a6478be345bce2c551c7f5f287ee1ad6edcbd6 Mon Sep 17 00:00:00 2001 From: Josh Bleecher Snyder Date: Thu, 18 Apr 2019 10:05:33 -0700 Subject: [PATCH] cmd/compile: use named fields in newnamel CL 172579 added field names in nodl. See that CL for an explanation. Cuong Manh Le pointed out that we should do the same in newnamel. This cuts 40k off the cmd/compile binary. Change-Id: I427b117531c59630dee36f1257aad8975626b2c2 Reviewed-on: https://go-review.googlesource.com/c/go/+/172604 Run-TryBot: Josh Bleecher Snyder Reviewed-by: Brad Fitzpatrick TryBot-Result: Gobot Gobot --- src/cmd/compile/internal/gc/subr.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/cmd/compile/internal/gc/subr.go b/src/cmd/compile/internal/gc/subr.go index 5e74bee031..55b96e5c9b 100644 --- a/src/cmd/compile/internal/gc/subr.go +++ b/src/cmd/compile/internal/gc/subr.go @@ -347,13 +347,13 @@ func newnamel(pos src.XPos, s *types.Sym) *Node { } var x struct { - Node - Name - Param + n Node + m Name + p Param } - n := &x.Node - n.Name = &x.Name - n.Name.Param = &x.Param + n := &x.n + n.Name = &x.m + n.Name.Param = &x.p n.Op = ONAME n.Pos = pos -- 2.48.1