From: Aaron Jacobs Date: Tue, 23 Jun 2015 23:50:12 +0000 (+1000) Subject: Fix several out of date references to 4g/5g/6g/8g/9g. X-Git-Tag: go1.5beta1~114 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=86286883047d75df7769bff42ba2364b9bcee6fd;p=gostls13.git 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 Reviewed-by: Andrew Gerrand --- diff --git a/doc/asm.html b/doc/asm.html index 43382fc96b..3f116ea607 100644 --- a/doc/asm.html +++ b/doc/asm.html @@ -7,7 +7,7 @@

This document is a quick outline of the unusual form of assembly language used by the gc -suite of Go compilers (6g, 8g, etc.). +Go compiler. The document is not comprehensive.

@@ -52,7 +52,7 @@ package main 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 9a30cdf7ab..47d3ccff45 100644 --- a/doc/go_faq.html +++ b/doc/go_faq.html @@ -239,7 +239,7 @@ Do Go programs link with C/C++ programs?

There are two Go compiler implementations, gc -(the 6g program and friends) and gccgo. +and gccgo. Gc 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 bf232407e7..11e00d055b 100644 --- a/doc/install-source.html +++ b/doc/install-source.html @@ -26,7 +26,7 @@ packages, though, read on.

There are two official Go compiler tool chains. This document focuses on the gc Go -compiler and tools (6g, 8g etc.). +compiler and tools. For information on how to work on gccgo, a more traditional compiler using the GCC back end, see Setting up and using gccgo. @@ -516,7 +516,7 @@ installs all commands there.

  • $GO386 (for 386 only, default is auto-detected if built on either 386 or amd64, 387 otherwise)

    -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 387) or SSE2 instructions (set to sse2) for floating point computations.

    diff --git a/misc/cgo/gmp/gmp.go b/misc/cgo/gmp/gmp.go index 7b7a9b3c9b..d39bfe6408 100644 --- a/misc/cgo/gmp/gmp.go +++ b/misc/cgo/gmp/gmp.go @@ -8,7 +8,7 @@ multiprecision library gmp's integer type mpz_t wrapped to look like 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 c36abc3aa8..232ca3394a 100644 --- a/misc/cgo/testshared/shared_test.go +++ b/misc/cgo/testshared/shared_test.go @@ -530,7 +530,7 @@ func TestTwoGopathShlibsGccgo(t *testing.T) { // 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 694c88c7b3..1624d980ff 100644 --- a/src/cmd/cgo/gcc.go +++ b/src/cmd/cgo/gcc.go @@ -1551,7 +1551,7 @@ func (c *typeConv) pad(fld []*ast.Field, size int64) []*ast.Field { 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 3b9ccae963..02d297ce8b 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 f6604424bc..0308242c5f 100644 --- a/src/cmd/cgo/out.go +++ b/src/cmd/cgo/out.go @@ -21,8 +21,7 @@ import ( 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 @@ func dynimport(obj string) { 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 @@ func (p *Package) writeDefsFunc(fgo2 io.Writer, n *Name) { 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 @@ func (p *Package) writeOutputFunc(fgcc *os.File, n *Name) { 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 @@ func (p *Package) writeGccgoOutputFunc(fgcc *os.File, n *Name) { } // 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 @@ func (p *Package) writeExports(fgo2, fm, fgcc, fgcch io.Writer) { 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 @@ func (p *Package) writeExports(fgo2, fm, fgcc, fgcch io.Writer) { } 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 9b8d8f0cf6..4e9bede6e2 100644 --- a/src/cmd/dist/buildruntime.go +++ b/src/cmd/dist/buildruntime.go @@ -56,7 +56,7 @@ func mkzversion(dir, file string) { // 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 a9f9b58872..f324163180 100644 --- a/src/cmd/go/build.go +++ b/src/cmd/go/build.go @@ -2110,7 +2110,7 @@ func (gcToolchain) gc(b *builder, p *Package, archive, obj string, asmhdr bool, 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 0418d55e1c..3c3fc88674 100644 --- a/src/cmd/internal/obj/util.go +++ b/src/cmd/internal/obj/util.go @@ -223,7 +223,7 @@ func Getgoarm() string { } 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 340fc7a771..bc1a1a09dc 100644 --- a/src/reflect/type.go +++ b/src/reflect/type.go @@ -527,7 +527,7 @@ func (t *uncommonType) MethodByName(name string) (m Method, ok bool) { 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 fcd212eb8e..9aeaf9ae86 100644 --- a/src/runtime/cgo/asm_arm.s +++ b/src/runtime/cgo/asm_arm.s @@ -12,7 +12,7 @@ TEXT crosscall2(SB),NOSPLIT,$-4 /* * 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 be03993694..c6f98faf1b 100644 --- a/src/runtime/cgo/asm_arm64.s +++ b/src/runtime/cgo/asm_arm64.s @@ -12,7 +12,7 @@ TEXT crosscall2(SB),NOSPLIT,$-8 /* * 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 7677ec1d48..b7379d1013 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 fc202778c7..05af070f94 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 f6edc95959..5f1e8d8309 100644 --- a/src/runtime/compiler.go +++ b/src/runtime/compiler.go @@ -7,7 +7,7 @@ package runtime // 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 1081cb2966..cfdc085918 100644 --- a/test/chan/select5.go +++ b/test/chan/select5.go @@ -28,7 +28,7 @@ func main() { 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 80d1bf699f..6db9ce5cc8 100644 --- a/test/cmp.go +++ b/test/cmp.go @@ -115,7 +115,7 @@ func main() { 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 de0c4fd2f8..b07bbc739d 100755 --- a/test/errchk +++ b/test/errchk @@ -47,7 +47,7 @@ foreach $file (@file) { $cmd = join(' ', @ARGV); open(CMD, "exec $cmd &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('', ); @out = split(/^(?!\t)/m, $out); diff --git a/test/func6.go b/test/func6.go index 456cb49f09..d1b7f46b85 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 2d646b6786..feb7c2084f 100644 --- a/test/func7.go +++ b/test/func7.go @@ -23,7 +23,7 @@ func g() int { } 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 a8c471bb3b..9ff9e9fa71 100644 --- a/test/index.go +++ b/test/index.go @@ -216,7 +216,7 @@ func main() { 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 3cd95ec042..0a2f82d439 100644 --- a/test/run.go +++ b/test/run.go @@ -727,7 +727,7 @@ func (t *test) expectedOutput() string { } 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. // lines are impossible to match so those are filtered out. var res []string