]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: more lineno type conversions
authorMatthew Dempsky <mdempsky@google.com>
Thu, 3 Mar 2016 04:32:40 +0000 (20:32 -0800)
committerMatthew Dempsky <mdempsky@google.com>
Thu, 3 Mar 2016 04:59:13 +0000 (04:59 +0000)
Change-Id: Ib0a116a78f61eafe88a0ea5dc6733750ae755fdf
Reviewed-on: https://go-review.googlesource.com/20156
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/cmd/compile/internal/gc/align.go
src/cmd/compile/internal/gc/go.go
src/cmd/compile/internal/gc/subr.go

index 03c6a0e936303b213e3ab15638e4083d9406e4ec..e5d7e6b93efd8efab64e09979ab9d506bb041a6f 100644 (file)
@@ -125,7 +125,7 @@ func dowidth(t *Type) {
        if t.Width == -2 {
                if !t.Broke {
                        t.Broke = true
-                       yyerrorl(int32(t.Lineno), "invalid recursive type %v", t)
+                       yyerrorl(t.Lineno, "invalid recursive type %v", t)
                }
 
                t.Width = 0
@@ -142,7 +142,7 @@ func dowidth(t *Type) {
        defercalc++
 
        lno := lineno
-       lineno = int32(t.Lineno)
+       lineno = t.Lineno
        t.Width = -2
        t.Align = 0
 
index 43158e06044a92da35979ce1eaa34bd3c99e85b2..e1b75d1b0cca42bcac1a1f97fb449aea6241aaa8 100644 (file)
@@ -104,7 +104,7 @@ type Type struct {
 
        Nod    *Node // canonical OTYPE node
        Orig   *Type // original type (type literal or predefined type)
-       Lineno int
+       Lineno int32
 
        // TFUNC
        Thistuple int
index 72bdfb24f917219f2a6763cc023322907820d3fb..b8bd66c7b199632851c58a341da7fdbbfdc59875 100644 (file)
@@ -391,7 +391,7 @@ func typ(et EType) *Type {
        t := new(Type)
        t.Etype = et
        t.Width = BADWIDTH
-       t.Lineno = int(lineno)
+       t.Lineno = lineno
        t.Orig = t
        return t
 }