Skip to content

Commit

Permalink
cmd/compile: remove missed int(lineno) conversions
Browse files Browse the repository at this point in the history
Follow-up to https://go-review.googlesource.com/20131 .

Change-Id: Id8351fa39f24e6ea488cdbfcb855b69a31ffff31
Reviewed-on: https://go-review.googlesource.com/20134
Run-TryBot: Robert Griesemer <[email protected]>
TryBot-Result: Gobot Gobot <[email protected]>
Reviewed-by: Matthew Dempsky <[email protected]>
  • Loading branch information
griesemer committed Mar 2, 2016
1 parent 83765d1 commit 3a880ba
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/cmd/compile/internal/gc/inl.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func fnpkg(fn *Node) *Pkg {
// Lazy typechecking of imported bodies. For local functions, caninl will set ->typecheck
// because they're a copy of an already checked body.
func typecheckinl(fn *Node) {
lno := int(setlineno(fn))
lno := setlineno(fn)

// typecheckinl is only for imported functions;
// their bodies may refer to unsafe as long as the package
Expand All @@ -92,7 +92,7 @@ func typecheckinl(fn *Node) {

safemode = save_safemode

lineno = int32(lno)
lineno = lno
}

// Caninl determines whether fn is inlineable.
Expand Down Expand Up @@ -391,7 +391,7 @@ func inlnode(np **Node) {
return
}

lno := int(setlineno(n))
lno := setlineno(n)

inlnodelist(n.Ninit)
for l := n.Ninit; l != nil; l = l.Next {
Expand Down Expand Up @@ -517,7 +517,7 @@ func inlnode(np **Node) {
mkinlcall(np, n.Left.Type.Nname, n.Isddd)
}

lineno = int32(lno)
lineno = lno
}

func mkinlcall(np **Node, fn *Node, isddd bool) {
Expand Down Expand Up @@ -833,7 +833,7 @@ func mkinlcall1(np **Node, fn *Node, isddd bool) {
args := as.Rlist
as.Rlist = nil

setlno(call, int(n.Lineno))
setlno(call, n.Lineno)

as.Rlist = args

Expand Down Expand Up @@ -1019,26 +1019,26 @@ func inlsubst(n *Node) *Node {
}

// Plaster over linenumbers
func setlnolist(ll *NodeList, lno int) {
func setlnolist(ll *NodeList, lno int32) {
for ; ll != nil; ll = ll.Next {
setlno(ll.N, lno)
}
}

func setlnoslice(ll []*Node, lno int) {
func setlnoslice(ll []*Node, lno int32) {
for _, n := range ll {
setlno(n, lno)
}
}

func setlno(n *Node, lno int) {
func setlno(n *Node, lno int32) {
if n == nil {
return
}

// don't clobber names, unless they're freshly synthesized
if n.Op != ONAME || n.Lineno == 0 {
n.Lineno = int32(lno)
n.Lineno = lno
}

setlno(n.Left, lno)
Expand Down

0 comments on commit 3a880ba

Please sign in to comment.