1
0
mirror of https://github.com/golang/go synced 2024-11-08 04:46:11 -07:00
Commit Graph

54273 Commits

Author SHA1 Message Date
eric fang
dd7ce26abf math: optimize Hypot function
This CL optimizes the Hypot function by putting the Abs function in
front of the IsInf check. This simplifies the judgment of IsInf.

Benchmarks:
On linux/arm64,
name         old time/op  new time/op  delta
Hypot-160    5.26ns ± 0%  4.53ns ± 0%  -13.84%  (p=0.000 n=4+5)
HypotGo-160  5.19ns ± 0%  4.85ns ± 0%   -6.53%  (p=0.008 n=5+5)

On linux/amd64,
name        old time/op  new time/op  delta
Hypot-44    5.99ns ± 0%  5.99ns ± 0%     ~     (p=0.667 n=5+5)
HypotGo-44  7.46ns ± 0%  6.61ns ± 0%  -11.37%  (p=0.008 n=5+5)

On darwin/arm64,
name       old time/op  new time/op  delta
Hypot-8    3.58ns ± 0%  2.79ns ± 0%  -22.01%  (p=0.008 n=5+5)
HypotGo-8  3.58ns ± 0%  2.79ns ± 0%  -22.15%  (p=0.008 n=5+5)

Change-Id: Id79236e01d9494b6e00bbda3ec08c72caf5ef3c1
Reviewed-on: https://go-review.googlesource.com/c/go/+/414974
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Eric Fang <eric.fang@arm.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2022-10-01 01:51:35 +00:00
Bryan C. Mills
9a029a6915 os/exec: make StdoutPipe and StderrPipe safe to Close concurrently
For #50436, I want to be able to close the pipes returned by
StdoutPipe and StderrPipe after the Context has been canceled
and the WaitDelay has subsequently expired.

However, the fact that the exec.onceCloser wrapper for StdinPipe
(added in CL 13329043) was retained in CL 65490 suggests to me that
(*os.File).Close is still not safe to call concurrently.

This may cause type assertions of these ReadClosers to *os.File that
once succeeded to no longer do so. However, the StdoutPipe and
StderrPipe methods return interfaces, not concrete *os.Files, so
callers already should not have been relying on that implementation
detail — and as far as I can tell the closeOnce wrapper does not mask
any (*os.File) methods, so assertions to any interface type that
previously succeeded will continue to do so.

This change is logically part of CL 401835, but since it may expose
fragile type-assertions in callers I want to keep it separate for
clearer bisection of any new test failures.

For #50436.

Change-Id: I58de1d48fb6fd788502f13657d8d4484516271cf
Reviewed-on: https://go-review.googlesource.com/c/go/+/437176
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-10-01 00:21:25 +00:00
Bryan C. Mills
c9a62b7e71 os/exec: recombine goroutinePipes and userPipes
This change undoes CL 401894, because on further consideration
it turns out not to be needed.

This also makes (*Cmd).closeDescriptors a free function, since it does
not actually use the receiver in any way and is not needed to satisfy
any interfaces.

For #50436.

Change-Id: I7915265b0e6398ed5a34fae0c12873ab08a14194
Reviewed-on: https://go-review.googlesource.com/c/go/+/437175
Run-TryBot: Bryan Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Bryan Mills <bcmills@google.com>
2022-10-01 00:12:32 +00:00
Ian Lance Taylor
20da893e83 debug/dwarf: don't crash on negative range/rnglist offset
No test case because the problem can only happen for invalid data. Let
the fuzzer find cases like this.

Fixes #55948

Change-Id: I7ba40ba928d2a14d4ac5b39f966173f3868d4729
Reviewed-on: https://go-review.googlesource.com/c/go/+/436876
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Than McIntosh <thanm@google.com>
2022-10-01 00:07:46 +00:00
Tobias Klauser
cc90e45f1d all: use "unix" build tag where appropriate
Convert a few occurrences that were submitted after CL 389935.

For #20322
For #51572

Change-Id: I0047361916c402f8e37f515e6b09d451bd499e6e
Reviewed-on: https://go-review.googlesource.com/c/go/+/437235
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2022-09-30 23:58:34 +00:00
cui fliter
aeab76f0be encoding: fix a few function names on comments
Change-Id: I17a311afb94a056b3d35bfa241f5d0d206db602d
GitHub-Last-Rev: 42129464c9
GitHub-Pull-Request: golang/go#55962
Reviewed-on: https://go-review.googlesource.com/c/go/+/436882
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Keith Randall <khr@google.com>
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Rob Pike <r@golang.org>
2022-09-30 23:03:07 +00:00
Cuong Manh Le
76c1a501a5 test: enable issue47631.go for Unified IR
Updates #53058

Change-Id: Ieaa500bea11f26f9a039196592bea67405bdf0ad
Reviewed-on: https://go-review.googlesource.com/c/go/+/437215
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-09-30 23:00:20 +00:00
Cuong Manh Le
aeedb5ab13 internal/singleflight: avoid race between multiple Do calls
When the first call to Do finished, it calls c.wg.Done() to signal
others that the call was done. However, that happens without holding
a lock, so if others call to Do complete and be followed by a call to
ForgotUnshared, that then returns false.

Fixing this by moving c.wg.Done() inside the section guarded by g.mu, so
the two operations won't be interrupted.

Thanks bcmills@ for finding and suggesting fix.

Change-Id: I850f5eb3f9751a0aaa65624d4109aeeb59dee42c
Reviewed-on: https://go-review.googlesource.com/c/go/+/436437
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
2022-09-30 20:49:56 +00:00
cuiweixie
1e65fa58c1 encoding/json: return comparison directly
Change-Id: I4698d0fa78108d83ee91732e8d3878dbff7f9c90
Reviewed-on: https://go-review.googlesource.com/c/go/+/436711
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: xie cui <523516579@qq.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Joseph Tsai <joetsai@digital-static.net>
2022-09-30 20:10:56 +00:00
cui fliter
4444f850b7 all: omit comparison bool constant to simplify code
Change-Id: Icd4062e570559f1d0c69d4bdb9e23412054cf2a6
GitHub-Last-Rev: fbbfbcb54d
GitHub-Pull-Request: golang/go#55958
Reviewed-on: https://go-review.googlesource.com/c/go/+/436880
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2022-09-30 20:09:46 +00:00
Cuong Manh Le
826efd7f25 internal/singleflight: fix duplicate deleting key when ForgetUnshared called
A key may be forgotten while the call is still in flight. So when the
call finished, it should only delete the key if that key is associated
with the call. Otherwise, we may remove the wrong newly created call.

Fixes #55343

Change-Id: I4fa72d79cad006e5884e42d885d193641ef84e0a
Reviewed-on: https://go-review.googlesource.com/c/go/+/433315
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
2022-09-30 20:05:46 +00:00
Michael Pratt
8a0cf719a6 cmd/link/internal/ld: panic if inlined functions missing FuncInfo
All inlined functions are Go functions, and thus should be capable of
having a FuncInfo. Missing FuncInfo is likely indication of a compiler
bug that dropped the symbol too early, failing to add it to the symbol
list used for writing output. I believe all existing cases have been
fixed; this check will prevent regressions.

The exception is -linkshared mode. There symbols are loaded from the
shared library, and the FuncInfo is not available. This is a bug, as it
can result in incorrect the FuncID in inlinedCall, but it is very
involved to fix.

For #54959.
For #55954.

Change-Id: Ib0dc4f1ea62525b55f68604d6013ff33223fdcdd
Reviewed-on: https://go-review.googlesource.com/c/go/+/429637
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
2022-09-30 20:05:02 +00:00
Michael Pratt
33738ddd0a cmd/compile: eagerly create LSym for closures
The linker needs FuncInfo metadata for all inlined functions. This is
typically handled by gc.enqueueFunc calling ir.InitLSym for all function
declarations in typecheck.Target.Decls (ir.UseClosure adds all closures
to Decls).

However, non-trivial closures in Decls are ignored, and are insteaded
enqueued when walk of the calling function discovers them.

This presents a problem for direct calls to closures. Inlining will
replace the entire closure definition with its body, which hides the
closure from walk and thus suppresses symbol creation.

Explicitly create a symbol early in this edge case to ensure we keep
this metadata.

InitLSym needs to move out of ssagen to avoid a circular dependency (it
doesn't have anything to do with ssa anyway). There isn't a great place
for it, so I placed it in ir, which seemed least objectionable.

The added test triggers one of these inlined direct non-trivial closure
calls, though the test needs CL 429637 to fail, which adds a FuncInfo
assertion to the linker. Note that the test must use "run" instead of
"compile" since the assertion is in the linker, and "compiler" doesn't
run the linker.

Fixes #54959.

Change-Id: I0bd1db4f3539a78da260934cd968372b7aa92546
Reviewed-on: https://go-review.googlesource.com/c/go/+/436240
Run-TryBot: Michael Pratt <mpratt@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-09-30 20:04:54 +00:00
Michael Pratt
4a49af5755 Revert "runtime: move epoll syscalls to runtime/internal/syscall"
This reverts CL 421994.

Reason for revert: breaks runtime.TestCheckPtr2

For #53824
For #51087

Change-Id: I044ea4d6efdffe0a4b7fb0d2bb3717d9f391fc59
Reviewed-on: https://go-review.googlesource.com/c/go/+/437295
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Michael Pratt <mpratt@google.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
2022-09-30 19:07:13 +00:00
Andrew Pogrebnoy
4e6f963469 runtime: move epoll syscalls to runtime/internal/syscall
This change moves Linux epoll's syscalls implementation to the
"runtime/internal/syscall" package. The intention in this CL was to
minimise behavioural changes but make the code more generalised. This
also will allow adding new syscalls (like epoll_pwait2) without the
need to implement assembly stubs for each arch.

It also drops epoll_create as not all architectures provide this call.
epoll_create1 was added to the kernel in version 2.6.27 and Go requires
Linux kernel version 2.6.32 or later since Go 1.18. So it is safe to
always use epoll_create1.

For #53824
For #51087

Change-Id: I9a6a26b7f2075a38e041de1bab4691da0ecb94fc
Reviewed-on: https://go-review.googlesource.com/c/go/+/421994
Reviewed-by: Michael Pratt <mpratt@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
2022-09-30 17:35:24 +00:00
David Chase
9e0149da3c cmd/compile: fuse largest possible runs of plain blocks
This is predicted to reduce allocation, hence GC time.
(And it does.)

Change-Id: I30a46805b81e5ecd3fd7a6737f60ec26ef0498b1
Reviewed-on: https://go-review.googlesource.com/c/go/+/434796
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
2022-09-30 17:13:39 +00:00
cui fliter
73e14a3026 internal: fix a few function names on comments
Change-Id: I53169e386b8c789b092de348fa891fe50e11c2ef
GitHub-Last-Rev: 75232393b4
GitHub-Pull-Request: golang/go#55965
Reviewed-on: https://go-review.googlesource.com/c/go/+/436883
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
2022-09-30 16:39:12 +00:00
Than McIntosh
902da52f7b Revert "cmd/cgo, cmd/compile, cmd/link: remove old style build tags"
This reverts commit 6616573982, corresponding to CL 436915.

Reason for revert: this is causing some bootstrap build problems with older versions of Go 1.17, as I understand it. Still under investigation.

Change-Id: Idb6e17ff7b47004cbf87f967af6d84f214d8abb5
Reviewed-on: https://go-review.googlesource.com/c/go/+/435471
Reviewed-by: David Chase <drchase@google.com>
2022-09-30 14:43:55 +00:00
cuiweixie
13159fef04 go: replace bytes.Compare with bytes.Equal
Change-Id: I268033bfcda34b76ef1d3a3446d6d1d875fc33ea
Reviewed-on: https://go-review.googlesource.com/c/go/+/436716
Run-TryBot: xie cui <523516579@qq.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2022-09-30 14:14:36 +00:00
cuiweixie
7aa4905bb4 go/doc: use strings.TrimPrefix
Change-Id: Ie1e76d2e99bf2af7f064c9073c1fb866086962f6
Reviewed-on: https://go-review.googlesource.com/c/go/+/436715
Run-TryBot: Robert Griesemer <gri@google.com>
Run-TryBot: xie cui <523516579@qq.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-09-30 14:12:38 +00:00
Than McIntosh
9910f8a403 internal/buildcfg: enabled CoverageRedesign GOEXPERIMENT by default
Turn on the CoverageRedesign GOEXPERIMENT by default.

Updates #51430.

Change-Id: Id15c67ef0b6ac421b188d163fd2ce4a302abb3c9
Reviewed-on: https://go-review.googlesource.com/c/go/+/436236
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Than McIntosh <thanm@google.com>
2022-09-30 13:50:45 +00:00
Tobias Klauser
6616573982 cmd/cgo, cmd/compile, cmd/link: remove old style build tags
The minimum bootstrap version for Go ≥ 1.20 is Go 1.17. That version
supports the new style //go:build lines. Thus the old style //+build
lines can be dropped in this part of the tree as well. Leave the
//+build lines in cmd/dist which will ensure the minimum Go version
during bootstrap.

As suggested by Cherry during review of CL 430496

For #44505

Change-Id: If53c0b02cacbfb055a33e73cfd38578dfd3aa340
Reviewed-on: https://go-review.googlesource.com/c/go/+/436915
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Than McIntosh <thanm@google.com>
2022-09-30 11:22:39 +00:00
doujiang24
d7dbe0111e runtime/trace: skip tests if parsing fails with timestamp error
already skips tests in case of the timestamp error, eg. #97757

Change-Id: Ia696e83cba2e3ed50181a8100b964847092a7365
GitHub-Last-Rev: 8e5f607e14
GitHub-Pull-Request: golang/go#55918
Reviewed-on: https://go-review.googlesource.com/c/go/+/435855
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Joel Sing <joel@sing.id.au>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>
2022-09-30 05:48:38 +00:00
Mikael Urankar
9faf6b7929 cmd/link/internal/riscv64: add support for freebsd/riscv64
Updates #53466

Change-Id: Ifa1b8fe79f952a08dbdf91ae5ab23e4431e66134
Reviewed-on: https://go-review.googlesource.com/c/go/+/431660
Reviewed-by: Dmitri Goutnik <dgoutnik@gmail.com>
Run-TryBot: Joel Sing <joel@sing.id.au>
Reviewed-by: Joel Sing <joel@sing.id.au>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
2022-09-30 03:08:40 +00:00
cuiweixie
2cbcf36ede cmd/internal: use fmt.Fprintf
Change-Id: Ifa78c98bf919ea62136f19b2bad0a8ee33afc646
Reviewed-on: https://go-review.googlesource.com/c/go/+/435695
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Run-TryBot: xie cui <523516579@qq.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
2022-09-30 01:56:14 +00:00
cuiweixie
f1f85f4ab5 strconv: delete unused field
Change-Id: I1257270c55d69962988b6034e7341a9142a0c449
Reviewed-on: https://go-review.googlesource.com/c/go/+/436720
Auto-Submit: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Run-TryBot: Robert Griesemer <gri@google.com>
Run-TryBot: xie cui <523516579@qq.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2022-09-30 01:40:34 +00:00
cuiweixie
157e018fc3 cmd/compile/internal/noder: remove unnecessary assignment to the blank identifier
Change-Id: I51dd087e630bf433c30d0aaaf3715b62524eb432
Reviewed-on: https://go-review.googlesource.com/c/go/+/436647
Auto-Submit: Robert Griesemer <gri@google.com>
Run-TryBot: xie cui <523516579@qq.com>
Reviewed-by: Robert Griesemer <gri@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Robert Griesemer <gri@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2022-09-30 01:35:55 +00:00
cuiweixie
dc53738f58 internal/profile: omit comparison tool bool constant
Change-Id: I59b3e72382433a6dd82306f026171f3af4a6cba7
Reviewed-on: https://go-review.googlesource.com/c/go/+/436717
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Michael Pratt <mpratt@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
2022-09-30 01:34:14 +00:00
cuiweixie
574b5decf2 cmd/internal/obj/x86: return comparison directly
Change-Id: I4b596b252c1785b13c4a166e9ef5f4ae812cd1bc
Reviewed-on: https://go-review.googlesource.com/c/go/+/436704
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2022-09-29 23:49:16 +00:00
cuiweixie
1a6af5f7a0 cmd/internal/obj: call delete directly without check exist
Change-Id: I5350c6374cd39ce4512d29cd8a341c4996f3b601
Reviewed-on: https://go-review.googlesource.com/c/go/+/436703
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2022-09-29 23:49:15 +00:00
cuiweixie
1f15838392 cmd/internal/dwarf: remove redundant break statement
Change-Id: I20956187e925ef6ab35d23b23c40bbb0ee55ef4a
Reviewed-on: https://go-review.googlesource.com/c/go/+/436702
Run-TryBot: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
2022-09-29 23:49:14 +00:00
cuiweixie
d547ae2a8e cmd/internal/cov: use io.SeekStart, io.SeekCurrent, and io.SeekEnd
Change-Id: Ibf7e33e42c649783eaa0e638babff22d96ab51c8
Reviewed-on: https://go-review.googlesource.com/c/go/+/436701
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2022-09-29 23:49:12 +00:00
cuiweixie
fdcaae5734 cmd/go/internal/mvs: remove useless type assertion
Change-Id: Ifdb351193cab1c0b905a1cde17993231f849644c
Reviewed-on: https://go-review.googlesource.com/c/go/+/436700
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-09-29 23:49:11 +00:00
cuiweixie
2fedd335f0 cmd/go/internal/modindex: should omit comparison to bool constant
Change-Id: Iea75d0475e1cc8f794a7bae864c6ce0e6e33cb6c
Reviewed-on: https://go-review.googlesource.com/c/go/+/436698
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2022-09-29 23:48:48 +00:00
cuiweixie
1896eac57f cmd/go/internal/list: should omit comparison to bool constant
Change-Id: Ieef05be39bad1263eacedb33c2043ee83080f629
Reviewed-on: https://go-review.googlesource.com/c/go/+/436697
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-09-29 23:48:46 +00:00
cuiweixie
5613de9d47 cmd/go/internal/bug: use bytes.Contains
Change-Id: I982835eb0d051e48964fc4a66018514c7203dd0a
Reviewed-on: https://go-review.googlesource.com/c/go/+/436696
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2022-09-29 23:48:45 +00:00
cuiweixie
679640aee8 cmd/cover: use io.SeekStart, io.SeekCurrent
Change-Id: Ie3b593f7f0c71334dc8c446d545bf441f2ae81f8
Reviewed-on: https://go-review.googlesource.com/c/go/+/436695
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
Run-TryBot: Than McIntosh <thanm@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Than McIntosh <thanm@google.com>
2022-09-29 23:48:44 +00:00
cuiweixie
0582b7958e cmd/cover: remove unnecessary fmt.Sprintf
Change-Id: I892f17a8a6464d53dbf330a41439a81cb8873262
Reviewed-on: https://go-review.googlesource.com/c/go/+/436654
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Than McIntosh <thanm@google.com>
2022-09-29 23:48:42 +00:00
cuiweixie
1985507257 cmd/compile/internal/ppc64: delete useless break
Change-Id: I32ab2f2dcc5e8357b8e832bc40f688a88550007f
Reviewed-on: https://go-review.googlesource.com/c/go/+/436650
Run-TryBot: Cherry Mui <cherryyz@google.com>
Reviewed-by: David Chase <drchase@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
2022-09-29 23:48:20 +00:00
cuiweixie
1b5110268b internal: use io.SeekStart, io.SeekCurrent, and io.SeekEnd
Change-Id: I23ab738b73bc33d3b0b10013c3fadd95b5b24681
Reviewed-on: https://go-review.googlesource.com/c/go/+/436719
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
2022-09-29 23:45:29 +00:00
cuiweixie
daf1612dc7 internal: use time.Since instead of time.Now().Sub
Change-Id: I536c7fad84a63e96658c6930a5a77fd70edca33c
Reviewed-on: https://go-review.googlesource.com/c/go/+/436718
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
2022-09-29 23:45:27 +00:00
cuiweixie
b8ed88db8d compress: remove useless break statement
Change-Id: Ia2b376d134d4fd273924de2e4cdee9eba5a15c57
Reviewed-on: https://go-review.googlesource.com/c/go/+/436707
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-09-29 22:59:14 +00:00
cui fliter
1d65566148 cmd/fix: use strings.Cut
Change-Id: Ibee86b4c5dc9a18df9bdc65b0ec8339ee1cac7a9
GitHub-Last-Rev: 336580707c
GitHub-Pull-Request: golang/go#55911
Reviewed-on: https://go-review.googlesource.com/c/go/+/435739
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Ian Lance Taylor <iant@google.com>
2022-09-29 22:58:43 +00:00
cui fliter
c69d6d8b3e cmd: fix a few function names on comments
Change-Id: Ia0896bd1edf2558821244fecd1c297b599472f47
GitHub-Last-Rev: cfd1e1091a
GitHub-Pull-Request: golang/go#55944
Reviewed-on: https://go-review.googlesource.com/c/go/+/436637
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-09-29 22:58:11 +00:00
cui fliter
84c188008e crypto: fix a few function names on comments
Change-Id: I06f85f78c4c802142fc9207b100753decd568274
GitHub-Last-Rev: 4ad4c0f5e9
GitHub-Pull-Request: golang/go#55945
Reviewed-on: https://go-review.googlesource.com/c/go/+/436639
Run-TryBot: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2022-09-29 22:56:49 +00:00
hopehook
972496ae6e all: use strings.Builder where appropriate
Change-Id: I164d350ca480640996055dedf38d962921c474a6
Reviewed-on: https://go-review.googlesource.com/c/go/+/435975
Run-TryBot: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: hopehook <hopehook@golangcn.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-09-29 22:56:00 +00:00
hopehook
b78b84cd23 sync/atomic: rename "ifaceWords" to "efaceWords"
Rename "ifaceWords" to "efaceWords", since we are defining
an empty interface.

Change-Id: I7151fb730a081a800e6dd28bcba831787ee9d6a2
Reviewed-on: https://go-review.googlesource.com/c/go/+/432815
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Run-TryBot: hopehook <hopehook@golangcn.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2022-09-29 22:55:09 +00:00
Mikael Urankar
bf0a1ffbe2 syscall: add support for freebsd/riscv64
Updates #53466

Change-Id: I3c156400a105e711d6da0980854c08bf2f7e415a
Reviewed-on: https://go-review.googlesource.com/c/go/+/431655
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Mikaël Urankar <mikael.urankar@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Joel Sing <joel@sing.id.au>
Reviewed-by: Dmitri Goutnik <dgoutnik@gmail.com>
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
2022-09-29 22:39:46 +00:00
Nobuki Fujii
a14ac8635f testing: update description of Setenv
Add the description of Setenv that it cannot use if the test have
parallel ancestors.

Fixes #55128

Change-Id: Ia5a1deaa1a3116d1ebb439600a7d316c7d155412
Reviewed-on: https://go-review.googlesource.com/c/go/+/434115
Auto-Submit: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
2022-09-29 22:16:42 +00:00
cuiweixie
e7a3d87dda cmd/compile/internal/ir: delete unused code
Change-Id: I4f7581d1f4cd8a305acc02454e032c0788d39283
Reviewed-on: https://go-review.googlesource.com/c/go/+/436646
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: Robert Griesemer <gri@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Ian Lance Taylor <iant@google.com>
2022-09-29 22:03:56 +00:00