diff options
author | dkegel-fastly <[email protected]> | 2024-08-12 14:24:38 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2024-08-12 14:24:38 -0700 |
commit | 8135be4e908d0744c46399aac9d9fc3aa4a17e55 (patch) | |
tree | cf5ef0bcc9ee5dc935aeb26a29f056dc3d6217c9 /compiler | |
parent | 835e73237e7413b5b71a5fe04f642b1768778c66 (diff) | |
download | tinygo-8135be4e908d0744c46399aac9d9fc3aa4a17e55.tar.gz tinygo-8135be4e908d0744c46399aac9d9fc3aa4a17e55.zip |
GNUmakefile: add spellfix target, use it. (#4387)
TODO: Remove the go.mod/go.sum in internal/tools once doing so doesn't break CI (e.g. once we drop support for go 1.19)
* builder/cc1as.h: fix typo found by 'make spell'
* GNUmakefile: remove exception for inbetween, fix instance now found by 'make spell'
* GNUmakefile: remove exception for programmmer, fix instance now found by 'make spell'
* go.mod: use updated misspell. GNUmakefile: add spellfix target, use it.
* ignore directories properly when invoking spellchecker.
* make spell: give internal/tools its own go.mod, as misspell requires newer go
* make lint: depend on tools and run the installed revive
(which was perhaps implied by the change that added revive to internal/tools,
but not required in GNUmakefile until we gave internal/tools its own temporary go.mod)
* .github: now that 'make spell' works well, run it from CI
* GNUmakefile: make spell now aborts if it finds misspelt words, so what it finds doesn't get lost in CI logs
* GNUmakefile: tools: avoid -C option on go generate to make test-llvm15-go119 circleci job happy, see
https://cs.opensource.google/go/go/+/2af48cbb7d85e5fdc635e75b99f949010c607786
* internal/tools/go.mod: fix format of go version to leave out patchlevel, else go complains.
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/asserts.go | 2 | ||||
-rw-r--r-- | compiler/compiler.go | 2 | ||||
-rw-r--r-- | compiler/gc.go | 2 | ||||
-rw-r--r-- | compiler/interface.go | 2 | ||||
-rw-r--r-- | compiler/llvm.go | 2 | ||||
-rw-r--r-- | compiler/llvmutil/llvm.go | 2 | ||||
-rw-r--r-- | compiler/map.go | 2 | ||||
-rw-r--r-- | compiler/syscall.go | 2 |
8 files changed, 8 insertions, 8 deletions
diff --git a/compiler/asserts.go b/compiler/asserts.go index 035fda616..f07b73bc2 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 e9697fae2..bc17250d9 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 9d568a174..fc0e6e687 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 fc698c7a9..dffaeec0a 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 bdbf0ece1..59aaee8fd 100644 --- a/compiler/llvm.go +++ b/compiler/llvm.go @@ -419,7 +419,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/llvmutil/llvm.go b/compiler/llvmutil/llvm.go index 48fddffbe..607e91e8d 100644 --- a/compiler/llvmutil/llvm.go +++ b/compiler/llvmutil/llvm.go @@ -207,7 +207,7 @@ func AppendToGlobal(mod llvm.Module, globalName string, values ...llvm.Value) { used.SetLinkage(llvm.AppendingLinkage) } -// Return the LLVM major version. +// Version returns the LLVM major version. func Version() int { majorStr := strings.Split(llvm.Version, ".")[0] major, err := strconv.Atoi(majorStr) diff --git a/compiler/map.go b/compiler/map.go index 1c124c2b2..b4c526723 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/compiler/syscall.go b/compiler/syscall.go index d9d21c3cf..d878df027 100644 --- a/compiler/syscall.go +++ b/compiler/syscall.go @@ -145,7 +145,7 @@ func (b *builder) createRawSyscall(call *ssa.CallCommon) (llvm.Value, error) { // Also useful: // https://web.archive.org/web/20220529105937/https://www.linux-mips.org/wiki/Syscall // The syscall number goes in r2, the result also in r2. - // Register r7 is both an input paramter and an output parameter: if it + // Register r7 is both an input parameter and an output parameter: if it // is non-zero, the system call failed and r2 is the error code. // The code below implements the O32 syscall ABI, not the N32 ABI. It // could implement both at the same time if needed (like what appears to |