]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: move LSym.RefIdx for better packing
authorJosh Bleecher Snyder <josharian@gmail.com>
Wed, 16 Mar 2016 19:41:55 +0000 (12:41 -0700)
committerJosh Bleecher Snyder <josharian@gmail.com>
Wed, 16 Mar 2016 20:52:33 +0000 (20:52 +0000)
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>
src/cmd/internal/obj/link.go
src/cmd/internal/obj/sizeof_test.go

index cbf4bf4183df3d6df05aac647aee78eb3c3e65fd..ad496021a1ad643708b485c388ab1d4404b4f8ab 100644 (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
index 14bdbe20dc8c8deccd64599ebbf466381a8ea577..f7173d3c4c01cfe7dbe5fcf1fe68f8fcc4faf638 100644 (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},
        }