// The readOp constants describe the last action performed on
// the buffer, so that UnreadRune and UnreadByte can check for
-// invalid usage. opReadRuneX constants are choosen such that
+// invalid usage. opReadRuneX constants are chosen such that
// converted to int they correspond to the rune size that was read.
type readOp int
Fatalf("invalid symbol name: %s", name)
}
- // Functions that can be inlined use numbered parameters so we can distingish them
+ // Functions that can be inlined use numbered parameters so we can distinguish them
// from other names in their context after inlining (i.e., the parameter numbering
// is a form of parameter rewriting). See issue 4326 for an example and test case.
if forceObjFileStability || numbered {
return -1
}
-// stataddr sets nam to the static address of n and reports whether it succeeeded.
+// stataddr sets nam to the static address of n and reports whether it succeeded.
func stataddr(nam *Node, n *Node) bool {
if n == nil {
return false
return t.Extra.(*FuncType)
}
-// InterMethType contains Type fields specific to interface method psuedo-types.
+// InterMethType contains Type fields specific to interface method pseudo-types.
type InterMethType struct {
Nname *Node
}
// checkbce prints all bounds checks that are present in the function.
// Useful to find regressions. checkbce is only activated when with
-// corresponsing debug options, so it's off by default.
+// corresponding debug options, so it's off by default.
// See test/checkbce.go
func checkbce(f *Func) {
if f.pass.debug <= 0 {
// Warnl writes compiler messages in the form expected by "errorcheck" tests
Warnl(line int32, fmt_ string, args ...interface{})
- // Fowards the Debug flags from gc
+ // Forwards the Debug flags from gc
Debug_checknil() bool
Debug_wb() bool
}
// - Integer types live in the low portion of registers. Upper portions are junk.
// - Boolean types use the low-order byte of a register. 0=false, 1=true.
// Upper bytes are junk.
-// - *const instructions may use a constant larger than the instuction can encode.
+// - *const instructions may use a constant larger than the instruction can encode.
// In this case the assembler expands to multiple instructions and uses tmp
// register (R27).
// - Integer types live in the low portion of registers. Upper portions are junk.
// - Boolean types use the low-order byte of a register. 0=false, 1=true.
// Upper bytes are junk.
-// - *const instructions may use a constant larger than the instuction can encode.
+// - *const instructions may use a constant larger than the instruction can encode.
// In this case the assembler expands to multiple instructions and uses tmp
// register (R11).
// - Integer types live in the low portion of registers. Upper portions are junk.
// - Boolean types use the low-order byte of a register. 0=false, 1=true.
// Upper bytes are junk.
-// - *const instructions may use a constant larger than the instuction can encode.
+// - *const instructions may use a constant larger than the instruction can encode.
// In this case the assembler expands to multiple instructions and uses tmp
// register (R23).
// - Boolean types use the low-order byte of a register. 0=false, 1=true.
// Upper bytes are junk.
// - Unused portions of AuxInt are filled by sign-extending the used portion.
-// - *const instructions may use a constant larger than the instuction can encode.
+// - *const instructions may use a constant larger than the instruction can encode.
// In this case the assembler expands to multiple instructions and uses tmp
// register (R23).
// - Less-than-64-bit integer types live in the low portion of registers.
// For now, the upper portion is junk; sign/zero-extension might be optimized in the future, but not yet.
// - Boolean types are zero or 1; stored in a byte, but loaded with AMOVBZ so the upper bytes of a register are zero.
-// - *const instructions may use a constant larger than the instuction can encode.
+// - *const instructions may use a constant larger than the instruction can encode.
// In this case the assembler expands to multiple instructions and uses tmp
// register (R31).
name string
reg regInfo
auxType auxType
- argLen int32 // the number of arugments, -1 if variable length
+ argLen int32 // the number of arguments, -1 if variable length
asm obj.As
generic bool // this is a generic (arch-independent) opcode
rematerializeable bool // this op is rematerializeable
liveSet.add(e.ID)
}
if v := b.Control; v != nil && s.values[v.ID].needReg {
- s.addUse(v.ID, int32(len(b.Values)), b.Line) // psuedo-use by control value
+ s.addUse(v.ID, int32(len(b.Values)), b.Line) // pseudo-use by control value
liveSet.add(v.ID)
}
for i := len(b.Values) - 1; i >= 0; i-- {
}
// The driver is at the end of the current result set.
// Test to see if there is another result set after the current one.
- // Only close Rows if there is no futher result sets to read.
+ // Only close Rows if there is no further result sets to read.
if !nextResultSet.HasNextResultSet() {
rs.Close()
}
return path[i+1:] == ".."
}
-// toNorm returns the normalized path that is guranteed to be unique.
+// toNorm returns the normalized path that is guaranteed to be unique.
// It should accept the following formats:
// * UNC paths (e.g \\server\share\foo\bar)
// * absolute paths (e.g C:\foo\bar)
// fastlog2 implements a fast approximation to the base 2 log of a
// float64. This is used to compute a geometric distribution for heap
-// sampling, without introducing dependences into package math. This
+// sampling, without introducing dependencies into package math. This
// uses a very rough approximation using the float64 exponent and the
// first 25 bits of the mantissa. The top 5 bits of the mantissa are
// used to load limits from a table of constants and the rest are used
}
// float64bits returns the IEEE 754 binary representation of f.
-// Taken from math.Float64bits to avoid dependences into package math.
+// Taken from math.Float64bits to avoid dependencies into package math.
func float64bits(f float64) uint64 { return *(*uint64)(unsafe.Pointer(&f)) }
want := strings.TrimSpace(tc.output)
re := makeRegexp(want)
if ok, err := regexp.MatchString(re, got); !ok || err != nil {
- t.Errorf("%s:ouput:\ngot:\n%s\nwant:\n%s", tc.desc, got, want)
+ t.Errorf("%s:output:\ngot:\n%s\nwant:\n%s", tc.desc, got, want)
}
}
}
want := strings.TrimSpace(tc.output)
re := makeRegexp(want)
if ok, err := regexp.MatchString(re, got); !ok || err != nil {
- t.Errorf("%s:ouput:\ngot:\n%s\nwant:\n%s", tc.desc, got, want)
+ t.Errorf("%s:output:\ngot:\n%s\nwant:\n%s", tc.desc, got, want)
}
}
}