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 { ...@@ -51,15 +51,14 @@ type Sym struct {
Pkg *Pkg Pkg *Pkg
Name string // object name Name string // object name
Def *Node // definition: ONAME OTYPE OPACK or OLITERAL Def *Node // definition: ONAME OTYPE OPACK or OLITERAL
Block int32 // blocknumber to catch redeclaration
Lastlineno src.XPos // last declaration for diagnostic Lastlineno src.XPos // last declaration for diagnostic
Block int32 // blocknumber to catch redeclaration
flags bitset8
Label *Node // corresponding label (ephemeral) Label *Node // corresponding label (ephemeral)
Origpkg *Pkg // original package for . import Origpkg *Pkg // original package for . import
Lsym *obj.LSym Lsym *obj.LSym
Fsym *Sym // funcsym Fsym *Sym // funcsym
flags bitset8
} }
const ( const (
......
...@@ -26,7 +26,7 @@ func TestSizeof(t *testing.T) { ...@@ -26,7 +26,7 @@ func TestSizeof(t *testing.T) {
{Name{}, 36, 56}, {Name{}, 36, 56},
{Param{}, 28, 56}, {Param{}, 28, 56},
{Node{}, 84, 136}, {Node{}, 84, 136},
{Sym{}, 64, 120}, {Sym{}, 64, 112},
{Type{}, 60, 96}, {Type{}, 60, 96},
{MapType{}, 20, 40}, {MapType{}, 20, 40},
{ForwardType{}, 20, 32}, {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