type testfType func(x ir.Node, param *ir.Name, idx int) (bool, bool)
-// paramsAnalyzer invokes function 'testf' on the specified expression
-// 'x' for each parameter, and if the result is TRUE, or's 'flag' into
-// the flags for that param.
+// checkParams invokes function 'testf' on the specified expression 'x'
+// for each parameter. If the result is TRUE, it OR's either 'flag' or 'mayflag'
+// into the flags for that param, depending on whether we are in a conditional context.
func (pa *paramsAnalyzer) checkParams(x ir.Node, flag ParamPropBits, mayflag ParamPropBits, testf testfType) {
for idx, p := range pa.params {
if !pa.top[idx] && pa.values[idx] == ParamNoInfo {
}
}
-// overflowConstShift_ssa verifies that constant folding for shift
+// overflowConstShift64_ssa verifies that constant folding for shift
// doesn't wrap (i.e. x << MAX_INT << 1 doesn't get folded to x << 0).
//
//go:noinline
// These have to be global to avoid getting constant-folded in the function body:
// as locals, prove can see that they are actually constants.
sixU, nineteenU uint64 = 6, 19
- sixS, nineteenS int64 = 6, 19
+ sixS, nineteenS int64 = 6, 19
)
// testDivisibility confirms that rewrite rules x%c ==0 for c constant are correct.
return t.internalLinkPIE() && t.extLink()
}
-// supportedBuildMode reports whether the given build mode is supported.
+// supportedBuildmode reports whether the given build mode is supported.
func (t *tester) supportedBuildmode(mode string) bool {
switch mode {
case "c-archive", "c-shared", "shared", "plugin", "pie":
}
}
-// funcsDoc prints all type documentation, if any, including a header.
+// typesDoc prints all type documentation, if any, including a header.
func (pkg *Package) typesDoc() {
var header bool
for _, typ := range pkg.doc.Types {
"_X": "Y",
}
-// TestGenerateCommandShortHand - similar to TestGenerateCommandParse,
+// TestGenerateCommandShorthand - similar to TestGenerateCommandParse,
// except:
// 1. if the result starts with -command, record that shorthand
// before moving on to the next test.
return f.Close()
}
-// machofips updates go:fipsinfo after external linking
+// elffips updates go:fipsinfo after external linking
// on systems using ELF (most Unix systems).
func elffips(ctxt *Link, exe, fipso string) error {
// Open executable both for reading ELF and for the fipsObj.
"testing"
)
-// dummyAddSym adds the named symbol to the loader as if it had been
+// addDummyObjSym adds the named symbol to the loader as if it had been
// read from a Go object file. Note that it allocates a global
// index without creating an associated object reader, so one can't
// do anything interesting with this symbol (such as look at its