mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: remove more superfluous int(lineno) conversions
Change-Id: Ia3e5d62b9d38a6c356baec8eb88b2bdabff5820f Reviewed-on: https://go-review.googlesource.com/20150 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Robert Griesemer <gri@golang.org>
This commit is contained in:
parent
8a83d36b8e
commit
c41608f4ac
13 changed files with 58 additions and 62 deletions
|
|
@ -123,15 +123,12 @@ func dowidth(t *Type) {
|
|||
}
|
||||
|
||||
if t.Width == -2 {
|
||||
lno := int(lineno)
|
||||
lineno = int32(t.Lineno)
|
||||
if !t.Broke {
|
||||
t.Broke = true
|
||||
Yyerror("invalid recursive type %v", t)
|
||||
yyerrorl(int32(t.Lineno), "invalid recursive type %v", t)
|
||||
}
|
||||
|
||||
t.Width = 0
|
||||
lineno = int32(lno)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -144,7 +141,7 @@ func dowidth(t *Type) {
|
|||
// defer checkwidth calls until after we're done
|
||||
defercalc++
|
||||
|
||||
lno := int(lineno)
|
||||
lno := lineno
|
||||
lineno = int32(t.Lineno)
|
||||
t.Width = -2
|
||||
t.Align = 0
|
||||
|
|
@ -320,7 +317,7 @@ func dowidth(t *Type) {
|
|||
t.Align = uint8(w)
|
||||
}
|
||||
|
||||
lineno = int32(lno)
|
||||
lineno = lno
|
||||
|
||||
if defercalc == 1 {
|
||||
resumecheckwidth()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue