Commit 24a6478b authored by Josh Bleecher Snyder's avatar Josh Bleecher Snyder

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: default avatarBrad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 3e2ceaf4
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment