]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile/internal/gc: remove unneeded Type.Pos field
authorMatthew Dempsky <mdempsky@google.com>
Mon, 20 Mar 2017 19:27:25 +0000 (12:27 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Tue, 21 Mar 2017 02:44:40 +0000 (02:44 +0000)
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>
src/cmd/compile/internal/gc/sizeof_test.go
src/cmd/compile/internal/gc/type.go

index 55b400f3966aa766e522faa5f60fa1907e43d61f..6d130b7ead4d6aca6e4643fb0a6e857d240c6772 100644 (file)
@@ -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},
index 8beba292f6ca53a5428020592cfdb7b1d3dac8f5..f9e3b60d7bf5c0552e61b5817a4c89558545744b 100644 (file)
@@ -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
@@ -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?