return
}
- // If typ *has* a shape type, then it's an shaped, instantiated
+ // If typ *has* a shape type, then it's a shaped, instantiated
// type like T[go.shape.int], and its methods (may) have an extra
// dictionary parameter. We could devirtualize this call if we
// could derive an appropriate dictionary argument.
// e.value(k, n.Left)
// }
-// An location represents an abstract location that stores a Go
+// A location represents an abstract location that stores a Go
// variable.
type location struct {
n ir.Node // represented variable or expression, if any
return n
}
-// A StructKeyExpr is an Field: Value composite literal key.
+// A StructKeyExpr is a Field: Value composite literal key.
type StructKeyExpr struct {
miniExpr
Field *types.Field
return c&(c-1) != 0
}
-// smagicOKn reports whether we should strength reduce an signed n-bit divide by c.
+// smagicOKn reports whether we should strength reduce a signed n-bit divide by c.
func smagicOK8(c int8) bool { return smagicOK(8, int64(c)) }
func smagicOK16(c int16) bool { return smagicOK(16, int64(c)) }
func smagicOK32(c int32) bool { return smagicOK(32, int64(c)) }
}
// applyTypeFunc applies f to x. If x is a type parameter,
-// the result is a type parameter constrained by an new
+// the result is a type parameter constrained by a new
// interface bound. The type bounds for that interface
// are computed by applying f to each of the type bounds
// of x. If any of these applications of f return nil,
return walkExpr(cfn, init)
}
-// closureArgs returns a slice of expressions that an be used to
+// closureArgs returns a slice of expressions that can be used to
// initialize the given closure's free variables. These correspond
// one-to-one with the variables in clo.Func.ClosureVars, and will be
// either an ONAME node (if the variable is captured by value) or an
// NOP
//
// The NOP is needed to give the jumps somewhere to land.
- // It is a liblink NOP, not an hardware NOP: it encodes to 0 instruction bytes.
+ // It is a liblink NOP, not a hardware NOP: it encodes to 0 instruction bytes.
//
// We don't generate this for leafs because that means the wrapped
// function was inlined into the wrapper.
return l.attrExternal.Has(l.extIndex(i))
}
-// SetAttrExternal sets the "external" property for an host object
+// SetAttrExternal sets the "external" property for a host object
// symbol (see AttrExternal).
func (l *Loader) SetAttrExternal(i Sym, v bool) {
if !l.IsExternal(i) {
}
// applyTypeFunc applies f to x. If x is a type parameter,
-// the result is a type parameter constrained by an new
+// the result is a type parameter constrained by a new
// interface bound. The type bounds for that interface
// are computed by applying f to each of the type bounds
// of x. If any of these applications of f return nil,
return stringsEqualFold(h, "_gateway")
}
-// isOutbound reports whether h should be considered a "outbound"
+// isOutbound reports whether h should be considered an "outbound"
// name for the myhostname NSS module.
func isOutbound(h string) bool {
return stringsEqualFold(h, "_outbound")
raddr Addr
// The only networking available in WASI preview 1 is the ability to
- // sock_accept on an pre-opened socket, and then fd_read, fd_write,
+ // sock_accept on a pre-opened socket, and then fd_read, fd_write,
// fd_close, and sock_shutdown on the resulting connection. We
// intercept applicable netFD calls on this instance, and then pass
// the remainder of the netFD calls to fakeNetFD.
// TLSNextProto specifies how the Transport switches to an
// alternate protocol (such as HTTP/2) after a TLS ALPN
- // protocol negotiation. If Transport dials an TLS connection
+ // protocol negotiation. If Transport dials a TLS connection
// with a non-empty protocol name and TLSNextProto contains a
// map entry for that key (such as "h2"), then the func is
// called with the request's authority (such as "example.com"
}
if m := fi.Mode(); m&fs.ModeSymlink != 0 {
// This can happen depending on newer WSL versions when running as admin or in developer mode.
- t.Skip("skipping: WSL created reparse tag IO_REPARSE_TAG_SYMLINK instead of a IO_REPARSE_TAG_LX_SYMLINK")
+ t.Skip("skipping: WSL created reparse tag IO_REPARSE_TAG_SYMLINK instead of an IO_REPARSE_TAG_LX_SYMLINK")
}
// Stat'ing a IO_REPARSE_TAG_LX_SYMLINK from outside WSL always return ERROR_CANT_ACCESS_FILE.
// We check this condition to validate that os.Stat has tried to follow the link.
// Converting a slice to non-empty array needs to return
// a non-addressable copy of the original memory.
if v.CanAddr() {
- t.Fatalf("convert slice to non-empty array returns a addressable copy array")
+ t.Fatalf("convert slice to non-empty array returns an addressable copy array")
}
for i := range s {
ov.Index(i).Set(ValueOf(i + 1))
return case_, tab
}
-// buildInterfaceSwitchCache constructs a interface switch cache
+// buildInterfaceSwitchCache constructs an interface switch cache
// containing all the entries from oldC plus the new entry
// (typ,case_,tab).
func buildInterfaceSwitchCache(oldC *abi.InterfaceSwitchCache, typ *_type, case_ int, tab *itab) *abi.InterfaceSwitchCache {
oldLimit := debug.SetMemoryLimit(limit)
defer debug.SetMemoryLimit(oldLimit)
- // Set an GC percent to check the metric for it
+ // Set a GC percent to check the metric for it
gcPercent := 99
oldGCPercent := debug.SetGCPercent(gcPercent)
defer debug.SetGCPercent(oldGCPercent)
return n < max
}
-// removeIdleMarkWorker must be called when an new idle mark worker stops executing.
+// removeIdleMarkWorker must be called when a new idle mark worker stops executing.
func (c *gcControllerState) removeIdleMarkWorker() {
for {
old := c.idleMarkWorkers.Load()
// Ignore wrappers, unless we're at the outermost frame of u.
// A non-inlined wrapper frame always means we have a physical
// frame consisting entirely of wrappers, in which case we'll
- // take a outermost wrapper over nothing.
+ // take an outermost wrapper over nothing.
continue
}
if r < utf8.RuneSelf {
b.WriteByte(byte(r))
} else {
- // r is not a ASCII rune.
+ // r is not an ASCII rune.
b.WriteRune(r)
}
}
m := &sync.Map{}
if m.CompareAndSwap(m, nil, 42) {
// See https://go.dev/issue/51972#issuecomment-1126408637.
- t.Fatalf("CompareAndSwap on an non-existing key succeeded")
+ t.Fatalf("CompareAndSwap on a non-existing key succeeded")
}
}