diff options
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 |