Skip to content

Commit

Permalink
cmd/compile/internal/gc: remove unneeded Type.Pos field
Browse files Browse the repository at this point in the history
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: Robert Griesemer <gri@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
  • Loading branch information
mdempsky committed Mar 21, 2017
1 parent ee272bb commit 80c4b53
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/cmd/compile/internal/gc/sizeof_test.go
Expand Up @@ -27,7 +27,7 @@ func TestSizeof(t *testing.T) {
{Param{}, 28, 56},
{Node{}, 84, 136},
{Sym{}, 64, 112},
{Type{}, 60, 96},
{Type{}, 52, 88},
{MapType{}, 20, 40},
{ForwardType{}, 20, 32},
{FuncType{}, 28, 48},
Expand Down
6 changes: 2 additions & 4 deletions src/cmd/compile/internal/gc/type.go
Expand Up @@ -150,9 +150,8 @@ type Type struct {
sliceOf *Type
ptrTo *Type

Sym *Sym // symbol containing name, for named types
Vargen int32 // unique name for OTYPE/ONAME
Pos src.XPos // position at which this type was declared, implicitly or explicitly
Sym *Sym // symbol containing name, for named types
Vargen int32 // unique name for OTYPE/ONAME

Etype EType // kind of type
Trecur uint8 // to detect loops
Expand Down Expand Up @@ -408,7 +407,6 @@ func typ(et EType) *Type {
t := &Type{
Etype: et,
Width: BADWIDTH,
Pos: lineno,
}
t.Orig = t
// TODO(josharian): lazily initialize some of these?
Expand Down

0 comments on commit 80c4b53

Please sign in to comment.