all: fix spelling

This commit is contained in:
John Bampton 2022-05-18 06:42:08 +10:00
parent 7607888df0
commit ff5e01599d
28 changed files with 31 additions and 31 deletions

View File

@ -144,7 +144,7 @@ Do not send CLs removing the interior tags from such phrases.
returns an "operation was canceled" error, the error will now returns an "operation was canceled" error, the error will now
satisfy <code>errors.Is(err, context.Canceled)</code>. satisfy <code>errors.Is(err, context.Canceled)</code>.
These changes are intended to make it easier for code to test These changes are intended to make it easier for code to test
for cases in which a context cancelation or timeout causes a net for cases in which a context cancellation or timeout causes a net
package function or method to return an error, while preserving package function or method to return an error, while preserving
backward compatibility for error messages. backward compatibility for error messages.
</p> </p>

View File

@ -1042,7 +1042,7 @@ jmp_label_3:
BFI $29, $2, R8 // 1881dee7 BFI $29, $2, R8 // 1881dee7
BFI $16, $8, R1, R2 // BFI $16, R1, $8, R2 // 1124d7e7 BFI $16, $8, R1, R2 // BFI $16, R1, $8, R2 // 1124d7e7
// synthetic arithmatic // synthetic arithmetic
ADD $0xffffffaa, R2, R3 // ADD $4294967210, R2, R3 // 55b0e0e30b3082e0 ADD $0xffffffaa, R2, R3 // ADD $4294967210, R2, R3 // 55b0e0e30b3082e0
ADD $0xffffff55, R5 // ADD $4294967125, R5 // aab0e0e30b5085e0 ADD $0xffffff55, R5 // ADD $4294967125, R5 // aab0e0e30b5085e0
ADD.S $0xffffffab, R2, R3 // ADD.S $4294967211, R2, R3 // 54b0e0e30b3092e0 ADD.S $0xffffffab, R2, R3 // ADD.S $4294967211, R2, R3 // 54b0e0e30b3092e0

View File

@ -174,7 +174,7 @@ func (p *Package) writeDefs() {
// the external linker will add DT_NEEDED // the external linker will add DT_NEEDED
// entries as needed on ELF systems. // entries as needed on ELF systems.
// Treat function variables differently // Treat function variables differently
// to avoid type confict errors from LTO // to avoid type conflict errors from LTO
// (Link Time Optimization). // (Link Time Optimization).
if n.Kind == "fpvar" { if n.Kind == "fpvar" {
fmt.Fprintf(fm, "extern void %s();\n", n.C) fmt.Fprintf(fm, "extern void %s();\n", n.C)

View File

@ -86,7 +86,7 @@ func instrumentGlobals(fn *ir.Func) *ir.Name {
sizeWithRz := rzSize + size sizeWithRz := rzSize + size
c = tconv(ir.NewInt(sizeWithRz), types.Types[types.TUINTPTR]) c = tconv(ir.NewInt(sizeWithRz), types.Types[types.TUINTPTR])
setField("sizeWithRedzone", c, i) setField("sizeWithRedzone", c, i)
// The C string type is terminated by a null charactor "\0", Go should use three-digit // The C string type is terminated by a null character "\0", Go should use three-digit
// octal "\000" or two-digit hexadecimal "\x00" to create null terminated string. // octal "\000" or two-digit hexadecimal "\x00" to create null terminated string.
// asanName = symbol's linkname + "\000" // asanName = symbol's linkname + "\000"
// globals[i].name = (*defString)(unsafe.Pointer(&asanName)).data // globals[i].name = (*defString)(unsafe.Pointer(&asanName)).data

View File

@ -356,7 +356,7 @@ func methods(t *types.Type) []*typeSig {
} }
if f.Nointerface() { if f.Nointerface() {
// In the case of a nointerface method on an instantiated // In the case of a nointerface method on an instantiated
// type, don't actually apppend the typeSig. // type, don't actually append the typeSig.
continue continue
} }
ms = append(ms, sig) ms = append(ms, sig)

View File

@ -83,7 +83,7 @@ func cse(f *Func) {
// non-equivalent arguments. Repeat until we can't find any // non-equivalent arguments. Repeat until we can't find any
// more splits. // more splits.
var splitPoints []int var splitPoints []int
byArgClass := new(partitionByArgClass) // reuseable partitionByArgClass to reduce allocations byArgClass := new(partitionByArgClass) // reusable partitionByArgClass to reduce allocations
for { for {
changed := false changed := false

View File

@ -479,7 +479,7 @@
(MOVHUloadidx ptr idx (MOVHstoreidx ptr2 idx x _)) && isSamePtr(ptr, ptr2) => (MOVHUreg x) (MOVHUloadidx ptr idx (MOVHstoreidx ptr2 idx x _)) && isSamePtr(ptr, ptr2) => (MOVHUreg x)
(MOVHloadidx ptr idx (MOVHstoreidx ptr2 idx x _)) && isSamePtr(ptr, ptr2) => (MOVHreg x) (MOVHloadidx ptr idx (MOVHstoreidx ptr2 idx x _)) && isSamePtr(ptr, ptr2) => (MOVHreg x)
// fold constant into arithmatic ops // fold constant into arithmetic ops
(ADD x (MOVWconst [c])) => (ADDconst [c] x) (ADD x (MOVWconst [c])) => (ADDconst [c] x)
(SUB (MOVWconst [c]) x) => (RSBconst [c] x) (SUB (MOVWconst [c]) x) => (RSBconst [c] x)
(SUB x (MOVWconst [c])) => (SUBconst [c] x) (SUB x (MOVWconst [c])) => (SUBconst [c] x)

View File

@ -1166,7 +1166,7 @@
// But for now, this is enough to get rid of lots of them. // But for now, this is enough to get rid of lots of them.
(MOVDnop (MOVDconst [c])) => (MOVDconst [c]) (MOVDnop (MOVDconst [c])) => (MOVDconst [c])
// fold constant into arithmatic ops // fold constant into arithmetic ops
(ADD x (MOVDconst [c])) => (ADDconst [c] x) (ADD x (MOVDconst [c])) => (ADDconst [c] x)
(SUB x (MOVDconst [c])) => (SUBconst [c] x) (SUB x (MOVDconst [c])) => (SUBconst [c] x)
(AND x (MOVDconst [c])) => (ANDconst [c] x) (AND x (MOVDconst [c])) => (ANDconst [c] x)

View File

@ -558,7 +558,7 @@
// MOVVnop doesn't emit instruction, only for ensuring the type. // MOVVnop doesn't emit instruction, only for ensuring the type.
(MOVVreg x) && x.Uses == 1 => (MOVVnop x) (MOVVreg x) && x.Uses == 1 => (MOVVnop x)
// fold constant into arithmatic ops // fold constant into arithmetic ops
(ADDV x (MOVVconst [c])) && is32Bit(c) => (ADDVconst [c] x) (ADDV x (MOVVconst [c])) && is32Bit(c) => (ADDVconst [c] x)
(SUBV x (MOVVconst [c])) && is32Bit(c) => (SUBVconst [c] x) (SUBV x (MOVVconst [c])) && is32Bit(c) => (SUBVconst [c] x)
(AND x (MOVVconst [c])) && is32Bit(c) => (ANDconst [c] x) (AND x (MOVVconst [c])) && is32Bit(c) => (ANDconst [c] x)

View File

@ -565,7 +565,7 @@
// But for now, this is enough to get rid of lots of them. // But for now, this is enough to get rid of lots of them.
(MOVWnop (MOVWconst [c])) => (MOVWconst [c]) (MOVWnop (MOVWconst [c])) => (MOVWconst [c])
// fold constant into arithmatic ops // fold constant into arithmetic ops
(ADD x (MOVWconst [c])) => (ADDconst [c] x) (ADD x (MOVWconst [c])) => (ADDconst [c] x)
(SUB x (MOVWconst [c])) => (SUBconst [c] x) (SUB x (MOVWconst [c])) => (SUBconst [c] x)
(AND x (MOVWconst [c])) => (ANDconst [c] x) (AND x (MOVWconst [c])) => (ANDconst [c] x)

View File

@ -564,7 +564,7 @@
// But for now, this is enough to get rid of lots of them. // But for now, this is enough to get rid of lots of them.
(MOVVnop (MOVVconst [c])) => (MOVVconst [c]) (MOVVnop (MOVVconst [c])) => (MOVVconst [c])
// fold constant into arithmatic ops // fold constant into arithmetic ops
(ADDV x (MOVVconst [c])) && is32Bit(c) => (ADDVconst [c] x) (ADDV x (MOVVconst [c])) && is32Bit(c) => (ADDVconst [c] x)
(SUBV x (MOVVconst [c])) && is32Bit(c) => (SUBVconst [c] x) (SUBV x (MOVVconst [c])) && is32Bit(c) => (SUBVconst [c] x)
(AND x (MOVVconst [c])) && is32Bit(c) => (ANDconst [c] x) (AND x (MOVVconst [c])) && is32Bit(c) => (ANDconst [c] x)

View File

@ -450,7 +450,7 @@ func (po *poset) aliasnodes(n1 *Value, i2s bitset) {
po.upush(undoSetChr, uint32(idx), r) po.upush(undoSetChr, uint32(idx), r)
} }
// Connect all chidren of i2s to i1 (unless those children // Connect all children of i2s to i1 (unless those children
// are in i2s as well, in which case it would be useless) // are in i2s as well, in which case it would be useless)
if i2s.Test(uint32(idx)) { if i2s.Test(uint32(idx)) {
if l != 0 && !i2s.Test(l.Target()) { if l != 0 && !i2s.Test(l.Target()) {

View File

@ -418,7 +418,7 @@ func isSameCall(sym interface{}, name string) bool {
return fn != nil && fn.String() == name return fn != nil && fn.String() == name
} }
// canLoadUnaligned reports if the achitecture supports unaligned load operations // canLoadUnaligned reports if the architecture supports unaligned load operations
func canLoadUnaligned(c *Config) bool { func canLoadUnaligned(c *Config) bool {
return c.ctxt.Arch.Alignment == 1 return c.ctxt.Arch.Alignment == 1
} }

View File

@ -2296,7 +2296,7 @@ func TestInstantiateErrors(t *testing.T) {
} }
if argErr.Index != test.wantAt { if argErr.Index != test.wantAt {
t.Errorf("Instantate(%v, %v): error at index %d, want index %d", T, test.targs, argErr.Index, test.wantAt) t.Errorf("Instantiate(%v, %v): error at index %d, want index %d", T, test.targs, argErr.Index, test.wantAt)
} }
} }
} }

View File

@ -1,6 +1,6 @@
# go list -e -deps should list imports from any file it can read, even if # go list -e -deps should list imports from any file it can read, even if
# other files in the same package cause go/build.Import to return an error. # other files in the same package cause go/build.Import to return an error.
# Verfifies golang.org/issue/38568 # Verifies golang.org/issue/38568
go list -e -deps ./scan go list -e -deps ./scan
stdout m/want stdout m/want

View File

@ -938,7 +938,7 @@ func writeBlocks(ctxt *Link, out *OutBuf, sem chan int, ldr *loader.Loader, syms
length := int64(0) length := int64(0)
if idx+1 < len(syms) { if idx+1 < len(syms) {
// Find the next top-level symbol. // Find the next top-level symbol.
// Skip over sub symbols so we won't split a containter symbol // Skip over sub symbols so we won't split a container symbol
// into two blocks. // into two blocks.
next := syms[idx+1] next := syms[idx+1]
for ldr.AttrSubSymbol(next) { for ldr.AttrSubSymbol(next) {

View File

@ -700,11 +700,11 @@ func TestCreateSelfSignedCertificate(t *testing.T) {
} }
if len(cert.PermittedEmailAddresses) != 1 || cert.PermittedEmailAddresses[0] != "foo@example.com" { if len(cert.PermittedEmailAddresses) != 1 || cert.PermittedEmailAddresses[0] != "foo@example.com" {
t.Errorf("%s: failed to parse permitted email addreses: %#v", test.name, cert.PermittedEmailAddresses) t.Errorf("%s: failed to parse permitted email addresses: %#v", test.name, cert.PermittedEmailAddresses)
} }
if len(cert.ExcludedEmailAddresses) != 2 || cert.ExcludedEmailAddresses[0] != ".example.com" || cert.ExcludedEmailAddresses[1] != "example.com" { if len(cert.ExcludedEmailAddresses) != 2 || cert.ExcludedEmailAddresses[0] != ".example.com" || cert.ExcludedEmailAddresses[1] != "example.com" {
t.Errorf("%s: failed to parse excluded email addreses: %#v", test.name, cert.ExcludedEmailAddresses) t.Errorf("%s: failed to parse excluded email addresses: %#v", test.name, cert.ExcludedEmailAddresses)
} }
if len(cert.PermittedURIDomains) != 2 || cert.PermittedURIDomains[0] != ".bar.com" || cert.PermittedURIDomains[1] != "bar.com" { if len(cert.PermittedURIDomains) != 2 || cert.PermittedURIDomains[0] != ".bar.com" || cert.PermittedURIDomains[1] != "bar.com" {

View File

@ -643,7 +643,7 @@ func (c *fakeConn) PrepareContext(ctx context.Context, query string) (driver.Stm
} }
if c.stickyBad || (hookPrepareBadConn != nil && hookPrepareBadConn()) { if c.stickyBad || (hookPrepareBadConn != nil && hookPrepareBadConn()) {
return nil, fakeError{Message: "Preapre: Sticky Bad", Wrapped: driver.ErrBadConn} return nil, fakeError{Message: "Prepare: Sticky Bad", Wrapped: driver.ErrBadConn}
} }
c.touchMem() c.touchMem()

View File

@ -2314,7 +2314,7 @@ func TestInstantiateErrors(t *testing.T) {
} }
if argErr.Index != test.wantAt { if argErr.Index != test.wantAt {
t.Errorf("Instantate(%v, %v): error at index %d, want index %d", T, test.targs, argErr.Index, test.wantAt) t.Errorf("Instantiate(%v, %v): error at index %d, want index %d", T, test.targs, argErr.Index, test.wantAt)
} }
} }
} }

View File

@ -40,7 +40,7 @@ func TestNewMethodSet(t *testing.T) {
"var a T1; type ( T1 T2; T2 interface{ f() } )": {{"f", []int{0}, true}}, "var a T1; type ( T1 T2; T2 interface{ f() } )": {{"f", []int{0}, true}},
"var a T1; type ( T1 interface{ T2 }; T2 interface{ f() } )": {{"f", []int{0}, true}}, "var a T1; type ( T1 interface{ T2 }; T2 interface{ f() } )": {{"f", []int{0}, true}},
// Genric interfaces // Generic interfaces
"var a T[int]; type T[P any] interface{ f() }": {{"f", []int{0}, true}}, "var a T[int]; type T[P any] interface{ f() }": {{"f", []int{0}, true}},
"var a T1[int]; type ( T1[P any] T2[P]; T2[P any] interface{ f() } )": {{"f", []int{0}, true}}, "var a T1[int]; type ( T1[P any] T2[P]; T2[P any] interface{ f() } )": {{"f", []int{0}, true}},
"var a T1[int]; type ( T1[P any] interface{ T2[P] }; T2[P any] interface{ f() } )": {{"f", []int{0}, true}}, "var a T1[int]; type ( T1[P any] interface{ T2[P] }; T2[P any] interface{ f() } )": {{"f", []int{0}, true}},

View File

@ -603,7 +603,7 @@ func TestEncodeWrappedImage(t *testing.T) {
t.Fatalf("readImg: %v", err) t.Fatalf("readImg: %v", err)
} }
// Case 1: Enocde a wrapped image.Image // Case 1: Encode a wrapped image.Image
buf := new(bytes.Buffer) buf := new(bytes.Buffer)
w0 := offsetImage{m0, m0.Bounds()} w0 := offsetImage{m0, m0.Bounds()}
err = Encode(buf, w0, nil) err = Encode(buf, w0, nil)
@ -619,7 +619,7 @@ func TestEncodeWrappedImage(t *testing.T) {
t.Fatalf("Wrapped: average delta is too high. expected: 0, got %d", avgDelta) t.Fatalf("Wrapped: average delta is too high. expected: 0, got %d", avgDelta)
} }
// Case 2: Enocde a wrapped image.Image with offset // Case 2: Encode a wrapped image.Image with offset
b0 := image.Rectangle{ b0 := image.Rectangle{
Min: image.Point{ Min: image.Point{
X: 128, X: 128,

View File

@ -221,13 +221,13 @@ func (p *ReverseProxy) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
if ctx.Done() != nil { if ctx.Done() != nil {
// CloseNotifier predates context.Context, and has been // CloseNotifier predates context.Context, and has been
// entirely superseded by it. If the request contains // entirely superseded by it. If the request contains
// a Context that carries a cancelation signal, don't // a Context that carries a cancellation signal, don't
// bother spinning up a goroutine to watch the CloseNotify // bother spinning up a goroutine to watch the CloseNotify
// channel (if any). // channel (if any).
// //
// If the request Context has a nil Done channel (which // If the request Context has a nil Done channel (which
// means it is either context.Background, or a custom // means it is either context.Background, or a custom
// Context implementation with no cancelation signal), // Context implementation with no cancellation signal),
// then consult the CloseNotifier if available. // then consult the CloseNotifier if available.
} else if cn, ok := rw.(http.CloseNotifier); ok { } else if cn, ok := rw.(http.CloseNotifier); ok {
var cancel context.CancelFunc var cancel context.CancelFunc

View File

@ -6530,7 +6530,7 @@ func TestCancelRequestWhenSharingConnection(t *testing.T) {
r2c := <-reqc r2c := <-reqc
cancel() cancel()
// Give the cancelation a moment to take effect, and then unblock the first request. // Give the cancellation a moment to take effect, and then unblock the first request.
time.Sleep(1 * time.Millisecond) time.Sleep(1 * time.Millisecond)
close(idlec) close(idlec)

View File

@ -474,7 +474,7 @@ func (ip Addr) Is6() bool {
// Unmap returns ip with any IPv4-mapped IPv6 address prefix removed. // Unmap returns ip with any IPv4-mapped IPv6 address prefix removed.
// //
// That is, if ip is an IPv6 address wrapping an IPv4 adddress, it // That is, if ip is an IPv6 address wrapping an IPv4 address, it
// returns the wrapped IPv4 address. Otherwise it returns ip unmodified. // returns the wrapped IPv4 address. Otherwise it returns ip unmodified.
func (ip Addr) Unmap() Addr { func (ip Addr) Unmap() Addr {
if ip.Is4In6() { if ip.Is4In6() {

View File

@ -69,7 +69,7 @@ func sysUnused(v unsafe.Pointer, n uintptr) {
// //
// This operation is idempotent for memory already in the Prepared state, so // This operation is idempotent for memory already in the Prepared state, so
// it is safe to refer, with v and n, to a range of memory that includes both // it is safe to refer, with v and n, to a range of memory that includes both
// Prepared and Ready memory. However, the caller must provide the exact amout // Prepared and Ready memory. However, the caller must provide the exact amount
// of Prepared memory for accounting purposes. // of Prepared memory for accounting purposes.
func sysUsed(v unsafe.Pointer, n, prepared uintptr) { func sysUsed(v unsafe.Pointer, n, prepared uintptr) {
gcController.mappedReady.Add(int64(prepared)) gcController.mappedReady.Add(int64(prepared))

View File

@ -14,7 +14,7 @@ import "runtime/internal/atomic"
// CPU time and drains with mutator time. Because the bucket fills and // CPU time and drains with mutator time. Because the bucket fills and
// drains with time directly (i.e. without any weighting), this effectively // drains with time directly (i.e. without any weighting), this effectively
// sets a very conservative limit of 50%. This limit could be enforced directly, // sets a very conservative limit of 50%. This limit could be enforced directly,
// however, but the purpose of the bucket is to accomodate spikes in GC CPU // however, but the purpose of the bucket is to accommodate spikes in GC CPU
// utilization without hurting throughput. // utilization without hurting throughput.
// //
// Note that the bucket in the leaky bucket mechanism can never go negative, // Note that the bucket in the leaky bucket mechanism can never go negative,

View File

@ -963,7 +963,7 @@ func goroutineProfileWithLabelsConcurrent(p []StackRecord, labels []unsafe.Point
// New goroutines may not be in this list, but we didn't want to know about // New goroutines may not be in this list, but we didn't want to know about
// them anyway. If they do appear in this list (via reusing a dead goroutine // them anyway. If they do appear in this list (via reusing a dead goroutine
// struct, or racing to launch between the world restarting and us getting // struct, or racing to launch between the world restarting and us getting
// the list), they will aleady have their goroutineProfiled field set to // the list), they will already have their goroutineProfiled field set to
// goroutineProfileSatisfied before their state transitions out of _Gdead. // goroutineProfileSatisfied before their state transitions out of _Gdead.
// //
// Any goroutine that the scheduler tries to execute concurrently with this // Any goroutine that the scheduler tries to execute concurrently with this

View File

@ -201,7 +201,7 @@ func tracebackFunc(t *testing.T) uintptr {
// Go will never generate a stack trace containing such an address, as it is // Go will never generate a stack trace containing such an address, as it is
// not a valid call site. However, the cgo traceback function passed to // not a valid call site. However, the cgo traceback function passed to
// runtime.SetCgoTraceback may not be completely accurate and may incorrect // runtime.SetCgoTraceback may not be completely accurate and may incorrect
// provide PCs in Go code or the alignement region between functions. // provide PCs in Go code or the alignment region between functions.
// //
// Go obviously doesn't easily expose the problematic PCs to running programs, // Go obviously doesn't easily expose the problematic PCs to running programs,
// so this test is a bit fragile. Some details: // so this test is a bit fragile. Some details: