mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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:
parent
3e2ceaf4de
commit
24a6478be3
1 changed files with 6 additions and 6 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue