return in.text
}
-// hash processes a # preprocessor directive. It returns true iff it completes.
+// hash processes a # preprocessor directive. It reports whether it completes.
func (in *Input) hash() bool {
// We have a '#'; it must be followed by a known word (define, include, etc.).
tok := in.Stack.Next()
lineno = lno
}
-// hasemptycvars returns true iff closure clo has an
+// hasemptycvars reports whether closure clo has an
// empty list of captured vars.
func hasemptycvars(clo *Node) bool {
xfunc := clo.Func.Closure
head, tail int
}
-// empty returns true if q contains no Nodes.
+// empty reports whether q contains no Nodes.
func (q *nodeQueue) empty() bool {
return q.head == q.tail
}
// Logf logs a message from the compiler.
Logf(string, ...interface{})
- // Log returns true if logging is not a no-op
+ // Log reports whether logging is not a no-op
// some logging calls account for more than a few heap allocations.
Log() bool
}
}
-// canMerge returns true if the location description for new is the same as
+// canMerge reports whether the location description for new is the same as
// pending.
func canMerge(pending, new VarLoc) bool {
if pending.absent() && new.absent() {
f.cachedLoopnest = nil
}
-// DebugHashMatch returns true if environment variable evname
+// DebugHashMatch reports whether environment variable evname
// 1) is empty (this is a special more-quickly implemented case of 3)
// 2) is "y" or "Y"
// 3) is a suffix of the sha1 hash of name
{name: "AtomicAdd64", argLength: 3, typ: "(UInt64,Mem)", hasSideEffects: true}, // Do *arg0 += arg1. arg2=memory. Returns sum and new memory.
{name: "AtomicCompareAndSwap32", argLength: 4, typ: "(Bool,Mem)", hasSideEffects: true}, // if *arg0==arg1, then set *arg0=arg2. Returns true if store happens and new memory.
{name: "AtomicCompareAndSwap64", argLength: 4, typ: "(Bool,Mem)", hasSideEffects: true}, // if *arg0==arg1, then set *arg0=arg2. Returns true if store happens and new memory.
- {name: "AtomicCompareAndSwapRel32", argLength: 4, typ: "(Bool,Mem)", hasSideEffects: true}, // if *arg0==arg1, then set *arg0=arg2. Lock release, returns true if store happens and new memory.
+ {name: "AtomicCompareAndSwapRel32", argLength: 4, typ: "(Bool,Mem)", hasSideEffects: true}, // if *arg0==arg1, then set *arg0=arg2. Lock release, reports whether store happens and new memory.
{name: "AtomicAnd8", argLength: 3, typ: "Mem", hasSideEffects: true}, // *arg0 &= arg1. arg2=memory. Returns memory.
{name: "AtomicOr8", argLength: 3, typ: "Mem", hasSideEffects: true}, // *arg0 |= arg1. arg2=memory. Returns memory.
// This program generates Go code that applies rewrite rules to a Value.
// The generated code implements a function of type func (v *Value) bool
-// which returns true iff if did something.
+// which reports whether if did something.
// Ideas stolen from Swift: http://www.hpl.hp.com/techreports/Compaq-DEC/WRL-2000-2.html
package main
}
}
-// genMatch returns true if the match can fail.
+// genMatch reports whether the match can fail.
func genMatch(w io.Writer, arch arch, match string, loc string) bool {
return genMatch0(w, arch, match, "v", map[string]struct{}{}, true, loc)
}
return r
}
-// isBlock returns true if this op is a block opcode.
+// isBlock reports whether this op is a block opcode.
func isBlock(name string, arch arch) bool {
for _, b := range genericBlocks {
if b.name == name {
}
}
-// unbalanced returns true if there aren't the same number of ( and ) in the string.
+// unbalanced reports whether there aren't the same number of ( and ) in the string.
func unbalanced(s string) bool {
var left, right int
for _, c := range s {
return nil
}
-// Ordered returns true if n1<n2. It returns false either when it is
+// Ordered reports whether n1<n2. It returns false either when it is
// certain that n1<n2 is false, or if there is not enough information
// to tell.
// Complexity is O(n).
return i1 != i2 && po.dominates(i1, i2, true)
}
-// Ordered returns true if n1<=n2. It returns false either when it is
+// Ordered reports whether n1<=n2. It returns false either when it is
// certain that n1<=n2 is false, or if there is not enough information
// to tell.
// Complexity is O(n).
(po.dominates(i2, i1, false) && !po.dominates(i2, i1, true))
}
-// Equal returns true if n1==n2. It returns false either when it is
+// Equal reports whether n1==n2. It returns false either when it is
// certain that n1==n2 is false, or if there is not enough information
// to tell.
// Complexity is O(1).
return f1 && f2 && i1 == i2
}
-// NonEqual returns true if n1!=n2. It returns false either when it is
+// NonEqual reports whether n1!=n2. It returns false either when it is
// certain that n1!=n2 is false, or if there is not enough information
// to tell.
// Complexity is O(n) (because it internally calls Ordered to see if we
return math.Float64frombits(uint64(i))
}
-// uaddOvf returns true if unsigned a+b would overflow.
+// uaddOvf reports whether unsigned a+b would overflow.
func uaddOvf(a, b int64) bool {
return uint64(a)+uint64(b) < uint64(a)
}
}
}
-// emptyBlock returns true if the block does not contain actual
+// emptyBlock reports whether the block does not contain actual
// instructions
func emptyBlock(b *Block) bool {
for _, v := range b.Values {
return true
}
-// trimmableBlock returns true if the block can be trimmed from the CFG,
+// trimmableBlock reports whether the block can be trimmed from the CFG,
// subject to the following criteria:
// - it should not be the first block
// - it should be BlockPlain
}
// renameTop renames all references to the top-level name old.
-// It returns true if it makes any changes.
+// It reports whether it makes any changes.
func renameTop(f *ast.File, old, new string) bool {
var fixed bool
}
}
-// HasChildren returns true if 'die' uses an abbrev that supports children.
+// HasChildren reports whether 'die' uses an abbrev that supports children.
func HasChildren(die *DWDie) bool {
return abbrevs[die.Abbrev].children != 0
}
return overlapping
}
-// overlappingInstant returns true if the instantaneous event, ev, occurred during
+// overlappingInstant reports whether the instantaneous event, ev, occurred during
// any of the task's region if ev is a goroutine-local event, or overlaps with the
// task's lifetime if ev is a global event.
func (task *taskDesc) overlappingInstant(ev *trace.Event) bool {
return pkgpath, name, kind
}
-// isStringer returns true if the provided declaration is a "String() string"
+// isStringer reports whether the provided declaration is a "String() string"
// method, an implementation of fmt.Stringer.
func isStringer(f *File, d *ast.FuncDecl) bool {
return d.Recv != nil && d.Name.Name == "String" && d.Type.Results != nil &&
return
}
-// isValidIPMask returns true iff mask consists of zero or more 1 bits, followed by zero bits.
+// isValidIPMask reports whether mask consists of zero or more 1 bits, followed by zero bits.
func isValidIPMask(mask []byte) bool {
seenZero := false
return false, true
}
-// NextResultSet prepares the next result set for reading. It returns true if
+// NextResultSet prepares the next result set for reading. It reports whether
// there is further result sets, or false if there is no further result set
// or if there is an error advancing to it. The Err method should be consulted
// to distinguish between the two cases.
bigIntType = reflect.TypeOf(new(big.Int))
)
-// invalidLength returns true iff offset + length > sliceLength, or if the
+// invalidLength reports whether offset + length > sliceLength, or if the
// addition would overflow.
func invalidLength(offset, length, sliceLength int) bool {
return offset+length < offset || offset+length > sliceLength
// than starting at the first line break).
//
func (p *printer) indentList(list []ast.Expr) bool {
- // Heuristic: indentList returns true if there are more than one multi-
+ // Heuristic: indentList reports whether there are more than one multi-
// line element in the list, or if there is any element that is not
// starting on the same line as the previous one ends.
if len(list) >= 2 {
)
// builtin type-checks a call to the built-in specified by id and
-// returns true if the call is valid, with *x holding the result;
+// reports whether the call is valid, with *x holding the result;
// but x.expr is not set. If the call is invalid, the result is
// false, and *x is undefined.
//
func (s *Scope) Pos() token.Pos { return s.pos }
func (s *Scope) End() token.Pos { return s.end }
-// Contains returns true if pos is within the scope's extent.
+// Contains reports whether pos is within the scope's extent.
// The result is guaranteed to be valid only if the type-checked
// AST has complete position information.
func (s *Scope) Contains(pos token.Pos) bool {
// The methods are ordered by their unique Id.
func (t *Interface) Method(i int) *Func { return t.allMethods[i] }
-// Empty returns true if t is the empty interface.
+// Empty reports whether t is the empty interface.
func (t *Interface) Empty() bool { return len(t.allMethods) == 0 }
// Complete computes the interface's method set. It must be called by users of
return false
}
-// isJSType returns true if the given MIME type should be considered JavaScript.
+// isJSType reports whether the given MIME type should be considered JavaScript.
//
// It is used to determine whether a script tag with a type attribute is a javascript container.
func isJSType(mimeType string) bool {
}
// processURLOnto appends a normalized URL corresponding to its input to b
-// and returns true if the appended content differs from s.
+// and reports whether the appended content differs from s.
func processURLOnto(s string, norm bool, b *bytes.Buffer) bool {
b.Grow(len(s) + 16)
written := 0
return err != nil && stringsHasSuffix(err.Error(), "interrupted")
}
-// IsPollDescriptor returns true if fd is the descriptor being used by the poller.
+// IsPollDescriptor reports whether fd is the descriptor being used by the poller.
// This is only used for testing.
func IsPollDescriptor(fd uintptr) bool {
return false
return nil
}
-// IsPollDescriptor returns true if fd is the descriptor being used by the poller.
+// IsPollDescriptor reports whether fd is the descriptor being used by the poller.
// This is only used for testing.
func IsPollDescriptor(fd uintptr) bool {
return false
return nil
}
-// IsPollDescriptor returns true if fd is the descriptor being used by the poller.
+// IsPollDescriptor reports whether fd is the descriptor being used by the poller.
// This is only used for testing.
func IsPollDescriptor(fd uintptr) bool {
return runtime_isPollServerDescriptor(fd)
return z
}
-// Signbit returns true if x is negative or negative zero.
+// Signbit reports whether x is negative or negative zero.
func (x *Float) Signbit() bool {
return x.neg
}
import "math"
-// IsInf returns true if either real(x) or imag(x) is an infinity.
+// IsInf reports whether either real(x) or imag(x) is an infinity.
func IsInf(x complex128) bool {
if math.IsInf(real(x), 0) || math.IsInf(imag(x), 0) {
return true
import "math"
-// IsNaN returns true if either real(x) or imag(x) is NaN
+// IsNaN reports whether either real(x) or imag(x) is NaN
// and neither is an infinity.
func IsNaN(x complex128) bool {
switch {
package math
-// Signbit returns true if x is negative or negative zero.
+// Signbit reports whether x is negative or negative zero.
func Signbit(x float64) bool {
return Float64bits(x)&(1<<63) != 0
}
"unsafe"
)
-// isNulName returns true if name is NUL file name.
+// isNulName reports whether name is NUL file name.
// For example, it returns true for both "NUL" and "nul".
func isNulName(name string) bool {
if len(name) != 3 {
}
}
-// contains returns true if vector contains the string s.
+// contains reports whether vector contains the string s.
func contains(vector []string, s string) bool {
for _, elem := range vector {
if elem == s {
m [32]method
}
-// isLetter returns true if a given 'rune' is classified as a Letter.
+// isLetter reports whether a given 'rune' is classified as a Letter.
func isLetter(ch rune) bool {
return 'a' <= ch && ch <= 'z' || 'A' <= ch && ch <= 'Z' || ch == '_' || ch >= utf8.RuneSelf && unicode.IsLetter(ch)
}
const opPseudo Op = 128 // where pseudo-ops start
-// Equal returns true if x and y have identical structure.
+// Equal reports whether x and y have identical structure.
func (x *Regexp) Equal(y *Regexp) bool {
if x == nil || y == nil {
return x == y
return uint32(*h.bitp) >> (h.shift & 31)
}
-// morePointers returns true if this word and all remaining words in this object
+// morePointers reports whether this word and all remaining words in this object
// are scalars.
// h must not describe the second word of the object.
func (h heapBits) morePointers() bool {
// and, based on the number of free objects in s,
// moves s to the appropriate list of c or returns it
// to the heap.
-// freeSpan returns true if s was returned to the heap.
+// freeSpan reports whether s was returned to the heap.
// If preserve=true, it does not move s (the caller
// must take care of it).
func (c *mcentral) freeSpan(s *mspan, preserve bool, wasempty bool) bool {
return gp
}
-// pollFractionalWorkerExit returns true if a fractional mark worker
+// pollFractionalWorkerExit reports whether a fractional mark worker
// should self-preempt. It assumes it is called from the fractional
// worker.
func pollFractionalWorkerExit() bool {
gcTriggerCycle
)
-// test returns true if the trigger condition is satisfied, meaning
+// test reports whether the trigger condition is satisfied, meaning
// that the exit condition for the _GCoff phase has been met. The exit
// condition should be tested when allocating.
func (t gcTrigger) test() bool {
}
}
-// gcMarkWorkAvailable returns true if executing a mark worker
+// gcMarkWorkAvailable reports whether executing a mark worker
// on p is potentially useful. p may be nil, in which case it only
// checks the global sources of work.
func gcMarkWorkAvailable(p *p) bool {
}
}
-// putFast does a put and returns true if it can be done quickly
+// putFast does a put and reports whether it can be done quickly
// otherwise it returns false and the caller needs to call put.
//go:nowritebarrierrec
func (w *gcWork) putFast(obj uintptr) bool {
}
}
-// empty returns true if w has no mark work available.
+// empty reports whether w has no mark work available.
//go:nowritebarrierrec
func (w *gcWork) empty() bool {
return w.wbuf1 == nil || (w.wbuf1.nobj == 0 && w.wbuf2.nobj == 0)
b.next = uintptr(unsafe.Pointer(&b.buf[0]))
}
-// empty returns true if b contains no pointers.
+// empty reports whether b contains no pointers.
func (b *wbBuf) empty() bool {
return b.next == uintptr(unsafe.Pointer(&b.buf[0]))
}
//go:linkname poll_runtime_isPollServerDescriptor internal/poll.runtime_isPollServerDescriptor
-// poll_runtime_isPollServerDescriptor returns true if fd is a
+// poll_runtime_isPollServerDescriptor reports whether fd is a
// descriptor being used by netpoll.
func poll_runtime_isPollServerDescriptor(fd uintptr) bool {
fds := netpolldescriptor()
return true
}
-// shouldPushSigpanic returns true if pc should be used as sigpanic's
+// shouldPushSigpanic reports whether pc should be used as sigpanic's
// return PC (pushing a frame for the call). Otherwise, it should be
// left alone so that LR is used as sigpanic's return PC, effectively
// replacing the top-most frame with sigpanic. This is used by
return true
}
-// isAbortPC returns true if pc is the program counter at which
+// isAbortPC reports whether pc is the program counter at which
// runtime.abort raises a signal.
//
// It is nosplit because it's part of the isgoexception
return nil
}
-// Empty returns true if the profile contains no samples.
+// Empty reports whether the profile contains no samples.
func (p *Profile) Empty() bool {
return len(p.Sample) == 0
}
goto top
}
-// pollWork returns true if there is non-background work this P could
+// pollWork reports whether there is non-background work this P could
// be doing. This is a fairly lightweight check to be used for
// background work loops, like idle GC. It checks a subset of the
// conditions checked by the actual scheduler.
return _p_
}
-// runqempty returns true if _p_ has no Gs on its local run queue.
+// runqempty reports whether _p_ has no Gs on its local run queue.
// It never returns true spuriously.
func runqempty(_p_ *p) bool {
// Defend against a race where 1) _p_ has G1 in runqnext but runqhead == runqtail,
tail guintptr
}
-// empty returns true if q is empty.
+// empty reports whether q is empty.
func (q *gQueue) empty() bool {
return q.head == 0
}
head guintptr
}
-// empty returns true if l is empty.
+// empty reports whether l is empty.
func (l *gList) empty() bool {
return l.head == 0
}
}
}
-// isgoexception returns true if this exception should be translated
+// isgoexception reports whether this exception should be translated
// into a Go panic.
//
// It is nosplit to avoid growing the stack in case we're aborting
}
// Active spinning runtime support.
-// runtime_canSpin returns true if spinning makes sense at the moment.
+// runtime_canSpin reports whether spinning makes sense at the moment.
func runtime_canSpin(i int) bool
// runtime_doSpin does active spinning.
return nil
}
-// IsStdRepo returns true if src is part of standard library.
+// IsStdRepo reports whether src is part of standard library.
func (src *Source) IsStdRepo() (bool, error) {
if len(src.Files) == 0 {
return false, errors.New("no input files provided")