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 <josharian@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Josh Bleecher Snyder 2019-04-18 10:05:33 -07:00
parent 3e2ceaf4de
commit 24a6478be3

View file

@ -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