aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorshivay <[email protected]>2023-03-24 12:22:18 +0100
committerDamian Gryski <[email protected]>2023-03-24 09:22:38 -0700
commitd73e12db633fb7db2cb219afe822db645eaf85df (patch)
tree7e7d41dfcc5f9b0cc80a0bb2494048b3128d610d
parent4b0e56cbec91a2b4e26b362493bc552e72803da6 (diff)
downloadtinygo-d73e12db633fb7db2cb219afe822db645eaf85df.tar.gz
tinygo-d73e12db633fb7db2cb219afe822db645eaf85df.zip
feat: fix typos
-rw-r--r--CHANGELOG.md6
-rw-r--r--compiler/defer.go2
-rw-r--r--interp/README.md4
-rw-r--r--interp/compiler.go2
-rw-r--r--interp/memory.go2
-rw-r--r--src/runtime/chan.go26
-rw-r--r--targets/rp2040-boot-stage2.S2
-rw-r--r--testdata/channel.go12
-rw-r--r--testdata/channel.txt12
9 files changed, 34 insertions, 34 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c5ce39527..5704e20e3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -416,7 +416,7 @@
- `interp`: always run atomic and volatile loads/stores at runtime
- `interp`: bump timeout to 180 seconds
- `interp`: handle type assertions on nil interfaces
- - `loader`: elminate goroot cache inconsistency
+ - `loader`: eliminate goroot cache inconsistency
- `loader`: respect $GOROOT when running `go list`
- `transform`: allocate the correct amount of bytes in an alloca
- `transform`: remove switched func lowering
@@ -1115,7 +1115,7 @@
- `sync`: add WaitGroup
* **targets**
- `arm`: allow nesting in DisableInterrupts and EnableInterrupts
- - `arm`: make FPU configuraton consistent
+ - `arm`: make FPU configuration consistent
- `arm`: do not mask fault handlers in critical sections
- `atmega2560`: fix pin mapping for pins D2, D5 and the L port
- `atsamd`: return an error when an incorrect PWM pin is used
@@ -1144,7 +1144,7 @@
- `nrf`: add microbit-s110v8 target
- `nrf`: fix bug in SPI.Tx
- `nrf`: support debugging the PCA10056
- - `pygamer`: add Adafruit PyGamer suport
+ - `pygamer`: add Adafruit PyGamer support
- `riscv`: fix interrupt configuration bug
- `riscv`: disable linker relaxations during gp init
- `stm32f4disco`: add new target with ST-Link v2.1 debugger
diff --git a/compiler/defer.go b/compiler/defer.go
index a7739c9db..191b64b91 100644
--- a/compiler/defer.go
+++ b/compiler/defer.go
@@ -544,7 +544,7 @@ func (b *builder) createRunDefers() {
forwardParams = append(forwardParams, forwardParam)
}
- // Plain TinyGo functions add some extra parameters to implement async functionality and function recievers.
+ // Plain TinyGo functions add some extra parameters to implement async functionality and function receivers.
// These parameters should not be supplied when calling into an external C/ASM function.
if !b.getFunctionInfo(callback).exported {
// Add the context parameter. We know it is ignored by the receiving
diff --git a/interp/README.md b/interp/README.md
index 5ada617c3..c0a794cc7 100644
--- a/interp/README.md
+++ b/interp/README.md
@@ -70,7 +70,7 @@ object. Every memory object is given an index, and pointers use that index to
look up the current active object for the pointer to load from or to copy
when storing to it.
-Rolling back a function should roll back everyting, including the few
+Rolling back a function should roll back everything, including the few
instructions emitted at runtime. This is done by treating instructions much
like memory objects and removing the created instructions when necessary.
@@ -88,7 +88,7 @@ LLVM than initialization code. Also, there are a few other benefits:
they can be propagated and provide some opportunities for other
optimizations (like dead code elimination when branching on the contents of
a global).
- * Constants are much more efficent on microcontrollers, as they can be
+ * Constants are much more efficient on microcontrollers, as they can be
allocated in flash instead of RAM.
The Go SSA package does not create constant initializers for globals.
diff --git a/interp/compiler.go b/interp/compiler.go
index ffef69e56..f0a096862 100644
--- a/interp/compiler.go
+++ b/interp/compiler.go
@@ -254,7 +254,7 @@ func (r *runner) compileFunction(llvmFn llvm.Value) *function {
}
}
case llvm.BitCast, llvm.IntToPtr, llvm.PtrToInt:
- // Bitcasts are ususally used to cast a pointer from one type to
+ // Bitcasts are usually used to cast a pointer from one type to
// another leaving the pointer itself intact.
inst.name = llvmInst.Name()
inst.operands = []value{
diff --git a/interp/memory.go b/interp/memory.go
index 9a28f1d49..f96387062 100644
--- a/interp/memory.go
+++ b/interp/memory.go
@@ -12,7 +12,7 @@ package interp
// done in interp and results in a revert.
//
// Right now the memory is assumed to be little endian. This will need an update
-// for big endian arcitectures, if TinyGo ever adds support for one.
+// for big endian architectures, if TinyGo ever adds support for one.
import (
"encoding/binary"
diff --git a/src/runtime/chan.go b/src/runtime/chan.go
index f1abac4d0..625372246 100644
--- a/src/runtime/chan.go
+++ b/src/runtime/chan.go
@@ -46,7 +46,7 @@ type channelBlockedList struct {
// t is the task associated with this channel operation.
// If this channel operation is not part of a select, then the pointer field of the state holds the data buffer.
- // If this channel operation is part of a select, then the pointer field of the state holds the recieve buffer.
+ // If this channel operation is part of a select, then the pointer field of the state holds the receive buffer.
// If this channel operation is a receive, then the data field should be set to zero when resuming due to channel closure.
t *task.Task
@@ -319,10 +319,10 @@ func (ch *channel) trySend(value unsafe.Pointer) bool {
interrupt.Restore(i)
return false
case chanStateRecv:
- // unblock reciever
+ // unblock receiver
dst := ch.resumeRX(true)
- // copy value to reciever
+ // copy value to receiver
memcpy(dst, value, ch.elementSize)
// change state to empty if there are no more receivers
@@ -348,12 +348,12 @@ func (ch *channel) trySend(value unsafe.Pointer) bool {
return false
}
-// try to recieve a value from a channel, without really blocking
-// returns whether a value was recieved
+// try to receive a value from a channel, without really blocking
+// returns whether a value was received
// second return is the comma-ok value
func (ch *channel) tryRecv(value unsafe.Pointer) (bool, bool) {
if ch == nil {
- // recieve from nil channel blocks forever
+ // receive from nil channel blocks forever
// this is non-blocking, so just say no
return false, false
}
@@ -402,7 +402,7 @@ func (ch *channel) tryRecv(value unsafe.Pointer) (bool, bool) {
interrupt.Restore(i)
return false, false
case chanStateRecv, chanStateEmpty:
- // something else is already waiting to recieve
+ // something else is already waiting to receive
interrupt.Restore(i)
return false, false
case chanStateClosed:
@@ -411,7 +411,7 @@ func (ch *channel) tryRecv(value unsafe.Pointer) (bool, bool) {
return true, true
}
- // channel closed - nothing to recieve
+ // channel closed - nothing to receive
memzero(value, ch.elementSize)
interrupt.Restore(i)
return true, false
@@ -426,8 +426,8 @@ func (ch *channel) tryRecv(value unsafe.Pointer) (bool, bool) {
type chanState uint8
const (
- chanStateEmpty chanState = iota // nothing in channel, no senders/recievers
- chanStateRecv // nothing in channel, recievers waiting
+ chanStateEmpty chanState = iota // nothing in channel, no senders/receivers
+ chanStateRecv // nothing in channel, receivers waiting
chanStateSend // senders waiting, buffer full if present
chanStateBuf // buffer not empty, no senders waiting
chanStateClosed // channel closed
@@ -477,7 +477,7 @@ func chanSend(ch *channel, value unsafe.Pointer, blockedlist *channelBlockedList
deadlock()
}
- // wait for reciever
+ // wait for receiver
sender := task.Current()
ch.state = chanStateSend
sender.Ptr = value
@@ -493,8 +493,8 @@ func chanSend(ch *channel, value unsafe.Pointer, blockedlist *channelBlockedList
}
// chanRecv receives a single value over a channel.
-// It blocks if there is no available value to recieve.
-// The recieved value is copied into the value pointer.
+// It blocks if there is no available value to receive.
+// The received value is copied into the value pointer.
// Returns the comma-ok value.
func chanRecv(ch *channel, value unsafe.Pointer, blockedlist *channelBlockedList) bool {
i := interrupt.Disable()
diff --git a/targets/rp2040-boot-stage2.S b/targets/rp2040-boot-stage2.S
index 8a16b6448..9cc2ce09b 100644
--- a/targets/rp2040-boot-stage2.S
+++ b/targets/rp2040-boot-stage2.S
@@ -6,7 +6,7 @@
// symbols from the included files in the reference implementation directly into
// the source. It has also been modified to include the conditional logic from
// the CircuitPython implementation that supports additional flash chips. The
-// CiruitPython source is here:
+// CircuitPython source is here:
// https://github.com/adafruit/circuitpython/blob/main/ports/raspberrypi/stage2.c.jinja
//
// This file cannot be assembled directly, instead assemble the board-specific file
diff --git a/testdata/channel.go b/testdata/channel.go
index 6a7945e5d..a7d0e99e4 100644
--- a/testdata/channel.go
+++ b/testdata/channel.go
@@ -158,16 +158,16 @@ func main() {
ch = make(chan int, 2)
ch <- 1
ch <- 2
- println("non-concurrent channel recieve:", <-ch)
- println("non-concurrent channel recieve:", <-ch)
+ println("non-concurrent channel receive:", <-ch)
+ println("non-concurrent channel receive:", <-ch)
// test closing channels with buffered data
ch <- 3
ch <- 4
close(ch)
- println("closed buffered channel recieve:", <-ch)
- println("closed buffered channel recieve:", <-ch)
- println("closed buffered channel recieve:", <-ch)
+ println("closed buffered channel receive:", <-ch)
+ println("closed buffered channel receive:", <-ch)
+ println("closed buffered channel receive:", <-ch)
// test using buffered channels as regular channels with special properties
wg.Add(6)
@@ -184,7 +184,7 @@ func main() {
for range ch {
count++
}
- println("hybrid buffered channel recieve:", count)
+ println("hybrid buffered channel receive:", count)
// test blocking selects
ch = make(chan int)
diff --git a/testdata/channel.txt b/testdata/channel.txt
index 883a547a6..bd3a4419d 100644
--- a/testdata/channel.txt
+++ b/testdata/channel.txt
@@ -26,10 +26,10 @@ select n from chan: 55
select n from closed chan: 0
select send
sum: 235
-non-concurrent channel recieve: 1
-non-concurrent channel recieve: 2
-closed buffered channel recieve: 3
-closed buffered channel recieve: 4
-closed buffered channel recieve: 0
-hybrid buffered channel recieve: 2
+non-concurrent channel receive: 1
+non-concurrent channel receive: 2
+closed buffered channel receive: 3
+closed buffered channel receive: 4
+closed buffered channel receive: 0
+hybrid buffered channel receive: 2
blocking select sum: 3