Commit b2c391b7 authored by Aliaksandr Valialkin's avatar Aliaksandr Valialkin Committed by Brad Fitzpatrick

cmd/compile/internal/gc: shrink Sym by 8 bytes on amd64

Move 8-bit flags field after 32-bit Block field

Change-Id: I8e5e9a2285477aac2402a839a105e710d5340224
Reviewed-on: https://go-review.googlesource.com/37848
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 67d69f89
......@@ -51,15 +51,14 @@ type Sym struct {
Pkg *Pkg
Name string // object name
Def *Node // definition: ONAME OTYPE OPACK or OLITERAL
Block int32 // blocknumber to catch redeclaration
Lastlineno src.XPos // last declaration for diagnostic
Block int32 // blocknumber to catch redeclaration
flags bitset8
Label *Node // corresponding label (ephemeral)
Origpkg *Pkg // original package for . import
Lsym *obj.LSym
Fsym *Sym // funcsym
flags bitset8
}
const (
......
......@@ -26,7 +26,7 @@ func TestSizeof(t *testing.T) {
{Name{}, 36, 56},
{Param{}, 28, 56},
{Node{}, 84, 136},
{Sym{}, 64, 120},
{Sym{}, 64, 112},
{Type{}, 60, 96},
{MapType{}, 20, 40},
{ForwardType{}, 20, 32},
......
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