all: gofmt main repo

[This CL is part of a sequence implementing the proposal #51082.
The design doc is at https://go.dev/s/godocfmt-design.]

Run the updated gofmt, which reformats doc comments,
on the main repository. Vendored files are excluded.

For #51082.

Change-Id: I7332f099b60f716295fb34719c98c04eb1a85407
Reviewed-on: https://go-review.googlesource.com/c/go/+/384268
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Russ Cox 2022-02-03 14:12:08 -05:00
parent 017933163a
commit 19309779ac
373 changed files with 3238 additions and 2532 deletions

View file

@ -166,21 +166,21 @@ type symAndSize struct {
//
// Notes on the layout of global symbol index space:
//
// - Go object files are read before host object files; each Go object
// read adds its defined package symbols to the global index space.
// Nonpackage symbols are not yet added.
// - Go object files are read before host object files; each Go object
// read adds its defined package symbols to the global index space.
// Nonpackage symbols are not yet added.
//
// - In loader.LoadNonpkgSyms, add non-package defined symbols and
// references in all object files to the global index space.
// - In loader.LoadNonpkgSyms, add non-package defined symbols and
// references in all object files to the global index space.
//
// - Host object file loading happens; the host object loader does a
// name/version lookup for each symbol it finds; this can wind up
// extending the external symbol index space range. The host object
// loader stores symbol payloads in loader.payloads using SymbolBuilder.
// - Host object file loading happens; the host object loader does a
// name/version lookup for each symbol it finds; this can wind up
// extending the external symbol index space range. The host object
// loader stores symbol payloads in loader.payloads using SymbolBuilder.
//
// - Each symbol gets a unique global index. For duplicated and
// overwriting/overwritten symbols, the second (or later) appearance
// of the symbol gets the same global index as the first appearance.
// - Each symbol gets a unique global index. For duplicated and
// overwriting/overwritten symbols, the second (or later) appearance
// of the symbol gets the same global index as the first appearance.
type Loader struct {
start map[*oReader]Sym // map from object file to its start index
objs []objIdx // sorted by start index (i.e. objIdx.i)
@ -671,7 +671,7 @@ func (l *Loader) resolve(r *oReader, s goobj.SymRef) Sym {
// when the runtime package is built. The canonical example is
// "runtime.racefuncenter" -- currently if you do something like
//
// go build -gcflags=-race myprogram.go
// go build -gcflags=-race myprogram.go
//
// the compiler will insert calls to the builtin runtime.racefuncenter,
// but the version of the runtime used for linkage won't actually contain