diff --git a/CHANGELOG.md b/CHANGELOG.md index bb2de66477..f5e6129908 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -217,7 +217,7 @@ - `reflect`: add SetZero - `reflect`: fix iterating over maps with interface{} keys - `reflect`: implement Value.Grow - - `reflect`: remove unecessary heap allocations + - `reflect`: remove unnecessary heap allocations - `reflect`: use .key() instead of a type assert - `sync`: add implementation from upstream Go for OnceFunc, OnceValue, and OnceValues * **targets** diff --git a/builder/ar.go b/builder/ar.go index 578b88ba57..807595b792 100644 --- a/builder/ar.go +++ b/builder/ar.go @@ -16,7 +16,7 @@ import ( "github.com/blakesmith/ar" ) -// makeArchive creates an arcive for static linking from a list of object files +// makeArchive creates an archive for static linking from a list of object files // given as a parameter. It is equivalent to the following command: // // ar -rcs diff --git a/builder/cc1as.h b/builder/cc1as.h index 4b22fc3e81..67b97f6cf9 100644 --- a/builder/cc1as.h +++ b/builder/cc1as.h @@ -93,7 +93,7 @@ struct AssemblerInvocation { EmitDwarfUnwindType EmitDwarfUnwind; // Whether to emit compact-unwind for non-canonical entries. - // Note: maybe overriden by other constraints. + // Note: maybe overridden by other constraints. unsigned EmitCompactUnwindNonCanonical : 1; /// The name of the relocation model to use. diff --git a/compileopts/config.go b/compileopts/config.go index ab6de4e44c..13321a487a 100644 --- a/compileopts/config.go +++ b/compileopts/config.go @@ -60,7 +60,7 @@ func (c *Config) GOOS() string { } // GOARCH returns the GOARCH of the target. This might not always be the actual -// archtecture: for example, the AVR target is not supported by the Go standard +// architecture: for example, the AVR target is not supported by the Go standard // library so such targets will usually pretend to be linux/arm. func (c *Config) GOARCH() string { return c.Target.GOARCH diff --git a/compiler/asserts.go b/compiler/asserts.go index 035fda6160..f07b73bc26 100644 --- a/compiler/asserts.go +++ b/compiler/asserts.go @@ -99,7 +99,7 @@ func (b *builder) createUnsafeSliceStringCheck(name string, ptr, len llvm.Value, // However, in practice, it is also necessary to check that the length is // not too big that a GEP wouldn't be possible without wrapping the pointer. // These two checks (non-negative and not too big) can be merged into one - // using an unsiged greater than. + // using an unsigned greater than. // Make sure the len value is at least as big as a uintptr. len = b.extendInteger(len, lenType, b.uintptrType) diff --git a/compiler/compiler.go b/compiler/compiler.go index 0ae32cc94c..6caaf37095 100644 --- a/compiler/compiler.go +++ b/compiler/compiler.go @@ -242,7 +242,7 @@ func NewTargetMachine(config *Config) (llvm.TargetMachine, error) { } // Sizes returns a types.Sizes appropriate for the given target machine. It -// includes the correct int size and aligment as is necessary for the Go +// includes the correct int size and alignment as is necessary for the Go // typechecker. func Sizes(machine llvm.TargetMachine) types.Sizes { targetData := machine.CreateTargetData() diff --git a/compiler/gc.go b/compiler/gc.go index 9d568a174b..fc0e6e687f 100644 --- a/compiler/gc.go +++ b/compiler/gc.go @@ -78,7 +78,7 @@ func (b *builder) trackValue(value llvm.Value) { } } -// trackPointer creates a call to runtime.trackPointer, bitcasting the poitner +// trackPointer creates a call to runtime.trackPointer, bitcasting the pointer // first if needed. The input value must be of LLVM pointer type. func (b *builder) trackPointer(value llvm.Value) { b.createRuntimeCall("trackPointer", []llvm.Value{value, b.stackChainAlloca}, "") diff --git a/compiler/interface.go b/compiler/interface.go index fc698c7a97..dffaeec0ad 100644 --- a/compiler/interface.go +++ b/compiler/interface.go @@ -86,7 +86,7 @@ func (b *builder) createMakeInterface(val llvm.Value, typ types.Type, pos token. // extractValueFromInterface extract the value from an interface value // (runtime._interface) under the assumption that it is of the type given in -// llvmType. The behavior is undefied if the interface is nil or llvmType +// llvmType. The behavior is undefined if the interface is nil or llvmType // doesn't match the underlying type of the interface. func (b *builder) extractValueFromInterface(itf llvm.Value, llvmType llvm.Type) llvm.Value { valuePtr := b.CreateExtractValue(itf, 1, "typeassert.value.ptr") diff --git a/compiler/llvm.go b/compiler/llvm.go index d693f6ed73..6771adaafd 100644 --- a/compiler/llvm.go +++ b/compiler/llvm.go @@ -416,7 +416,7 @@ func (c *compilerContext) getPointerBitmap(typ llvm.Type, pos token.Pos) *big.In } } -// archFamily returns the archtecture from the LLVM triple but with some +// archFamily returns the architecture from the LLVM triple but with some // architecture names ("armv6", "thumbv7m", etc) merged into a single // architecture name ("arm"). func (c *compilerContext) archFamily() string { diff --git a/compiler/map.go b/compiler/map.go index 1c124c2b20..b4c5267233 100644 --- a/compiler/map.go +++ b/compiler/map.go @@ -326,7 +326,7 @@ func (b *builder) zeroUndefBytes(llvmType llvm.Type, ptr llvm.Value) error { if i < numFields-1 { nextOffset = b.targetData.ElementOffset(llvmStructType, i+1) } else { - // Last field? Next offset is the total size of the allcoate struct. + // Last field? Next offset is the total size of the allocate struct. nextOffset = b.targetData.TypeAllocSize(llvmStructType) } diff --git a/interp/README.md b/interp/README.md index c0a794cc75..26ab657c0c 100644 --- a/interp/README.md +++ b/interp/README.md @@ -28,7 +28,7 @@ All in all, this design provides several benefits: it should be a whole lot faster for loops as it doesn't have to call into LLVM (via CGo) for every operation. -As mentioned, this partial evaulator comes in three parts: a compiler, an +As mentioned, this partial evaluator comes in three parts: a compiler, an interpreter, and a memory manager. ## Compiler diff --git a/interp/interp.go b/interp/interp.go index 63a664920d..80afc39c74 100644 --- a/interp/interp.go +++ b/interp/interp.go @@ -52,7 +52,7 @@ func newRunner(mod llvm.Module, timeout time.Duration, debug bool) *runner { return &r } -// Dispose deallocates all alloated LLVM resources. +// Dispose deallocates all allocated LLVM resources. func (r *runner) dispose() { r.targetData.Dispose() r.targetData = llvm.TargetData{} diff --git a/main.go b/main.go index 6b3aeb3b03..af393a7491 100644 --- a/main.go +++ b/main.go @@ -1689,7 +1689,7 @@ func main() { for i := range bufs { err := bufs[i].flush(os.Stdout, os.Stderr) if err != nil { - // There was an error writing to stdout or stderr, so we probbably cannot print this. + // There was an error writing to stdout or stderr, so we probably cannot print this. select { case fail <- struct{}{}: default: diff --git a/src/crypto/rand/rand_arc4random.go b/src/crypto/rand/rand_arc4random.go index 1b1796b4d6..f3cd41d3f5 100644 --- a/src/crypto/rand/rand_arc4random.go +++ b/src/crypto/rand/rand_arc4random.go @@ -3,7 +3,7 @@ // This implementation of crypto/rand uses the arc4random_buf function // (available on both MacOS and WASI) to generate random numbers. // -// Note: arc4random_buf (unlike what the name suggets) does not use the insecure +// Note: arc4random_buf (unlike what the name suggests) does not use the insecure // RC4 cipher. Instead, it uses a high-quality cipher, varying by the libc // implementation. diff --git a/src/crypto/tls/tls.go b/src/crypto/tls/tls.go index 75f4a25093..1520c30fca 100644 --- a/src/crypto/tls/tls.go +++ b/src/crypto/tls/tls.go @@ -101,7 +101,7 @@ type Dialer struct { // // The returned Conn, if any, will always be of type *Conn. func (d *Dialer) DialContext(ctx context.Context, network, addr string) (net.Conn, error) { - return nil, errors.New("tls:DialContext not implmented") + return nil, errors.New("tls:DialContext not implemented") } // LoadX509KeyPair reads and parses a public/private key pair from a pair diff --git a/src/machine/machine_atmega1280.go b/src/machine/machine_atmega1280.go index 49564a3ce3..1b8cb848de 100644 --- a/src/machine/machine_atmega1280.go +++ b/src/machine/machine_atmega1280.go @@ -180,7 +180,7 @@ func (pwm PWM) Configure(config PWMConfig) error { // Set the PWM mode to fast PWM (mode = 3). avr.TCCR0A.Set(avr.TCCR0A_WGM00 | avr.TCCR0A_WGM01) // monotonic timer is using the same time as PWM:0 - // we must adust internal settings of monotonic timer when PWM:0 settings changed + // we must adjust internal settings of monotonic timer when PWM:0 settings changed adjustMonotonicTimer() } else { avr.TCCR2B.Set(prescaler) @@ -718,7 +718,7 @@ func (pwm PWM) Set(channel uint8, value uint32) { } } // monotonic timer is using the same time as PWM:0 - // we must adust internal settings of monotonic timer when PWM:0 settings changed + // we must adjust internal settings of monotonic timer when PWM:0 settings changed adjustMonotonicTimer() case 1: mask := interrupt.Disable() diff --git a/src/machine/machine_atmega328.go b/src/machine/machine_atmega328.go index e4b2bb06f9..c354ccb888 100644 --- a/src/machine/machine_atmega328.go +++ b/src/machine/machine_atmega328.go @@ -56,7 +56,7 @@ func (pwm PWM) Configure(config PWMConfig) error { // Set the PWM mode to fast PWM (mode = 3). avr.TCCR0A.Set(avr.TCCR0A_WGM00 | avr.TCCR0A_WGM01) // monotonic timer is using the same time as PWM:0 - // we must adust internal settings of monotonic timer when PWM:0 settings changed + // we must adjust internal settings of monotonic timer when PWM:0 settings changed adjustMonotonicTimer() } else { avr.TCCR2B.Set(prescaler) @@ -385,7 +385,7 @@ func (pwm PWM) Set(channel uint8, value uint32) { } } // monotonic timer is using the same time as PWM:0 - // we must adust internal settings of monotonic timer when PWM:0 settings changed + // we must adjust internal settings of monotonic timer when PWM:0 settings changed adjustMonotonicTimer() case 1: mask := interrupt.Disable() diff --git a/src/machine/machine_esp32c3.go b/src/machine/machine_esp32c3.go index b1ad0bc2fc..7c7622a4c7 100644 --- a/src/machine/machine_esp32c3.go +++ b/src/machine/machine_esp32c3.go @@ -437,15 +437,15 @@ func (uart *UART) configureInterrupt(intrMapReg *volatile.Register32) { // Disab func (uart *UART) serveInterrupt(num int) { // get interrupt status - interrutFlag := uart.Bus.INT_ST.Get() - if (interrutFlag & uartInterrupts) == 0 { + interruptFlag := uart.Bus.INT_ST.Get() + if (interruptFlag & uartInterrupts) == 0 { return } // block UART interrupts while processing uart.Bus.INT_ENA.ClearBits(uartInterrupts) - if interrutFlag&esp.UART_INT_ENA_RXFIFO_FULL_INT_ENA > 0 { + if interruptFlag&esp.UART_INT_ENA_RXFIFO_FULL_INT_ENA > 0 { for uart.Bus.GetSTATUS_RXFIFO_CNT() > 0 { b := uart.Bus.GetFIFO_RXFIFO_RD_BYTE() if !uart.Buffer.Put(byte(b & 0xff)) { @@ -453,22 +453,22 @@ func (uart *UART) serveInterrupt(num int) { } } } - if interrutFlag&esp.UART_INT_ENA_PARITY_ERR_INT_ENA > 0 { + if interruptFlag&esp.UART_INT_ENA_PARITY_ERR_INT_ENA > 0 { uart.ParityErrorDetected = true } - if 0 != interrutFlag&esp.UART_INT_ENA_FRM_ERR_INT_ENA { + if 0 != interruptFlag&esp.UART_INT_ENA_FRM_ERR_INT_ENA { uart.DataErrorDetected = true } - if 0 != interrutFlag&esp.UART_INT_ENA_RXFIFO_OVF_INT_ENA { + if 0 != interruptFlag&esp.UART_INT_ENA_RXFIFO_OVF_INT_ENA { uart.DataOverflowDetected = true } - if 0 != interrutFlag&esp.UART_INT_ENA_GLITCH_DET_INT_ENA { + if 0 != interruptFlag&esp.UART_INT_ENA_GLITCH_DET_INT_ENA { uart.DataErrorDetected = true } // Clear the UART interrupt status - uart.Bus.INT_CLR.SetBits(interrutFlag) - uart.Bus.INT_CLR.ClearBits(interrutFlag) + uart.Bus.INT_CLR.SetBits(interruptFlag) + uart.Bus.INT_CLR.ClearBits(interruptFlag) // Enable interrupts uart.Bus.INT_ENA.Set(uartInterrupts) } @@ -480,7 +480,7 @@ func (uart *UART) enableTransmitter() { uart.Bus.SetCONF0_TXFIFO_RST(0) // TXINFO empty threshold is when txfifo_empty_int interrupt produced after the amount of data in Tx-FIFO is less than this register value. uart.Bus.SetCONF1_TXFIFO_EMPTY_THRHD(uart_empty_thresh_default) - // we are not using interrut on TX since write we are waiting for FIFO to have space. + // we are not using interrupt on TX since write we are waiting for FIFO to have space. // uart.Bus.INT_ENA.SetBits(esp.UART_INT_ENA_TXFIFO_EMPTY_INT_ENA) } diff --git a/src/machine/machine_mimxrt1062.go b/src/machine/machine_mimxrt1062.go index 8c42c55645..74d01c7661 100644 --- a/src/machine/machine_mimxrt1062.go +++ b/src/machine/machine_mimxrt1062.go @@ -451,7 +451,7 @@ func (p Pin) getGPIO() (norm *nxp.GPIO_Type, fast *nxp.GPIO_Type) { } } -// getPad returns both the pad and mux configration registers for a given Pin. +// getPad returns both the pad and mux configuration registers for a given Pin. func (p Pin) getPad() (pad *volatile.Register32, mux *volatile.Register32) { switch p.getPort() { case portA: diff --git a/src/machine/machine_rp2040_i2c.go b/src/machine/machine_rp2040_i2c.go index 1b66a86876..abc1d8d4a9 100644 --- a/src/machine/machine_rp2040_i2c.go +++ b/src/machine/machine_rp2040_i2c.go @@ -24,7 +24,7 @@ var ( // here: https://github.com/vmilea/pico_i2c_slave // Features: Taken from datasheet. -// Default controller mode, with target mode available (not simulataneously). +// Default controller mode, with target mode available (not simultaneously). // Default target address of RP2040: 0x055 // Supports 10-bit addressing in controller mode // 16-element transmit buffer @@ -36,11 +36,11 @@ var ( // GPIO config // Each controller must connect its clock SCL and data SDA to one pair of GPIOs. // The I2C standard requires that drivers drivea signal low, or when not driven the signal will be pulled high. -// This applies to SCL and SDA. The GPIO pads should beconfigured for: +// This applies to SCL and SDA. The GPIO pads should be configured for: // Pull-up enabled // Slew rate limited // Schmitt trigger enabled -// Note: There should also be external pull-ups on the board as the internal pad pull-ups may not be strong enough to pull upexternal circuits. +// Note: There should also be external pull-ups on the board as the internal pad pull-ups may not be strong enough to pull up external circuits. // I2CConfig is used to store config info for I2C. type I2CConfig struct { diff --git a/src/machine/machine_stm32f103.go b/src/machine/machine_stm32f103.go index 66a74d04b6..545c431110 100644 --- a/src/machine/machine_stm32f103.go +++ b/src/machine/machine_stm32f103.go @@ -399,7 +399,7 @@ func (i2c *I2C) getFreqRange(config I2CConfig) uint32 { // pclk1 clock speed is main frequency divided by PCLK1 prescaler (div 2) pclk1 := CPUFrequency() / 2 - // set freqency range to PCLK1 clock speed in MHz + // set frequency range to PCLK1 clock speed in MHz // aka setting the value 36 means to use 36 MHz clock return pclk1 / 1000000 } diff --git a/src/machine/machine_stm32l0.go b/src/machine/machine_stm32l0.go index e3fcefb572..b7dc1581c3 100644 --- a/src/machine/machine_stm32l0.go +++ b/src/machine/machine_stm32l0.go @@ -256,10 +256,10 @@ func (spi SPI) getBaudRate(config SPIConfig) uint32 { } // set frequency dependent on PCLK prescaler. Since these are rather weird - // speeds due to the CPU freqency, pick a range up to that frquency for + // speeds due to the CPU frequency, pick a range up to that frequency for // clients to use more human-understandable numbers, e.g. nearest 100KHz - // These are based on APB2 clock frquency (84MHz on the discovery board) + // These are based on APB2 clock frequency (84MHz on the discovery board) // TODO: also include the MCU/APB clock setting in the equation switch { case localFrequency < 328125: diff --git a/src/machine/machine_stm32l4.go b/src/machine/machine_stm32l4.go index 856320911b..6f55e84d8e 100644 --- a/src/machine/machine_stm32l4.go +++ b/src/machine/machine_stm32l4.go @@ -327,10 +327,10 @@ func (spi SPI) getBaudRate(config SPIConfig) uint32 { localFrequency := config.Frequency // set frequency dependent on PCLK prescaler. Since these are rather weird - // speeds due to the CPU freqency, pick a range up to that frquency for + // speeds due to the CPU frequency, pick a range up to that frequency for // clients to use more human-understandable numbers, e.g. nearest 100KHz - // These are based on 80MHz peripheral clock frquency + // These are based on 80MHz peripheral clock frequency switch { case localFrequency < 312500: conf = stm32.SPI_CR1_BR_Div256 diff --git a/src/os/os_anyos_test.go b/src/os/os_anyos_test.go index 8a082d6522..c74e8bbb8a 100644 --- a/src/os/os_anyos_test.go +++ b/src/os/os_anyos_test.go @@ -56,7 +56,7 @@ func TestStatBadDir(t *testing.T) { badDir := filepath.Join(dir, "not-exist/really-not-exist") _, err := Stat(badDir) if pe, ok := err.(*fs.PathError); !ok || !IsNotExist(err) || pe.Path != badDir { - t.Errorf("Mkdir error = %#v; want PathError for path %q satisifying IsNotExist", err, badDir) + t.Errorf("Mkdir error = %#v; want PathError for path %q satisfying IsNotExist", err, badDir) } } diff --git a/src/os/tempfile_test.go b/src/os/tempfile_test.go index cf3fd46d70..bf01f1df0a 100644 --- a/src/os/tempfile_test.go +++ b/src/os/tempfile_test.go @@ -158,7 +158,7 @@ func TestMkdirTempBadDir(t *testing.T) { badDir := filepath.Join(dir, "not-exist") _, err = MkdirTemp(badDir, "foo") if pe, ok := err.(*fs.PathError); !ok || !IsNotExist(err) || pe.Path != badDir { - t.Errorf("TempDir error = %#v; want PathError for path %q satisifying IsNotExist", err, badDir) + t.Errorf("TempDir error = %#v; want PathError for path %q satisfying IsNotExist", err, badDir) } } diff --git a/src/reflect/type.go b/src/reflect/type.go index 1356f67cdd..859ca0e337 100644 --- a/src/reflect/type.go +++ b/src/reflect/type.go @@ -404,7 +404,7 @@ const ( // The base type struct. All type structs start with this. type rawType struct { - meta uint8 // metadata byte, contains kind and flags (see contants above) + meta uint8 // metadata byte, contains kind and flags (see constants above) } // All types that have an element type: named, chan, slice, array, map (but not diff --git a/src/reflect/value_test.go b/src/reflect/value_test.go index 40f0919bdc..508b358ad9 100644 --- a/src/reflect/value_test.go +++ b/src/reflect/value_test.go @@ -164,7 +164,7 @@ func TestTinyMap(t *testing.T) { // make sure we can get it out v2 := refut.MapIndex(ValueOf(unmarshalerText{"x", "y"})) if !v2.IsValid() || !v2.Bool() { - t.Errorf("Failed to look up map struct key with refection") + t.Errorf("Failed to look up map struct key with reflection") } // put in a key with reflection diff --git a/src/runtime/interrupt/interrupt_avr.go b/src/runtime/interrupt/interrupt_avr.go index 0af71a89e5..f27da8a048 100644 --- a/src/runtime/interrupt/interrupt_avr.go +++ b/src/runtime/interrupt/interrupt_avr.go @@ -27,7 +27,7 @@ func Disable() (state State) { // Restore restores interrupts to what they were before. Give the previous state // returned by Disable as a parameter. If interrupts were disabled before // calling Disable, this will not re-enable interrupts, allowing for nested -// cricital sections. +// critical sections. func Restore(state State) { // SREG is at I/O address 0x3f. device.AsmFull("out 0x3f, {state}", map[string]interface{}{ diff --git a/src/runtime/interrupt/interrupt_cortexm.go b/src/runtime/interrupt/interrupt_cortexm.go index a34dff7879..708d486bdf 100644 --- a/src/runtime/interrupt/interrupt_cortexm.go +++ b/src/runtime/interrupt/interrupt_cortexm.go @@ -46,7 +46,7 @@ func Disable() (state State) { // Restore restores interrupts to what they were before. Give the previous state // returned by Disable as a parameter. If interrupts were disabled before // calling Disable, this will not re-enable interrupts, allowing for nested -// cricital sections. +// critical sections. func Restore(state State) { arm.EnableInterrupts(uintptr(state)) } diff --git a/src/runtime/interrupt/interrupt_esp32c3.go b/src/runtime/interrupt/interrupt_esp32c3.go index b1a5bb1b3c..00bcd315a3 100644 --- a/src/runtime/interrupt/interrupt_esp32c3.go +++ b/src/runtime/interrupt/interrupt_esp32c3.go @@ -222,7 +222,7 @@ func handleException(mcause uintptr) { println("*** Exception: mcause:", mcause) switch uint32(mcause & 0x1f) { case 1: - println("*** virtual addess:", riscv.MTVAL.Get()) + println("*** virtual address:", riscv.MTVAL.Get()) case 2: println("*** opcode:", riscv.MTVAL.Get()) case 5: diff --git a/src/runtime/interrupt/interrupt_gameboyadvance.go b/src/runtime/interrupt/interrupt_gameboyadvance.go index 13f5fbe09d..2224066ed7 100644 --- a/src/runtime/interrupt/interrupt_gameboyadvance.go +++ b/src/runtime/interrupt/interrupt_gameboyadvance.go @@ -92,7 +92,7 @@ func Disable() (state State) { // Restore restores interrupts to what they were before. Give the previous state // returned by Disable as a parameter. If interrupts were disabled before // calling Disable, this will not re-enable interrupts, allowing for nested -// cricital sections. +// critical sections. func Restore(state State) { // Restore interrupts to the previous state. gba.INTERRUPT.PAUSE.Set(uint16(state)) diff --git a/src/runtime/interrupt/interrupt_none.go b/src/runtime/interrupt/interrupt_none.go index 255fca9ea8..2f4aae6c8a 100644 --- a/src/runtime/interrupt/interrupt_none.go +++ b/src/runtime/interrupt/interrupt_none.go @@ -21,7 +21,7 @@ func Disable() (state State) { // Restore restores interrupts to what they were before. Give the previous state // returned by Disable as a parameter. If interrupts were disabled before // calling Disable, this will not re-enable interrupts, allowing for nested -// cricital sections. +// critical sections. func Restore(state State) {} // In returns whether the system is currently in an interrupt. diff --git a/src/runtime/interrupt/interrupt_tinygoriscv.go b/src/runtime/interrupt/interrupt_tinygoriscv.go index 2b97a2f11a..fd21afcda9 100644 --- a/src/runtime/interrupt/interrupt_tinygoriscv.go +++ b/src/runtime/interrupt/interrupt_tinygoriscv.go @@ -23,7 +23,7 @@ func Disable() (state State) { // Restore restores interrupts to what they were before. Give the previous state // returned by Disable as a parameter. If interrupts were disabled before // calling Disable, this will not re-enable interrupts, allowing for nested -// cricital sections. +// critical sections. func Restore(state State) { riscv.EnableInterrupts(uintptr(state)) } diff --git a/src/runtime/interrupt/interrupt_xtensa.go b/src/runtime/interrupt/interrupt_xtensa.go index fe962f0451..69dc711836 100644 --- a/src/runtime/interrupt/interrupt_xtensa.go +++ b/src/runtime/interrupt/interrupt_xtensa.go @@ -23,7 +23,7 @@ func Disable() (state State) { // Restore restores interrupts to what they were before. Give the previous state // returned by Disable as a parameter. If interrupts were disabled before // calling Disable, this will not re-enable interrupts, allowing for nested -// cricital sections. +// critical sections. func Restore(state State) { device.AsmFull("wsr {state}, PS", map[string]interface{}{ "state": state, diff --git a/src/sync/mutex_test.go b/src/sync/mutex_test.go index 1e398e5aca..be24d93031 100644 --- a/src/sync/mutex_test.go +++ b/src/sync/mutex_test.go @@ -120,7 +120,7 @@ func TestRWMutexUncontended(t *testing.T) { mu.Lock() mu.Unlock() - // Acuire several read locks. + // Acquire several read locks. const n = 5 for i := 0; i < n; i++ { mu.RLock() diff --git a/transform/interrupt.go b/transform/interrupt.go index 043eebb84c..8c3ed4b510 100644 --- a/transform/interrupt.go +++ b/transform/interrupt.go @@ -137,7 +137,7 @@ func LowerInterrupts(mod llvm.Module) []error { user.ReplaceAllUsesWith(llvm.ConstInt(user.Type(), uint64(num), true)) } - // The runtime/interrput.handle struct can finally be removed. + // The runtime/interrupt.handle struct can finally be removed. // It would probably be eliminated anyway by a globaldce pass but it's // better to do it now to be sure. handler.EraseFromParentAsGlobal()