1
0
mirror of https://github.com/golang/go synced 2024-10-01 18:28:32 -06:00

cmd/compile: move LSym.RefIdx for better packing

Change-Id: I0516d49ee8381c5e022d77c2fb41515c01c8a631
Reviewed-on: https://go-review.googlesource.com/20764
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
This commit is contained in:
Josh Bleecher Snyder 2016-03-16 12:41:55 -07:00
parent 31a9e50524
commit 826831acf7
2 changed files with 4 additions and 3 deletions

View File

@ -314,7 +314,6 @@ type LSym struct {
Leaf uint8
Seenglobl uint8
Onlist uint8
RefIdx int // Index of this symbol in the symbol reference list.
// ReflectMethod means the function may call reflect.Type.Method or
// reflect.Type.MethodByName. Matching is imprecise (as reflect.Type
@ -330,7 +329,9 @@ type LSym struct {
// visible outside of the module (shared library or executable) that contains its
// definition. (When not compiling to support Go shared libraries, all symbols are
// local in this sense unless there is a cgo_export_* directive).
Local bool
Local bool
RefIdx int // Index of this symbol in the symbol reference list.
Args int32
Locals int32
Size int64

View File

@ -23,7 +23,7 @@ func TestSizeof(t *testing.T) {
_64bit uintptr // size on 64bit platforms
}{
{Addr{}, 52, 80},
{LSym{}, 84, 144},
{LSym{}, 80, 136},
{Prog{}, 196, 288},
}