Fix several out of date references to 4g/5g/6g/8g/9g.

Change-Id: Ifb8e4e13c7778a7c0113190051415e096f5db94f
Reviewed-on: https://go-review.googlesource.com/11390
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Andrew Gerrand <adg@golang.org>
diff --git a/doc/asm.html b/doc/asm.html
index 43382fc..3f116ea 100644
--- a/doc/asm.html
+++ b/doc/asm.html
@@ -7,7 +7,7 @@
 
 <p>
 This document is a quick outline of the unusual form of assembly language used by the <code>gc</code>
-suite of Go compilers (<code>6g</code>, <code>8g</code>, etc.).
+Go compiler.
 The document is not comprehensive.
 </p>
 
@@ -52,7 +52,7 @@
 func main() {
 	println(3)
 }
-$ go tool 6g -S x.go        # or: go build -gcflags -S x.go
+$ go tool compile -S x.go        # or: go build -gcflags -S x.go
 
 --- prog list "main" ---
 0000 (x.go:3) TEXT    main+0(SB),$8-0
diff --git a/doc/go_faq.html b/doc/go_faq.html
index 9a30cdf..47d3ccf 100644
--- a/doc/go_faq.html
+++ b/doc/go_faq.html
@@ -239,7 +239,7 @@
 
 <p>
 There are two Go compiler implementations, <code>gc</code>
-(the <code>6g</code> program and friends) and <code>gccgo</code>.
+and <code>gccgo</code>.
 <code>Gc</code> uses a different calling convention and linker and can
 therefore only be linked with C programs using the same convention.
 There is such a C compiler but no C++ compiler.
diff --git a/doc/install-source.html b/doc/install-source.html
index bf23240..11e00d0 100644
--- a/doc/install-source.html
+++ b/doc/install-source.html
@@ -26,7 +26,7 @@
 <p>
 There are two official Go compiler tool chains.
 This document focuses on the <code>gc</code> Go
-compiler and tools (<code>6g</code>, <code>8g</code> etc.).
+compiler and tools.
 For information on how to work on <code>gccgo</code>, a more traditional
 compiler using the GCC back end, see
 <a href="/doc/install/gccgo">Setting up and using gccgo</a>.
@@ -516,7 +516,7 @@
 <li><code>$GO386</code> (for <code>386</code> only, default is auto-detected
 if built on either <code>386</code> or <code>amd64</code>, <code>387</code> otherwise)
 <p>
-This controls the code generated by 8g to use either the 387 floating-point unit
+This controls the code generated by gc to use either the 387 floating-point unit
 (set to <code>387</code>) or SSE2 instructions (set to <code>sse2</code>) for
 floating point computations.
 </p>
diff --git a/misc/cgo/gmp/gmp.go b/misc/cgo/gmp/gmp.go
index 7b7a9b3..d39bfe6 100644
--- a/misc/cgo/gmp/gmp.go
+++ b/misc/cgo/gmp/gmp.go
@@ -8,7 +8,7 @@
 the Go package big's integer type Int.
 
 This is a syntactically valid Go program—it can be parsed with the Go
-parser and processed by godoc—but it is not compiled directly by 6g.
+parser and processed by godoc—but it is not compiled directly by gc.
 Instead, a separate tool, cgo, processes it to produce three output
 files.  The first two, 6g.go and 6c.c, are a Go source file for 6g and
 a C source file for 6c; both compile as part of the named package
diff --git a/misc/cgo/testshared/shared_test.go b/misc/cgo/testshared/shared_test.go
index c36abc3..232ca33 100644
--- a/misc/cgo/testshared/shared_test.go
+++ b/misc/cgo/testshared/shared_test.go
@@ -530,7 +530,7 @@
 
 // Testing rebuilding of shared libraries when they are stale is a bit more
 // complicated that it seems like it should be. First, we make everything "old": but
-// only a few seconds old, or it might be older than 6g (or the runtime source) and
+// only a few seconds old, or it might be older than gc (or the runtime source) and
 // everything will get rebuilt. Then define a timestamp slightly newer than this
 // time, which is what we set the mtime to of a file to cause it to be seen as new,
 // and finally another slightly even newer one that we can compare files against to
diff --git a/src/cmd/cgo/gcc.go b/src/cmd/cgo/gcc.go
index 694c88c..1624d98 100644
--- a/src/cmd/cgo/gcc.go
+++ b/src/cmd/cgo/gcc.go
@@ -1551,7 +1551,7 @@
 	return fld
 }
 
-// Struct conversion: return Go and (6g) C syntax for type.
+// Struct conversion: return Go and (gc) C syntax for type.
 func (c *typeConv) Struct(dt *dwarf.StructType, pos token.Pos) (expr *ast.StructType, csyntax string, align int64) {
 	// Minimum alignment for a struct is 1 byte.
 	align = 1
diff --git a/src/cmd/cgo/main.go b/src/cmd/cgo/main.go
index 3b9ccae..02d297c 100644
--- a/src/cmd/cgo/main.go
+++ b/src/cmd/cgo/main.go
@@ -6,7 +6,7 @@
 
 // TODO(rsc):
 //	Emit correct line number annotations.
-//	Make 6g understand the annotations.
+//	Make gc understand the annotations.
 
 package main
 
diff --git a/src/cmd/cgo/out.go b/src/cmd/cgo/out.go
index f660442..0308242 100644
--- a/src/cmd/cgo/out.go
+++ b/src/cmd/cgo/out.go
@@ -21,8 +21,7 @@
 
 var conf = printer.Config{Mode: printer.SourcePos, Tabwidth: 8}
 
-// writeDefs creates output files to be compiled by 6g and gcc.
-// (The comments here say 6g but the code applies to the 8 and 5 tools too.)
+// writeDefs creates output files to be compiled by gc and gcc.
 func (p *Package) writeDefs() {
 	var fgo2, fc io.Writer
 	f := creat(*objDir + "_cgo_gotypes.go")
@@ -291,10 +290,10 @@
 	fatalf("cannot parse %s as ELF, Mach-O or PE", obj)
 }
 
-// Construct a gcc struct matching the 6g argument frame.
+// Construct a gcc struct matching the gc argument frame.
 // Assumes that in gcc, char is 1 byte, short 2 bytes, int 4 bytes, long long 8 bytes.
 // These assumptions are checked by the gccProlog.
-// Also assumes that 6g convention is to word-align the
+// Also assumes that gc convention is to word-align the
 // input and output parameters.
 func (p *Package) structType(n *Name) (string, int64) {
 	var buf bytes.Buffer
@@ -479,8 +478,7 @@
 	fmt.Fprintf(fgo2, "}\n")
 }
 
-// writeOutput creates stubs for a specific source file to be compiled by 6g
-// (The comments here say 6g but the code applies to the 8 and 5 tools too.)
+// writeOutput creates stubs for a specific source file to be compiled by gc
 func (p *Package) writeOutput(f *File, srcfile string) {
 	base := srcfile
 	if strings.HasSuffix(base, ".go") {
@@ -559,7 +557,7 @@
 	if n.AddError {
 		fmt.Fprintf(fgcc, "\terrno = 0;\n")
 	}
-	// We're trying to write a gcc struct that matches 6g's layout.
+	// We're trying to write a gcc struct that matches gc's layout.
 	// Use packed attribute to force no padding in this struct in case
 	// gcc has different packing requirements.
 	fmt.Fprintf(fgcc, "\t%s %v *a = v;\n", ctype, p.packedAttribute())
@@ -655,8 +653,8 @@
 }
 
 // packedAttribute returns host compiler struct attribute that will be
-// used to match 6g's struct layout. For example, on 386 Windows,
-// gcc wants to 8-align int64s, but 8g does not.
+// used to match gc's struct layout. For example, on 386 Windows,
+// gcc wants to 8-align int64s, but gc does not.
 // Use __gcc_struct__ to work around http://gcc.gnu.org/PR52991 on x86,
 // and http://golang.org/issue/5603.
 func (p *Package) packedAttribute() string {
@@ -681,7 +679,7 @@
 	for _, exp := range p.ExpFunc {
 		fn := exp.Func
 
-		// Construct a gcc struct matching the 6g argument and
+		// Construct a gcc struct matching the gc argument and
 		// result frame.  The gcc struct will be compiled with
 		// __attribute__((packed)) so all padding must be accounted
 		// for explicitly.
@@ -802,7 +800,7 @@
 		}
 		fmt.Fprintf(fgcc, "}\n")
 
-		// Build the wrapper function compiled by 6g.
+		// Build the wrapper function compiled by gc.
 		goname := exp.Func.Name.Name
 		if fn.Recv != nil {
 			goname = "_cgoexpwrap" + cPrefix + "_" + fn.Recv.List[0].Names[0].Name + "_" + goname
diff --git a/src/cmd/dist/buildruntime.go b/src/cmd/dist/buildruntime.go
index 9b8d8f0..4e9bede 100644
--- a/src/cmd/dist/buildruntime.go
+++ b/src/cmd/dist/buildruntime.go
@@ -56,7 +56,7 @@
 // a cross-compiled compiler expects to compile for its own target
 // system. That is, if on a Mac you do:
 //
-//	GOOS=linux GOARCH=ppc64 go build cmd/9g
+//	GOOS=linux GOARCH=ppc64 go build cmd/compile
 //
 // the resulting compiler will default to generating linux/ppc64 object files.
 // This is more useful than having it default to generating objects for the
diff --git a/src/cmd/go/build.go b/src/cmd/go/build.go
index a9f9b58..f324163 100644
--- a/src/cmd/go/build.go
+++ b/src/cmd/go/build.go
@@ -2110,7 +2110,7 @@
 		gcargs[1] = "main"
 	}
 	if p.Standard && p.ImportPath == "runtime" {
-		// runtime compiles with a special 6g flag to emit
+		// runtime compiles with a special gc flag to emit
 		// additional reflect type data.
 		gcargs = append(gcargs, "-+")
 	}
diff --git a/src/cmd/internal/obj/util.go b/src/cmd/internal/obj/util.go
index 0418d55..3c3fc88 100644
--- a/src/cmd/internal/obj/util.go
+++ b/src/cmd/internal/obj/util.go
@@ -223,7 +223,7 @@
 }
 
 func Getgo386() string {
-	// Validated by cmd/8g.
+	// Validated by cmd/compile.
 	return envOr("GO386", defaultGO386)
 }
 
diff --git a/src/reflect/type.go b/src/reflect/type.go
index 340fc7a..bc1a1a0 100644
--- a/src/reflect/type.go
+++ b/src/reflect/type.go
@@ -527,7 +527,7 @@
 	return
 }
 
-// TODO(rsc): 6g supplies these, but they are not
+// TODO(rsc): gc supplies these, but they are not
 // as efficient as they could be: they have commonType
 // as the receiver instead of *rtype.
 func (t *rtype) NumMethod() int {
diff --git a/src/runtime/cgo/asm_arm.s b/src/runtime/cgo/asm_arm.s
index fcd212e..9aeaf9a 100644
--- a/src/runtime/cgo/asm_arm.s
+++ b/src/runtime/cgo/asm_arm.s
@@ -12,7 +12,7 @@
 	/* 
 	 * We still need to save all callee save register as before, and then
 	 *  push 2 args for fn (R1 and R2).
-	 * Also note that at procedure entry in 5c/5g world, 4(R13) will be the
+	 * Also note that at procedure entry in gc world, 4(R13) will be the
 	 *  first arg, so we must push another dummy reg (R0) for 0(R13).
 	 *  Additionally, runtime·load_g will clobber R0, so we need to save R0
 	 *  nevertheless.
diff --git a/src/runtime/cgo/asm_arm64.s b/src/runtime/cgo/asm_arm64.s
index be03993..c6f98fa 100644
--- a/src/runtime/cgo/asm_arm64.s
+++ b/src/runtime/cgo/asm_arm64.s
@@ -12,7 +12,7 @@
 	/*
 	 * We still need to save all callee save register as before, and then
 	 *  push 2 args for fn (R1 and R2).
-	 * Also note that at procedure entry in 7g world, 8(RSP) will be the
+	 * Also note that at procedure entry in gc world, 8(RSP) will be the
 	 *  first arg.
 	 * TODO(minux): use LDP/STP here if it matters.
 	 */
diff --git a/src/runtime/cgo/gcc_arm64.S b/src/runtime/cgo/gcc_arm64.S
index 7677ec1..b7379d1 100644
--- a/src/runtime/cgo/gcc_arm64.S
+++ b/src/runtime/cgo/gcc_arm64.S
@@ -18,7 +18,7 @@
 /*
  * void crosscall1(void (*fn)(void), void (*setg_gcc)(void *g), void *g)
  *
- * Calling into the 7g tool chain, where all registers are caller save.
+ * Calling into the gc tool chain, where all registers are caller save.
  * Called from standard ARM EABI, where x19-x29 are callee-save, so they
  * must be saved explicitly, along with x30 (LR).
  */
diff --git a/src/runtime/cgo/gcc_ppc64x.S b/src/runtime/cgo/gcc_ppc64x.S
index fc20277..05af070 100644
--- a/src/runtime/cgo/gcc_ppc64x.S
+++ b/src/runtime/cgo/gcc_ppc64x.S
@@ -16,7 +16,7 @@
 /*
  * void crosscall_ppc64(void (*fn)(void), void *g)
  *
- * Calling into the 9g tool chain, where all registers are caller save.
+ * Calling into the gc tool chain, where all registers are caller save.
  * Called from standard ppc64 C ABI, where r2, r14-r31, f14-f31 are
  * callee-save, so they must be saved explicitly.
  */
diff --git a/src/runtime/compiler.go b/src/runtime/compiler.go
index f6edc95..5f1e8d8 100644
--- a/src/runtime/compiler.go
+++ b/src/runtime/compiler.go
@@ -7,7 +7,7 @@
 // Compiler is the name of the compiler toolchain that built the
 // running binary.  Known toolchains are:
 //
-//	gc      The 5g/6g/8g compiler suite at go.googlesource.com/go.
+//	gc      Also known as cmd/compile.
 //	gccgo   The gccgo front end, part of the GCC compiler suite.
 //
 const Compiler = "gc"
diff --git a/test/chan/select5.go b/test/chan/select5.go
index 1081cb2..cfdc085 100644
--- a/test/chan/select5.go
+++ b/test/chan/select5.go
@@ -28,7 +28,7 @@
 	a := new(arg)
 
 	// Generate each test as a separate function to avoid
-	// hitting the 6g optimizer with one enormous function.
+	// hitting the gc optimizer with one enormous function.
 	// If we name all the functions init we don't have to
 	// maintain a list of which ones to run.
 	do := func(t *template.Template) {
diff --git a/test/cmp.go b/test/cmp.go
index 80d1bf6..6db9ce5 100644
--- a/test/cmp.go
+++ b/test/cmp.go
@@ -115,7 +115,7 @@
 	isfalse(ic != d)
 	isfalse(ie != e)
 
-	// 6g used to let this go through as true.
+	// gc used to let this go through as true.
 	var g uint64 = 123
 	var h int64 = 123
 	var ig interface{} = g
diff --git a/test/errchk b/test/errchk
index de0c4fd..b07bbc7 100755
--- a/test/errchk
+++ b/test/errchk
@@ -47,7 +47,7 @@
 $cmd = join(' ', @ARGV);
 open(CMD, "exec $cmd </dev/null 2>&1 |") || die "BUG: errchk: run $cmd: $!";
 
-# 6g error messages continue onto additional lines with leading tabs.
+# gc error messages continue onto additional lines with leading tabs.
 # Split the output at the beginning of each line that doesn't begin with a tab.
 $out = join('', <CMD>);
 @out = split(/^(?!\t)/m, $out);
diff --git a/test/func6.go b/test/func6.go
index 456cb49..d1b7f46 100644
--- a/test/func6.go
+++ b/test/func6.go
@@ -9,7 +9,7 @@
 package main
 
 func main() {
-	if func() bool { return true }() {}  // 6g used to say this was a syntax error
+	if func() bool { return true }() {}  // gc used to say this was a syntax error
 	if (func() bool { return true })() {}
 	if (func() bool { return true }()) {}
 }
diff --git a/test/func7.go b/test/func7.go
index 2d646b6..feb7c20 100644
--- a/test/func7.go
+++ b/test/func7.go
@@ -23,7 +23,7 @@
 }
 
 func main() {
-	// 6g, 8g, 5g all used to evaluate g() before f().
+	// gc used to evaluate g() before f().
 	if f() < g() {
 		panic("wrong answer")
 	}
diff --git a/test/index.go b/test/index.go
index a8c471b..9ff9e9f 100644
--- a/test/index.go
+++ b/test/index.go
@@ -216,7 +216,7 @@
 		thisPass := 0
 		if c == "c" && (a == "a" || a == "pa" || n == "n" || i == "i64big" || i == "i64bigger" || i == "huge" || i == "fbad") {
 			if i == "huge" {
-				// Due to a detail of 6g's internals,
+				// Due to a detail of gc's internals,
 				// the huge constant errors happen in an
 				// earlier pass than the others and inhibits
 				// the next pass from running.
diff --git a/test/run.go b/test/run.go
index 3cd95ec0..0a2f82d 100644
--- a/test/run.go
+++ b/test/run.go
@@ -727,7 +727,7 @@
 }
 
 func splitOutput(out string) []string {
-	// 6g error messages continue onto additional lines with leading tabs.
+	// gc error messages continue onto additional lines with leading tabs.
 	// Split the output at the beginning of each line that doesn't begin with a tab.
 	// <autogenerated> lines are impossible to match so those are filtered out.
 	var res []string