all: fix spelling mistakes
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Change-Id: I91873aaebf79bdf1c00d38aacc1a1fb8d79656a7
Reviewed-on: https://go-review.googlesource.com/21433
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
diff --git a/src/cmd/compile/internal/gc/cgen.go b/src/cmd/compile/internal/gc/cgen.go
index a190440..4b2bf45 100644
--- a/src/cmd/compile/internal/gc/cgen.go
+++ b/src/cmd/compile/internal/gc/cgen.go
@@ -116,7 +116,7 @@
return
}
- f := true // gen thru register
+ f := true // gen through register
switch n.Op {
case OLITERAL:
if Smallintconst(n) {
diff --git a/src/cmd/compile/internal/gc/const.go b/src/cmd/compile/internal/gc/const.go
index 95dc898..5c9a67c 100644
--- a/src/cmd/compile/internal/gc/const.go
+++ b/src/cmd/compile/internal/gc/const.go
@@ -10,7 +10,7 @@
"strings"
)
-// IntLiteral returns the Node's literal value as an interger.
+// IntLiteral returns the Node's literal value as an integer.
func (n *Node) IntLiteral() (x int64, ok bool) {
switch {
case n == nil:
diff --git a/src/cmd/compile/internal/gc/ssa.go b/src/cmd/compile/internal/gc/ssa.go
index 6fb6c39..bfac175 100644
--- a/src/cmd/compile/internal/gc/ssa.go
+++ b/src/cmd/compile/internal/gc/ssa.go
@@ -4128,7 +4128,7 @@
}
panic(fmt.Sprintf("can't find field in expr %s\n", n))
- // TODO: keep the result of this fucntion somewhere in the ODOT Node
+ // TODO: keep the result of this function somewhere in the ODOT Node
// so we don't have to recompute it each time we need it.
}
diff --git a/src/cmd/compile/internal/gc/swt.go b/src/cmd/compile/internal/gc/swt.go
index cbf284c..3b08b13 100644
--- a/src/cmd/compile/internal/gc/swt.go
+++ b/src/cmd/compile/internal/gc/swt.go
@@ -389,7 +389,7 @@
}
stat = append(stat, n.Nbody.Slice()...)
- // botch - shouldn't fall thru declaration
+ // botch - shouldn't fall through declaration
last := stat[len(stat)-1]
if last.Xoffset == n.Xoffset && last.Op == OXFALL {
if typeswvar != nil {
diff --git a/src/cmd/compile/internal/gc/walk.go b/src/cmd/compile/internal/gc/walk.go
index 77e6c4e..b7edae5 100644
--- a/src/cmd/compile/internal/gc/walk.go
+++ b/src/cmd/compile/internal/gc/walk.go
@@ -1825,7 +1825,7 @@
// special case --
// only if we are assigning a single ddd
// argument to a ddd parameter then it is
- // passed thru unencapsulated
+ // passed through unencapsulated
if r != nil && len(lr) <= 1 && isddd && Eqtype(l.Type, r.Type) {
a := Nod(OAS, nodarg(l, fp), r)
a = convas(a, init)