1
0
mirror of https://github.com/golang/go synced 2024-11-18 09:54:57 -07:00

cmd/internal/obj: change started to bool

Change-Id: I90143e3c6e95a1495f300ffeb10de554aa41f56a
Reviewed-on: https://go-review.googlesource.com/37889
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Matthew Dempsky 2017-03-07 10:44:12 -08:00
parent b91b694b37
commit b1a4424a52

View File

@ -44,13 +44,13 @@ func funcpctab(ctxt *Link, dst *Pcdata, func_ *LSym, desc string, valfunc func(*
ctxt.Logf("%6x %6d %v\n", uint64(pc), val, func_.Text)
}
started := int32(0)
started := false
var delta uint32
for p := func_.Text; p != nil; p = p.Link {
// Update val. If it's not changing, keep going.
val = valfunc(ctxt, func_, val, p, 0, arg)
if val == oldval && started != 0 {
if val == oldval && started {
val = valfunc(ctxt, func_, val, p, 1, arg)
if dbg {
ctxt.Logf("%6x %6s %v\n", uint64(p.Pc), "", p)
@ -88,7 +88,7 @@ func funcpctab(ctxt *Link, dst *Pcdata, func_ *LSym, desc string, valfunc func(*
ctxt.Logf("%6x %6d %v\n", uint64(p.Pc), val, p)
}
if started != 0 {
if started {
addvarint(dst, uint32((p.Pc-pc)/int64(ctxt.Arch.MinLC)))
pc = p.Pc
}
@ -101,11 +101,11 @@ func funcpctab(ctxt *Link, dst *Pcdata, func_ *LSym, desc string, valfunc func(*
}
addvarint(dst, delta)
oldval = val
started = 1
started = true
val = valfunc(ctxt, func_, val, p, 1, arg)
}
if started != 0 {
if started {
if dbg {
ctxt.Logf("%6x done\n", uint64(func_.Text.Pc+func_.Size))
}