mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00: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:
parent
31a9e50524
commit
826831acf7
2 changed files with 4 additions and 3 deletions
|
|
@ -314,7 +314,6 @@ type LSym struct {
|
||||||
Leaf uint8
|
Leaf uint8
|
||||||
Seenglobl uint8
|
Seenglobl uint8
|
||||||
Onlist uint8
|
Onlist uint8
|
||||||
RefIdx int // Index of this symbol in the symbol reference list.
|
|
||||||
|
|
||||||
// ReflectMethod means the function may call reflect.Type.Method or
|
// ReflectMethod means the function may call reflect.Type.Method or
|
||||||
// reflect.Type.MethodByName. Matching is imprecise (as reflect.Type
|
// 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
|
// visible outside of the module (shared library or executable) that contains its
|
||||||
// definition. (When not compiling to support Go shared libraries, all symbols are
|
// definition. (When not compiling to support Go shared libraries, all symbols are
|
||||||
// local in this sense unless there is a cgo_export_* directive).
|
// 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
|
Args int32
|
||||||
Locals int32
|
Locals int32
|
||||||
Size int64
|
Size int64
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ func TestSizeof(t *testing.T) {
|
||||||
_64bit uintptr // size on 64bit platforms
|
_64bit uintptr // size on 64bit platforms
|
||||||
}{
|
}{
|
||||||
{Addr{}, 52, 80},
|
{Addr{}, 52, 80},
|
||||||
{LSym{}, 84, 144},
|
{LSym{}, 80, 136},
|
||||||
{Prog{}, 196, 288},
|
{Prog{}, 196, 288},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue