mirror of
https://github.com/golang/go
synced 2024-11-11 17:51:49 -07:00
all: remove duplicated words in comments
Change-Id: Id991ec0826a4e2857f00330b4b7ff2b71907b789 Reviewed-on: https://go-review.googlesource.com/c/go/+/606615 Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Robert Griesemer <gri@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Auto-Submit: Robert Griesemer <gri@google.com> Commit-Queue: Ian Lance Taylor <iant@google.com>
This commit is contained in:
parent
433c1d3b4a
commit
d5f7da7987
@ -489,7 +489,7 @@ func TestIndexRune(t *testing.T) {
|
||||
{"a☺b☻c☹d\xe2\x98<39>\xff<66>\xed\xa0\x80", 0xD800, -1}, // Surrogate pair
|
||||
{"a☺b☻c☹d\xe2\x98<39>\xff<66>\xed\xa0\x80", utf8.MaxRune + 1, -1},
|
||||
|
||||
// Test the cutover to to bytealg.Index when it is triggered in
|
||||
// Test the cutover to bytealg.Index when it is triggered in
|
||||
// the middle of rune that contains consecutive runs of equal bytes.
|
||||
{"aaaaaKKKK\U000bc104", '\U000bc104', 17}, // cutover: (n + 16) / 8
|
||||
{"aaaaaKKKK鄄", '鄄', 17},
|
||||
|
@ -63,7 +63,7 @@ func StaticCall(call *ir.CallExpr) {
|
||||
// dictionary parameter. We could devirtualize this call if we
|
||||
// could derive an appropriate dictionary argument.
|
||||
//
|
||||
// TODO(mdempsky): If typ has has a promoted non-generic method,
|
||||
// TODO(mdempsky): If typ has a promoted non-generic method,
|
||||
// then that method won't require a dictionary argument. We could
|
||||
// still devirtualize those calls.
|
||||
//
|
||||
|
@ -242,7 +242,7 @@ func maybeDevirtualizeFunctionCall(p *pgoir.Profile, fn *ir.Func, call *ir.CallE
|
||||
}
|
||||
// runtime.memhash_varlen does not look like a closure, but it uses
|
||||
// runtime.getclosureptr to access data encoded by callers, which are
|
||||
// are generated by cmd/compile/internal/reflectdata.genhash.
|
||||
// generated by cmd/compile/internal/reflectdata.genhash.
|
||||
if callee.Sym().Pkg.Path == "runtime" && callee.Sym().Name == "memhash_varlen" {
|
||||
if base.Debug.PGODebug >= 3 {
|
||||
fmt.Printf("callee %s is a closure (runtime.memhash_varlen), skipping\n", ir.FuncName(callee))
|
||||
|
@ -18,7 +18,7 @@ import (
|
||||
// opposed to a new walk on every call).
|
||||
type ReassignOracle struct {
|
||||
fn *Func
|
||||
// maps candidate name to its defining assignment (or for
|
||||
// maps candidate name to its defining assignment (or
|
||||
// for params, defining func).
|
||||
singleDef map[*Name]Node
|
||||
}
|
||||
|
@ -168,7 +168,7 @@ func (c *IntervalsBuilder) Live(pos int) error {
|
||||
}
|
||||
|
||||
// Kill method should be invoked on instruction at position p if instr
|
||||
// should be treated as as having a kill (lifetime end) for the
|
||||
// should be treated as having a kill (lifetime end) for the
|
||||
// resource. See the example in the comment at the beginning of this
|
||||
// file for an example. Note that if we see a kill at position K for a
|
||||
// resource currently live since J, this will result in a lifetime
|
||||
|
@ -682,7 +682,7 @@ func nextRegion(cands []*ir.Name, idx int) int {
|
||||
// given subrange of cands described by st and en (indices into our
|
||||
// candidate var list), where the variables within this range have
|
||||
// already been determined to be compatible with respect to type,
|
||||
// size, etc. Overlapping is done in a a greedy fashion: we select the
|
||||
// size, etc. Overlapping is done in a greedy fashion: we select the
|
||||
// first element in the st->en range, then walk the rest of the
|
||||
// elements adding in vars whose lifetimes don't overlap with the
|
||||
// first element, then repeat the process until we run out of work.
|
||||
|
@ -618,7 +618,7 @@ func (ft *factsTable) newLimit(v *Value, newLim limit) bool {
|
||||
// extract relation between its args. For example, if
|
||||
// We learn v is false, and v is defined as a<b, then we learn a>=b.
|
||||
if v.Type.IsBoolean() {
|
||||
// If we reach here, is is because we have a more restrictive
|
||||
// If we reach here, it is because we have a more restrictive
|
||||
// value for v than the default. The only two such values
|
||||
// are constant true or constant false.
|
||||
if lim.min != lim.max {
|
||||
|
@ -134,7 +134,7 @@ func (check *Checker) funcType(sig *Signature, recvPar *syntax.Field, tparams []
|
||||
}
|
||||
|
||||
// collectRecv extracts the method receiver and its type parameters (if any) from rparam.
|
||||
// It declares the type parameters (but not the receiver) in the the current scope, and
|
||||
// It declares the type parameters (but not the receiver) in the current scope, and
|
||||
// returns the receiver variable and its type parameter list (if any).
|
||||
func (check *Checker) collectRecv(rparam *syntax.Field, scopePos syntax.Pos) (recv *Var, recvTParamsList *TypeParamList) {
|
||||
// Unpack the receiver parameter which is of the form
|
||||
|
@ -163,7 +163,7 @@ func computeInterfaceTypeSet(check *Checker, pos syntax.Pos, ityp *Interface) *_
|
||||
// let any follow-on errors play out.
|
||||
//
|
||||
// TODO(gri) Consider recording when this happens and reporting
|
||||
// it as an error (but only if there were no other errors so to
|
||||
// it as an error (but only if there were no other errors so
|
||||
// to not have unnecessary follow-on errors).
|
||||
if !ityp.complete {
|
||||
return &topTypeSet
|
||||
|
@ -187,7 +187,7 @@ func runDownload(ctx context.Context, cmd *base.Command, args []string) {
|
||||
infos, infosErr := modload.ListModules(ctx, args, 0, *downloadReuse)
|
||||
|
||||
// There is a bit of a chicken-and-egg problem here: ideally we need to know
|
||||
// which Go version to switch to to download the requested modules, but if we
|
||||
// which Go version to switch to download the requested modules, but if we
|
||||
// haven't downloaded the module's go.mod file yet the GoVersion field of its
|
||||
// info struct is not yet populated.
|
||||
//
|
||||
|
@ -1222,7 +1222,7 @@ func updatePrunedRoots(ctx context.Context, direct map[string]bool, rs *Requirem
|
||||
return rs, nil
|
||||
}
|
||||
// The root set has converged: every root going into this iteration was
|
||||
// already at its selected version, although we have have removed other
|
||||
// already at its selected version, although we have removed other
|
||||
// (redundant) roots for the same path.
|
||||
break
|
||||
}
|
||||
@ -1281,7 +1281,7 @@ func spotCheckRoots(ctx context.Context, rs *Requirements, mods map[module.Versi
|
||||
// module in direct as a root.
|
||||
func tidyUnprunedRoots(ctx context.Context, mainModule module.Version, old *Requirements, pkgs []*loadPkg) (*Requirements, error) {
|
||||
var (
|
||||
// keep is a set of of modules that provide packages or are needed to
|
||||
// keep is a set of modules that provide packages or are needed to
|
||||
// disambiguate imports.
|
||||
keep []module.Version
|
||||
keptPath = map[string]bool{}
|
||||
|
@ -681,7 +681,7 @@ type dqTracker struct {
|
||||
// in the extended module graph.
|
||||
extendedRootPruning map[module.Version]modPruning
|
||||
|
||||
// dqReason records whether and why each each encountered version is
|
||||
// dqReason records whether and why each encountered version is
|
||||
// disqualified in a pruned or unpruned context.
|
||||
dqReason map[module.Version]perPruning[dqState]
|
||||
|
||||
|
@ -202,7 +202,7 @@ const (
|
||||
|
||||
// R_POWER_TLS marks an X-form instruction such as "ADD R3,R13,R4" as completing
|
||||
// a sequence of GOT-relative relocations to compute a TLS address. This can be
|
||||
// used by the system linker to to rewrite the GOT-relative TLS relocation into a
|
||||
// used by the system linker to rewrite the GOT-relative TLS relocation into a
|
||||
// simpler thread-pointer relative relocation. See table 3.26 and 3.28 in the
|
||||
// ppc64 elfv2 1.4 ABI on this transformation. Likewise, the second argument
|
||||
// (usually called RB in X-form instructions) is assumed to be R13.
|
||||
|
@ -71,7 +71,7 @@ var (
|
||||
|
||||
// Test is the main entrypoint that runs tests in the GOROOT/test directory.
|
||||
//
|
||||
// Each .go file test case in GOROOT/test is registered as a subtest with a
|
||||
// Each .go file test case in GOROOT/test is registered as a subtest with
|
||||
// a full name like "Test/fixedbugs/bug000.go" ('/'-separated relative path).
|
||||
func Test(t *testing.T) {
|
||||
if *target != "" {
|
||||
|
@ -1275,7 +1275,7 @@ func hostlinksetup(ctxt *Link) {
|
||||
// cleanTimeStamps resets the timestamps for the specified list of
|
||||
// existing files to the Unix epoch (1970-01-01 00:00:00 +0000 UTC).
|
||||
// We take this step in order to help preserve reproducible builds;
|
||||
// this seems to be primarily needed for external linking on on Darwin
|
||||
// this seems to be primarily needed for external linking on Darwin
|
||||
// with later versions of xcode, which (unfortunately) seem to want to
|
||||
// incorporate object file times into the final output file's build
|
||||
// ID. See issue 64947 for the unpleasant details.
|
||||
|
@ -306,7 +306,7 @@ func (f *File) Pos(offset int) Pos {
|
||||
// Offset returns the offset for the given file position p.
|
||||
//
|
||||
// If p is before the file's start position (or if p is NoPos),
|
||||
// the result is 0; if p is past the file's end position, the
|
||||
// the result is 0; if p is past the file's end position,
|
||||
// the result is the file size (see also go.dev/issue/57490).
|
||||
//
|
||||
// The following invariant, though not true for offset values
|
||||
|
@ -155,7 +155,7 @@ func (check *Checker) funcType(sig *Signature, recvPar *ast.FieldList, ftyp *ast
|
||||
}
|
||||
|
||||
// collectRecv extracts the method receiver and its type parameters (if any) from rparam.
|
||||
// It declares the type parameters (but not the receiver) in the the current scope, and
|
||||
// It declares the type parameters (but not the receiver) in the current scope, and
|
||||
// returns the receiver variable and its type parameter list (if any).
|
||||
func (check *Checker) collectRecv(rparam *ast.Field, scopePos token.Pos) (recv *Var, recvTParamsList *TypeParamList) {
|
||||
// Unpack the receiver parameter which is of the form
|
||||
|
@ -166,7 +166,7 @@ func computeInterfaceTypeSet(check *Checker, pos token.Pos, ityp *Interface) *_T
|
||||
// let any follow-on errors play out.
|
||||
//
|
||||
// TODO(gri) Consider recording when this happens and reporting
|
||||
// it as an error (but only if there were no other errors so to
|
||||
// it as an error (but only if there were no other errors so
|
||||
// to not have unnecessary follow-on errors).
|
||||
if !ityp.complete {
|
||||
return &topTypeSet
|
||||
|
@ -813,7 +813,7 @@ func (p *parser) readRawEvent(flags uint, ev *rawEvent) error {
|
||||
}
|
||||
}
|
||||
|
||||
// loadBatch loads the next batch for pid and appends its contents to to events.
|
||||
// loadBatch loads the next batch for pid and appends its contents to events.
|
||||
func (p *parser) loadBatch(pid int32, events []Event) ([]Event, error) {
|
||||
offsets := p.batchOffsets[pid]
|
||||
if len(offsets) == 0 {
|
||||
|
@ -614,7 +614,7 @@ func (e *Emitter) tsWithinRange(ts time.Duration) bool {
|
||||
return e.rangeStart <= ts && ts <= e.rangeEnd
|
||||
}
|
||||
|
||||
// OptionalEvent emits ev if it's within the time range of of the consumer, i.e.
|
||||
// OptionalEvent emits ev if it's within the time range of the consumer, i.e.
|
||||
// the selected trace split range.
|
||||
func (e *Emitter) OptionalEvent(ev *format.Event) {
|
||||
e.c.ConsumeViewerEvent(ev, false)
|
||||
|
@ -356,7 +356,7 @@ func TestIndexRune(t *testing.T) {
|
||||
{Repeat("𡋀", 64) + "𡌀", '𡌀', 256}, // test cutover
|
||||
{Repeat("𡋀", 64), '𡌀', -1},
|
||||
|
||||
// Test the cutover to to bytealg.IndexString when it is triggered in
|
||||
// Test the cutover to bytealg.IndexString when it is triggered in
|
||||
// the middle of rune that contains consecutive runs of equal bytes.
|
||||
{"aaaaaKKKK\U000bc104", '\U000bc104', 17}, // cutover: (n + 16) / 8
|
||||
{"aaaaaKKKK鄄", '鄄', 17},
|
||||
|
@ -307,7 +307,7 @@ func (w WaitStatus) TrapCause() int { return 0 }
|
||||
|
||||
// Rusage is a placeholder to allow compilation of the [os/exec] package
|
||||
// because we need Go programs to be portable across platforms. WASI does
|
||||
// not have a mechanism to to spawn processes so there is no reason for an
|
||||
// not have a mechanism to spawn processes so there is no reason for an
|
||||
// application to take a dependency on this type.
|
||||
type Rusage struct {
|
||||
Utime Timeval
|
||||
@ -316,7 +316,7 @@ type Rusage struct {
|
||||
|
||||
// ProcAttr is a placeholder to allow compilation of the [os/exec] package
|
||||
// because we need Go programs to be portable across platforms. WASI does
|
||||
// not have a mechanism to to spawn processes so there is no reason for an
|
||||
// not have a mechanism to spawn processes so there is no reason for an
|
||||
// application to take a dependency on this type.
|
||||
type ProcAttr struct {
|
||||
Dir string
|
||||
|
Loading…
Reference in New Issue
Block a user