libgo: update to Go1.16beta1 release

This does not yet include support for the //go:embed directive added
in this release.

	* Makefile.am (check-runtime): Don't create check-runtime-dir.
	(mostlyclean-local): Don't remove check-runtime-dir.
	(check-go-tool, check-vet): Copy in go.mod and modules.txt.
	(check-cgo-test, check-carchive-test): Add go.mod file.
	* Makefile.in: Regenerate.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/280172
This commit is contained in:
Ian Lance Taylor 2020-12-23 09:57:37 -08:00
parent 0696141107
commit cfcbb4227f
1189 changed files with 67672 additions and 31085 deletions

View file

@ -70,3 +70,34 @@ func TestTBHelperParallel(t *T) {
t.Errorf("got output line %q; want %q", got, want)
}
}
type noopWriter int
func (nw *noopWriter) Write(b []byte) (int, error) { return len(b), nil }
func BenchmarkTBHelper(b *B) {
w := noopWriter(0)
ctx := newTestContext(1, newMatcher(regexp.MatchString, "", ""))
t1 := &T{
common: common{
signal: make(chan bool),
w: &w,
},
context: ctx,
}
f1 := func() {
t1.Helper()
}
f2 := func() {
t1.Helper()
}
b.ResetTimer()
b.ReportAllocs()
for i := 0; i < b.N; i++ {
if i&1 == 0 {
f1()
} else {
f2()
}
}
}