cmd/5g etc: mechanical cleanup
Run rsc.io/grind rev 796d0f2 on C->Go conversions.
This replaces various awkward := initializations with plain var declarations.
Checked bit-for-bit compatibility with toolstash + buildall.
Change-Id: I601101d8177894adb9b0e3fb55dfe0ed4f544716
Reviewed-on: https://go-review.googlesource.com/6517
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
diff --git a/src/cmd/internal/gc/popt.go b/src/cmd/internal/gc/popt.go
index 756f8eb..1346128 100644
--- a/src/cmd/internal/gc/popt.go
+++ b/src/cmd/internal/gc/popt.go
@@ -283,7 +283,7 @@
mark(firstp)
// pass 3: delete dead code (mostly JMPs).
- last := (*obj.Prog)(nil)
+ var last *obj.Prog
for p := firstp; p != nil; p = p.Link {
if p.Opt == dead {
@@ -315,7 +315,7 @@
// pass 4: elide JMP to next instruction.
// only safe if there are no jumps to JMPs anymore.
if jmploop == 0 {
- last := (*obj.Prog)(nil)
+ var last *obj.Prog
for p := firstp; p != nil; p = p.Link {
if p.As == obj.AJMP && p.To.Type == obj.TYPE_BRANCH && p.To.U.Branch == p.Link {
if Debug['R'] != 0 && Debug['v'] != 0 {
@@ -1187,7 +1187,7 @@
// avoid problems like:
// _ = *x // should panic
// for {} // no writes but infinite loop may be considered visible
- last := (*Flow)(nil)
+ var last *Flow
for f := Uniqs(fcheck); f != nil; f = Uniqs(f) {
p = f.Prog