]> Cypherpunks repositories - gostls13.git/commit
cmd/link: make Pciter more idiomatic
authorJosh Bleecher Snyder <josharian@gmail.com>
Fri, 12 Apr 2019 20:06:52 +0000 (13:06 -0700)
committerJosh Bleecher Snyder <josharian@gmail.com>
Fri, 12 Apr 2019 21:41:09 +0000 (21:41 +0000)
commit6d64dd731b55de5c018552d8e62cc75da5d05331
treef530f651dfc638edf54b52d8bc2b5ab33982abbe
parent134ef176f0ebe7e47cd69a400f73cb310a3152c0
cmd/link: make Pciter more idiomatic

Rename it to PCIter and convert it to use methods.

Set pcscale once, during construction, to make call sites clearer.

Change some ints to bools.

Use a simple iteration termination condition,
instead of the cap comparison from the c2go translation.

Instead of requiring a Pcdata, which requires one caller
to synthesize a fake Pcdata, just ask for a byte slice.

Passes toolstash-check.

Change-Id: I811da0e929cf4a806bd6d70357ccf2911cd0c737
Reviewed-on: https://go-review.googlesource.com/c/go/+/171770
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/link/internal/ld/dwarf.go
src/cmd/link/internal/ld/lib.go
src/cmd/link/internal/ld/link.go
src/cmd/link/internal/ld/pcln.go