Commit d40bb738 authored by Josh Bleecher Snyder's avatar Josh Bleecher Snyder

cmd/compile: remove types.Sym.lsym

It was just a cache, and the CL series yesterday
removed 40% of the calls to types.Linksym in make.bash.

Testing atop CL 40693 (backend concurrency)
indicates that removing it is actually a very minor
performance improvement.

Passes toolstash-check.

Change-Id: I97c2973036964acdd11b3cb842bc31f33ae60389
Reviewed-on: https://go-review.googlesource.com/41492
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 90bd5ecc
......@@ -22,7 +22,7 @@ func TestSizeof(t *testing.T) {
_32bit uintptr // size on 32bit platforms
_64bit uintptr // size on 64bit platforms
}{
{Sym{}, 56, 96},
{Sym{}, 52, 88},
{Type{}, 52, 88},
{Map{}, 20, 40},
{Forward{}, 20, 32},
......
......@@ -31,7 +31,6 @@ type Sym struct {
flags bitset8
Label *Node // corresponding label (ephemeral)
Origpkg *Pkg // original package for . import
lsym *obj.LSym
}
const (
......@@ -78,8 +77,5 @@ func (sym *Sym) Linksym() *obj.LSym {
if sym == nil {
return nil
}
if sym.lsym == nil {
sym.lsym = Ctxt.Lookup(sym.LinksymName())
}
return sym.lsym
return Ctxt.Lookup(sym.LinksymName())
}
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