From 5a16d6fc34c89a46b04545f21bee3e93f3146902 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Tue, 3 Mar 2015 22:20:44 -0500 Subject: [PATCH] cmd/5g etc: tweak import blocks Remove blank lines and merge lone imports into blocks. Change-Id: Ib46dad584456909969f1ba3a2c7f5667abf336ae Reviewed-on: https://go-review.googlesource.com/6792 Reviewed-by: Brad Fitzpatrick Reviewed-by: Rob Pike --- src/cmd/5g/cgen.go | 2 +- src/cmd/5g/cgen64.go | 2 +- src/cmd/5g/galign.go | 2 +- src/cmd/5g/ggen.go | 2 +- src/cmd/5g/gsubr.go | 2 +- src/cmd/5g/peep.go | 2 +- src/cmd/5g/prog.go | 2 +- src/cmd/5l/asm.go | 2 +- src/cmd/5l/obj.go | 2 +- src/cmd/6g/cgen.go | 3 +-- src/cmd/6g/galign.go | 2 +- src/cmd/6g/ggen.go | 2 +- src/cmd/6g/gsubr.go | 2 +- src/cmd/6g/peep.go | 2 +- src/cmd/6g/prog.go | 2 +- src/cmd/6g/reg.go | 2 +- src/cmd/6l/asm.go | 2 +- src/cmd/6l/obj.go | 2 +- src/cmd/8g/cgen.go | 2 +- src/cmd/8g/cgen64.go | 2 +- src/cmd/8g/galign.go | 2 +- src/cmd/8g/ggen.go | 2 +- src/cmd/8g/gsubr.go | 2 +- src/cmd/8g/peep.go | 2 +- src/cmd/8g/prog.go | 2 +- src/cmd/8l/asm.go | 2 +- src/cmd/8l/obj.go | 2 +- src/cmd/9g/cgen.go | 2 +- src/cmd/9g/galign.go | 2 +- src/cmd/9g/ggen.go | 2 +- src/cmd/9g/gsubr.go | 2 +- src/cmd/9g/peep.go | 2 +- src/cmd/9g/prog.go | 2 +- src/cmd/9l/asm.go | 2 +- src/cmd/9l/obj.go | 2 +- 35 files changed, 35 insertions(+), 36 deletions(-) diff --git a/src/cmd/5g/cgen.go b/src/cmd/5g/cgen.go index d9c827776d4..a6cc54db6ff 100644 --- a/src/cmd/5g/cgen.go +++ b/src/cmd/5g/cgen.go @@ -5,11 +5,11 @@ package main import ( + "cmd/internal/gc" "cmd/internal/obj" "cmd/internal/obj/arm" "fmt" ) -import "cmd/internal/gc" /* * peep.c diff --git a/src/cmd/5g/cgen64.go b/src/cmd/5g/cgen64.go index 9a3e8ab7d63..8c2f360baf2 100644 --- a/src/cmd/5g/cgen64.go +++ b/src/cmd/5g/cgen64.go @@ -5,10 +5,10 @@ package main import ( + "cmd/internal/gc" "cmd/internal/obj" "cmd/internal/obj/arm" ) -import "cmd/internal/gc" /* * attempt to generate 64-bit diff --git a/src/cmd/5g/galign.go b/src/cmd/5g/galign.go index d2eeeab4560..4b8b82c5612 100644 --- a/src/cmd/5g/galign.go +++ b/src/cmd/5g/galign.go @@ -5,10 +5,10 @@ package main import ( + "cmd/internal/gc" "cmd/internal/obj" "cmd/internal/obj/arm" ) -import "cmd/internal/gc" var thechar int = '5' diff --git a/src/cmd/5g/ggen.go b/src/cmd/5g/ggen.go index 58b0c36b282..cb8485dba53 100644 --- a/src/cmd/5g/ggen.go +++ b/src/cmd/5g/ggen.go @@ -5,10 +5,10 @@ package main import ( + "cmd/internal/gc" "cmd/internal/obj" "cmd/internal/obj/arm" ) -import "cmd/internal/gc" func defframe(ptxt *obj.Prog) { var n *gc.Node diff --git a/src/cmd/5g/gsubr.go b/src/cmd/5g/gsubr.go index f2ba6e2bff0..36c1280d3d8 100644 --- a/src/cmd/5g/gsubr.go +++ b/src/cmd/5g/gsubr.go @@ -31,11 +31,11 @@ package main import ( + "cmd/internal/gc" "cmd/internal/obj" "cmd/internal/obj/arm" "fmt" ) -import "cmd/internal/gc" // TODO(rsc): Can make this bigger if we move // the text segment up higher in 5l for all GOOS. diff --git a/src/cmd/5g/peep.go b/src/cmd/5g/peep.go index 0c304f8b5ec..4fd22253344 100644 --- a/src/cmd/5g/peep.go +++ b/src/cmd/5g/peep.go @@ -31,11 +31,11 @@ package main import ( + "cmd/internal/gc" "cmd/internal/obj" "cmd/internal/obj/arm" "fmt" ) -import "cmd/internal/gc" var gactive uint32 diff --git a/src/cmd/5g/prog.go b/src/cmd/5g/prog.go index 8135b8c58aa..9deff0787f6 100644 --- a/src/cmd/5g/prog.go +++ b/src/cmd/5g/prog.go @@ -5,10 +5,10 @@ package main import ( + "cmd/internal/gc" "cmd/internal/obj" "cmd/internal/obj/arm" ) -import "cmd/internal/gc" const ( RightRdwr = gc.RightRead | gc.RightWrite diff --git a/src/cmd/5l/asm.go b/src/cmd/5l/asm.go index 0cebb6b6e75..3f9b7ada90e 100644 --- a/src/cmd/5l/asm.go +++ b/src/cmd/5l/asm.go @@ -31,11 +31,11 @@ package main import ( + "cmd/internal/ld" "cmd/internal/obj" "fmt" "log" ) -import "cmd/internal/ld" func needlib(name string) int { if name[0] == '\x00' { diff --git a/src/cmd/5l/obj.go b/src/cmd/5l/obj.go index 7eb3b0e1e61..49ce10718b0 100644 --- a/src/cmd/5l/obj.go +++ b/src/cmd/5l/obj.go @@ -31,11 +31,11 @@ package main import ( + "cmd/internal/ld" "cmd/internal/obj" "fmt" "log" ) -import "cmd/internal/ld" // Reading object files. diff --git a/src/cmd/6g/cgen.go b/src/cmd/6g/cgen.go index 0b0d6b32494..fba794ae20c 100644 --- a/src/cmd/6g/cgen.go +++ b/src/cmd/6g/cgen.go @@ -5,11 +5,10 @@ package main import ( + "cmd/internal/gc" "cmd/internal/obj" "cmd/internal/obj/x86" "fmt" - - "cmd/internal/gc" ) /* diff --git a/src/cmd/6g/galign.go b/src/cmd/6g/galign.go index bdd8a3c2264..6a2bac84d82 100644 --- a/src/cmd/6g/galign.go +++ b/src/cmd/6g/galign.go @@ -5,10 +5,10 @@ package main import ( + "cmd/internal/gc" "cmd/internal/obj" "cmd/internal/obj/x86" ) -import "cmd/internal/gc" var thechar int = '6' diff --git a/src/cmd/6g/ggen.go b/src/cmd/6g/ggen.go index 45242b34a0a..3e74ce3757f 100644 --- a/src/cmd/6g/ggen.go +++ b/src/cmd/6g/ggen.go @@ -5,10 +5,10 @@ package main import ( + "cmd/internal/gc" "cmd/internal/obj" "cmd/internal/obj/x86" ) -import "cmd/internal/gc" func defframe(ptxt *obj.Prog) { var n *gc.Node diff --git a/src/cmd/6g/gsubr.go b/src/cmd/6g/gsubr.go index 719a1fee92a..9df1d097c43 100644 --- a/src/cmd/6g/gsubr.go +++ b/src/cmd/6g/gsubr.go @@ -31,11 +31,11 @@ package main import ( + "cmd/internal/gc" "cmd/internal/obj" "cmd/internal/obj/x86" "fmt" ) -import "cmd/internal/gc" // TODO(rsc): Can make this bigger if we move // the text segment up higher in 6l for all GOOS. diff --git a/src/cmd/6g/peep.go b/src/cmd/6g/peep.go index a967bba2231..11779dee280 100644 --- a/src/cmd/6g/peep.go +++ b/src/cmd/6g/peep.go @@ -31,11 +31,11 @@ package main import ( + "cmd/internal/gc" "cmd/internal/obj" "cmd/internal/obj/x86" "fmt" ) -import "cmd/internal/gc" var gactive uint32 diff --git a/src/cmd/6g/prog.go b/src/cmd/6g/prog.go index a1895a70170..0bc703fa3c4 100644 --- a/src/cmd/6g/prog.go +++ b/src/cmd/6g/prog.go @@ -5,10 +5,10 @@ package main import ( + "cmd/internal/gc" "cmd/internal/obj" "cmd/internal/obj/x86" ) -import "cmd/internal/gc" var ( AX = RtoB(x86.REG_AX) diff --git a/src/cmd/6g/reg.go b/src/cmd/6g/reg.go index 3c5a69945f9..0f32df53c06 100644 --- a/src/cmd/6g/reg.go +++ b/src/cmd/6g/reg.go @@ -31,10 +31,10 @@ package main import ( + "cmd/internal/gc" "cmd/internal/obj" "cmd/internal/obj/x86" ) -import "cmd/internal/gc" const ( NREGVAR = 32 diff --git a/src/cmd/6l/asm.go b/src/cmd/6l/asm.go index bc95d815408..828aafc6486 100644 --- a/src/cmd/6l/asm.go +++ b/src/cmd/6l/asm.go @@ -31,11 +31,11 @@ package main import ( + "cmd/internal/ld" "cmd/internal/obj" "fmt" "log" ) -import "cmd/internal/ld" func PADDR(x uint32) uint32 { return x &^ 0x80000000 diff --git a/src/cmd/6l/obj.go b/src/cmd/6l/obj.go index a34e30d4472..e8c93c90fbc 100644 --- a/src/cmd/6l/obj.go +++ b/src/cmd/6l/obj.go @@ -31,11 +31,11 @@ package main import ( + "cmd/internal/ld" "cmd/internal/obj" "fmt" "log" ) -import "cmd/internal/ld" // Reading object files. diff --git a/src/cmd/8g/cgen.go b/src/cmd/8g/cgen.go index ec8532d6fc8..6e6a28141dc 100644 --- a/src/cmd/8g/cgen.go +++ b/src/cmd/8g/cgen.go @@ -5,11 +5,11 @@ package main import ( + "cmd/internal/gc" "cmd/internal/obj" "cmd/internal/obj/i386" "fmt" ) -import "cmd/internal/gc" /* * reg.c diff --git a/src/cmd/8g/cgen64.go b/src/cmd/8g/cgen64.go index 523527033fb..1d1ad912986 100644 --- a/src/cmd/8g/cgen64.go +++ b/src/cmd/8g/cgen64.go @@ -5,10 +5,10 @@ package main import ( + "cmd/internal/gc" "cmd/internal/obj" "cmd/internal/obj/i386" ) -import "cmd/internal/gc" /* * attempt to generate 64-bit diff --git a/src/cmd/8g/galign.go b/src/cmd/8g/galign.go index 45ef1302f35..86024a82869 100644 --- a/src/cmd/8g/galign.go +++ b/src/cmd/8g/galign.go @@ -5,10 +5,10 @@ package main import ( + "cmd/internal/gc" "cmd/internal/obj" "cmd/internal/obj/i386" ) -import "cmd/internal/gc" var thechar int = '8' diff --git a/src/cmd/8g/ggen.go b/src/cmd/8g/ggen.go index 1cc9a2bd02b..eb5eae2bba9 100644 --- a/src/cmd/8g/ggen.go +++ b/src/cmd/8g/ggen.go @@ -5,10 +5,10 @@ package main import ( + "cmd/internal/gc" "cmd/internal/obj" "cmd/internal/obj/i386" ) -import "cmd/internal/gc" func defframe(ptxt *obj.Prog) { var n *gc.Node diff --git a/src/cmd/8g/gsubr.go b/src/cmd/8g/gsubr.go index 95ec01aaf67..e3a8e7f2eea 100644 --- a/src/cmd/8g/gsubr.go +++ b/src/cmd/8g/gsubr.go @@ -31,11 +31,11 @@ package main import ( + "cmd/internal/gc" "cmd/internal/obj" "cmd/internal/obj/i386" "fmt" ) -import "cmd/internal/gc" // TODO(rsc): Can make this bigger if we move // the text segment up higher in 8l for all GOOS. diff --git a/src/cmd/8g/peep.go b/src/cmd/8g/peep.go index abb89fdc511..51e0d2eb885 100644 --- a/src/cmd/8g/peep.go +++ b/src/cmd/8g/peep.go @@ -31,11 +31,11 @@ package main import ( + "cmd/internal/gc" "cmd/internal/obj" "cmd/internal/obj/i386" "fmt" ) -import "cmd/internal/gc" const ( REGEXT = 0 diff --git a/src/cmd/8g/prog.go b/src/cmd/8g/prog.go index f5c4ab69913..4a14b01ee3a 100644 --- a/src/cmd/8g/prog.go +++ b/src/cmd/8g/prog.go @@ -5,10 +5,10 @@ package main import ( + "cmd/internal/gc" "cmd/internal/obj" "cmd/internal/obj/i386" ) -import "cmd/internal/gc" var ( AX = RtoB(i386.REG_AX) diff --git a/src/cmd/8l/asm.go b/src/cmd/8l/asm.go index d040c03326d..b580ad5bc7a 100644 --- a/src/cmd/8l/asm.go +++ b/src/cmd/8l/asm.go @@ -31,11 +31,11 @@ package main import ( + "cmd/internal/ld" "cmd/internal/obj" "fmt" "log" ) -import "cmd/internal/ld" func needlib(name string) int { if name[0] == '\x00' { diff --git a/src/cmd/8l/obj.go b/src/cmd/8l/obj.go index 5d447210740..01a278cc404 100644 --- a/src/cmd/8l/obj.go +++ b/src/cmd/8l/obj.go @@ -31,11 +31,11 @@ package main import ( + "cmd/internal/ld" "cmd/internal/obj" "fmt" "log" ) -import "cmd/internal/ld" // Reading object files. diff --git a/src/cmd/9g/cgen.go b/src/cmd/9g/cgen.go index 424825bc034..4ab5215e552 100644 --- a/src/cmd/9g/cgen.go +++ b/src/cmd/9g/cgen.go @@ -5,11 +5,11 @@ package main import ( + "cmd/internal/gc" "cmd/internal/obj" "cmd/internal/obj/ppc64" "fmt" ) -import "cmd/internal/gc" /* * peep.c diff --git a/src/cmd/9g/galign.go b/src/cmd/9g/galign.go index 99425c3929d..b39149a9521 100644 --- a/src/cmd/9g/galign.go +++ b/src/cmd/9g/galign.go @@ -5,10 +5,10 @@ package main import ( + "cmd/internal/gc" "cmd/internal/obj" "cmd/internal/obj/ppc64" ) -import "cmd/internal/gc" var thechar int = '9' diff --git a/src/cmd/9g/ggen.go b/src/cmd/9g/ggen.go index d9bcfb70287..3cca4a57512 100644 --- a/src/cmd/9g/ggen.go +++ b/src/cmd/9g/ggen.go @@ -5,11 +5,11 @@ package main import ( + "cmd/internal/gc" "cmd/internal/obj" "cmd/internal/obj/ppc64" "fmt" ) -import "cmd/internal/gc" func defframe(ptxt *obj.Prog) { var n *gc.Node diff --git a/src/cmd/9g/gsubr.go b/src/cmd/9g/gsubr.go index 1f1a43edb37..5db301a2822 100644 --- a/src/cmd/9g/gsubr.go +++ b/src/cmd/9g/gsubr.go @@ -31,11 +31,11 @@ package main import ( + "cmd/internal/gc" "cmd/internal/obj" "cmd/internal/obj/ppc64" "fmt" ) -import "cmd/internal/gc" // TODO(rsc): Can make this bigger if we move // the text segment up higher in 6l for all GOOS. diff --git a/src/cmd/9g/peep.go b/src/cmd/9g/peep.go index 03581b1a828..af2e68ce2d8 100644 --- a/src/cmd/9g/peep.go +++ b/src/cmd/9g/peep.go @@ -31,11 +31,11 @@ package main import ( + "cmd/internal/gc" "cmd/internal/obj" "cmd/internal/obj/ppc64" "fmt" ) -import "cmd/internal/gc" var gactive uint32 diff --git a/src/cmd/9g/prog.go b/src/cmd/9g/prog.go index 24de65f05b4..d5d534695aa 100644 --- a/src/cmd/9g/prog.go +++ b/src/cmd/9g/prog.go @@ -5,10 +5,10 @@ package main import ( + "cmd/internal/gc" "cmd/internal/obj" "cmd/internal/obj/ppc64" ) -import "cmd/internal/gc" const ( LeftRdwr uint32 = gc.LeftRead | gc.LeftWrite diff --git a/src/cmd/9l/asm.go b/src/cmd/9l/asm.go index f0f5b56f619..2b6cdad2082 100644 --- a/src/cmd/9l/asm.go +++ b/src/cmd/9l/asm.go @@ -31,12 +31,12 @@ package main import ( + "cmd/internal/ld" "cmd/internal/obj" "encoding/binary" "fmt" "log" ) -import "cmd/internal/ld" func needlib(name string) int { if name[0] == '\x00' { diff --git a/src/cmd/9l/obj.go b/src/cmd/9l/obj.go index 8bba6be70d5..29b384a1a6d 100644 --- a/src/cmd/9l/obj.go +++ b/src/cmd/9l/obj.go @@ -31,11 +31,11 @@ package main import ( + "cmd/internal/ld" "cmd/internal/obj" "fmt" "log" ) -import "cmd/internal/ld" // Reading object files.