Commit 80c4b53e authored by Matthew Dempsky's avatar Matthew Dempsky

cmd/compile/internal/gc: remove unneeded Type.Pos field

Change-Id: I9ab650d9d2d0a99186009362454e1eabc9f6bad6
Reviewed-on: https://go-review.googlesource.com/38393
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarRobert Griesemer <gri@golang.org>
Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent ee272bbf
...@@ -27,7 +27,7 @@ func TestSizeof(t *testing.T) { ...@@ -27,7 +27,7 @@ func TestSizeof(t *testing.T) {
{Param{}, 28, 56}, {Param{}, 28, 56},
{Node{}, 84, 136}, {Node{}, 84, 136},
{Sym{}, 64, 112}, {Sym{}, 64, 112},
{Type{}, 60, 96}, {Type{}, 52, 88},
{MapType{}, 20, 40}, {MapType{}, 20, 40},
{ForwardType{}, 20, 32}, {ForwardType{}, 20, 32},
{FuncType{}, 28, 48}, {FuncType{}, 28, 48},
......
...@@ -150,9 +150,8 @@ type Type struct { ...@@ -150,9 +150,8 @@ type Type struct {
sliceOf *Type sliceOf *Type
ptrTo *Type ptrTo *Type
Sym *Sym // symbol containing name, for named types Sym *Sym // symbol containing name, for named types
Vargen int32 // unique name for OTYPE/ONAME Vargen int32 // unique name for OTYPE/ONAME
Pos src.XPos // position at which this type was declared, implicitly or explicitly
Etype EType // kind of type Etype EType // kind of type
Trecur uint8 // to detect loops Trecur uint8 // to detect loops
...@@ -408,7 +407,6 @@ func typ(et EType) *Type { ...@@ -408,7 +407,6 @@ func typ(et EType) *Type {
t := &Type{ t := &Type{
Etype: et, Etype: et,
Width: BADWIDTH, Width: BADWIDTH,
Pos: lineno,
} }
t.Orig = t t.Orig = t
// TODO(josharian): lazily initialize some of these? // TODO(josharian): lazily initialize some of these?
......
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