aboutsummaryrefslogtreecommitdiff
path: root/src/cmd
AgeCommit message (Collapse)Author
34 hourscmd/vendor: update github.com/google/pprofHEADmasterEmmanuel T Odeke
Brings in the latest github.com/google/pprof. Fixes #67626 Change-Id: Id8faef20f0a9bf81dd117110bf540aca852db6be Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest Reviewed-on: https://go-review.googlesource.com/c/go/+/588655 Reviewed-by: Carlos Amedee <carlos@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2 dayscmd/cgo/internal/testsanitizers: make the libfuzzer tests all shortMichael Anthony Knyszek
CL 589295 only made one of the two tests short, because the other one seemed to be passing consistently in short mode. On the builders, it seems to still fail maybe 30% of the time by taking too long. Disable these tests in short mode. For #67698. Change-Id: I9fd047f834f7493b608dd1fee5b9b6dfabbea03d Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-clang15,gotip-linux-386-clang15 Reviewed-on: https://go-review.googlesource.com/c/go/+/589495 Auto-Submit: Michael Knyszek <mknyszek@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Commit-Queue: Michael Knyszek <mknyszek@google.com>
2 dayscmd/compile: remove quoting in favor of clearer prose in error messagesRobert Griesemer
In an attempt to address issue #65790 (confusing error messages), quoting of names was introduced for some (but not all) names used in error messages. That CL solved the issue at hand at the cost of extra punctuation (the quotes) plus some inconsistency (not all names were quoted). This CL removes the quoting again in favor or adding a qualifying noun (such as "name", "label", "package", "built-in" etc.) before a user- specified name where needed. For instance, instead of invalid argument to `max' we now say invalid argument to built-in max There's still a chance for confusion. For instance, before an error might have been `sadly' not exported by package X and now it would be name sadly not exported by package X but adverbs (such as "sadly") seem unlikely names in programs. This change touches a lot of files but only affects error messages. Fixes #67685. Change-Id: I95435b388f92cade316e2844d59ecf6953b178bc Reviewed-on: https://go-review.googlesource.com/c/go/+/589118 Auto-Submit: Robert Griesemer <gri@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Robert Findley <rfindley@google.com> Reviewed-by: Robert Griesemer <gri@google.com>
2 dayscmd/compile/internal/types2: enable Alias types for TestStdlibRobert Griesemer
This is expected to eliminate a potential race condition which is causing a flaky test. Fixes #67260. Change-Id: I3fd76047136e2d4659a1c551491e371b67e8a7ce Reviewed-on: https://go-review.googlesource.com/c/go/+/589236 Auto-Submit: Robert Griesemer <gri@google.com> Reviewed-by: Robert Findley <rfindley@google.com> Reviewed-by: Robert Griesemer <gri@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
3 dayscmd/go: add compatibility tests for go mod tidy -diffSam Thanawalla
For #27005 Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest,gotip-windows-amd64-longtest Change-Id: I90ab8c21222ac2189abb40e8c8e7549e2d940dd2 Reviewed-on: https://go-review.googlesource.com/c/go/+/587941 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Matloob <matloob@golang.org>
3 dayscmd/cgo/internal/swig: force use of lld for LTO tests on the buildersMichael Anthony Knyszek
For whatever reason, on the builders, when using /usr/bin/ld (the default linker) with -flto we end up with problems. Specifically, the linker seems to require LLVMgold.so and can't find it. I'm not really sure why, but what definitely seems to work is forcing use of lld, which ships with our clang installation on the builders. Just enforce this on the builders for now; I've actually had very few problems running this locally (and I think I'm also mixing and matching linkers and toolchains too...), so it may be related to the version of clang we're testing with. This change, along with CL 589295, should fully fix the clang builders. Fixes #67698. Change-Id: I3bfbcd609e7d0fd70e52ac7e2a0817db95664f20 Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-clang15,gotip-linux-386-clang15 Reviewed-on: https://go-review.googlesource.com/c/go/+/589296 Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
3 dayscmd/cgo/internal/testsanitizers: skip some libfuzzer tests in short modeMichael Anthony Knyszek
These tests are newly-running now that we have installed a C++ toolchain on the clang builders, but one of them doesn't actually complete in short mode. For #67698. Change-Id: Id1ff4c05e380426d920277c13495f30e23561a4e Reviewed-on: https://go-review.googlesource.com/c/go/+/589295 Auto-Submit: Michael Knyszek <mknyszek@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
3 dayscmd/cgo/internal/swig,cmd/go: reenable swig tests on 386Michael Anthony Knyszek
CL 588938 skipped the tests because they were broken to unblock the builders, but we're fairly certain the reason they were failing is because we're missing g++-multilib. This change is intended to land once CL 589175 is deployed. Fixes #67698. Change-Id: I5bb679290ae9ba9ab3bda9499cdf1eec649bc066 Reviewed-on: https://go-review.googlesource.com/c/go/+/589195 Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Michael Knyszek <mknyszek@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
3 dayscmd/cgo/internal/swig,cmd/go: skip swig tests on 386Michael Anthony Knyszek
We recently added a C++ toolchain to the image, and this is causing problems on 386 and clang builders. The likely culprit is that we're missing 32-bit C++ libraries on the builders. Even if this theory is wrong, these tests *never* ran (always skipped, or truly never ran) on these platforms, so just skip them for now. We can look into getting the libraries installed later, but skip for now to unblock the builders. There are also problems with clang, but I believe they'll be resolved by setting CXX to clang++ in golangbuild. For #67698. Change-Id: I20fc1c5fa1285001ff86a4226771c30cf2e7f92d Cq-Include-Trybots: luci.golang.try:gotip-linux-386-clang15,gotip-linux-386 Reviewed-on: https://go-review.googlesource.com/c/go/+/588938 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
4 daysgo/types, types2: report error when using uninstantiated signature aliasRobert Griesemer
For #67547. Fixes #67683. Change-Id: I9487820ab4e2bd257d253a7016df45729b29f836 Reviewed-on: https://go-review.googlesource.com/c/go/+/588855 Auto-Submit: Robert Griesemer <gri@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Robert Findley <rfindley@google.com> Reviewed-by: Robert Griesemer <gri@google.com>
4 daysgo/types, types2: don't lose alias information during unificationRobert Griesemer
While at it, rename asTypeParam to asBoundTypeParam for clarity. For #67547. Fixes #67628. Change-Id: I2f447c4cd4d72f5315fe9323d82fcb9bf33657c6 Reviewed-on: https://go-review.googlesource.com/c/go/+/588797 Reviewed-by: Robert Griesemer <gri@google.com> Auto-Submit: Robert Griesemer <gri@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Commit-Queue: Robert Griesemer <gri@google.com> Reviewed-by: Robert Findley <rfindley@google.com>
5 dayscmd/go/internal/load: clone pgo variant's PackagePublic.Imports in splitMichael Matloob
Before this change the pgo and non-pgo variants Imports slices pointed to the same array, so modifying the pgo variant's Imports slice to add the .ForMain suffix modified the non-pgo vairant's Imports slice too. This change clones the imports slice to avoid that. Fixes #66218 Change-Id: Ic936086f2c31f2056988d6546216142e4fce4d8d Reviewed-on: https://go-review.googlesource.com/c/go/+/588275 Reviewed-by: Sam Thanawalla <samthanawalla@google.com> Auto-Submit: Michael Matloob <matloob@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Than McIntosh <thanm@google.com>
8 dayscmd/link: propagate FromAssembly attribute when cloning symbols to externalCherry Mui
When a symbol is cloned to external (in order to edit it), propagate the FromAssembly attribute, so the linker knows it is (originally) an assembly symbol, and can treat it specially (e.g. for stack maps). This should fix the Linux/RISCV64 builder. Change-Id: Icc956bcc43b79f328983a60835b05fd50f22326a Reviewed-on: https://go-review.googlesource.com/c/go/+/587926 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Than McIntosh <thanm@google.com>
8 dayscmd/link: print the seed in TestRandLayoutCherry Mui
When the test fails, print the seed, to help debug. Change-Id: I1530ce433f3c6b573fbba061452f57c7649cad77 Reviewed-on: https://go-review.googlesource.com/c/go/+/587925 Reviewed-by: Than McIntosh <thanm@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
9 dayscmd/go: env changed flag respects $GOROOT/go.envqiulaidongfeng
From $GOROOT/go.env file got GOPROXY and GOSUMDB and GOTOOLCHAIN default value. Fixes #67542 Change-Id: I0cb2e1ab6a32963288ae463a9b0bd92ac6719447 GitHub-Last-Rev: fda9be48b9e3bd3b124648eec1ef4ecfccac6d50 GitHub-Pull-Request: golang/go#67564 Reviewed-on: https://go-review.googlesource.com/c/go/+/587160 Reviewed-by: Carlos Amedee <carlos@golang.org> Auto-Submit: Michael Matloob <matloob@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Matloob <matloob@golang.org>
9 dayscmd/go/internal/modload: fix bug in error messageMichael Matloob
CL 513756 moved the usage of modGo after it was set to its proper value, so the error message text always listed the version of go as "unspecified". Fix the error message in the case where the version was set in the go.mod, and provide an error message where it wasn't. Fixes #67587 Change-Id: I763f6be7ee811da32fcb7e785682fd6f48145981 Reviewed-on: https://go-review.googlesource.com/c/go/+/588075 Reviewed-by: Sam Thanawalla <samthanawalla@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
9 dayscmd/go/internal/telemetrystats: fix assignment to okMichael Matloob
Change-Id: I7ee6198949bd2ea7e92d3e75c94ead04c31be491 Reviewed-on: https://go-review.googlesource.com/c/go/+/588236 Auto-Submit: Michael Matloob <matloob@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
9 daysgo/types, types2: pull up Unalias call to cover all of cycleFinder.typRobert Griesemer
Without a test because it's unclear the situation can actually occur, but the code is correct because it now mimics the behavior without explicit Alias nodes. For #67547. Change-Id: I21a31af28880ca6d599fe465563d9574c26ed1f1 Reviewed-on: https://go-review.googlesource.com/c/go/+/588117 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Robert Griesemer <gri@google.com> Auto-Submit: Robert Griesemer <gri@google.com> Reviewed-by: Robert Findley <rfindley@google.com>
9 daysgo/types, types2: document why Unalias is not needed in some placesRobert Griesemer
Documentation change only. For #67547. Change-Id: I0da480299c33239bcd1e059f8b9c6d48d8f26609 Reviewed-on: https://go-review.googlesource.com/c/go/+/587820 TryBot-Bypass: Robert Griesemer <gri@google.com> Reviewed-by: Robert Griesemer <gri@google.com> Reviewed-by: Robert Findley <rfindley@google.com> Auto-Submit: Robert Griesemer <gri@google.com>
9 daysgo/types, types2: add missing Unalias call to type string functionalityRobert Griesemer
For #67547. Change-Id: I999cd31f9a01f91e7984b4e7012c81e8bd9c6b06 Reviewed-on: https://go-review.googlesource.com/c/go/+/587940 Reviewed-by: Robert Griesemer <gri@google.com> Auto-Submit: Robert Griesemer <gri@google.com> Reviewed-by: Robert Findley <rfindley@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
9 dayscmd/link/internal/loong64: correct the musl dynamic linker pathlimeidan
Musl libc already supports loongarch64, the dynamic linker path is the same as other architectures: /lib/ld-musl-$ARCH.so.1 Ref: https://git.musl-libc.org/cgit/musl/tree/INSTALL#n141 Change-Id: Ie31d4254f6e14a5d634b2a7b5fa4c6270e2c0dc7 Reviewed-on: https://go-review.googlesource.com/c/go/+/569475 Reviewed-by: Cherry Mui <cherryyz@google.com> Auto-Submit: Cherry Mui <cherryyz@google.com> Reviewed-by: Than McIntosh <thanm@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: abner chenc <chenguoqi@loongson.cn> Reviewed-by: sophie zhao <zhaoxiaolin@loongson.cn> Reviewed-by: Qiqi Huang <huangqiqi@loongson.cn>
9 daysstd: fix calls to Printf(s) with non-constant sAlan Donovan
In all cases the intent was not to interpret s as a format string. In one case (go/types), this was a latent bug in production. (These were uncovered by a new check in vet's printf analyzer.) Updates #60529 Change-Id: I3e17af7e589be9aec1580783a1b1011c52ec494b Reviewed-on: https://go-review.googlesource.com/c/go/+/587855 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Russ Cox <rsc@golang.org>
10 dayscmd/go/internal/telemetrystats: handle cases where there's no patchMichael Matloob
If there's no second dot assume the version is just a major.minor. Change-Id: I765d6e8d7c1e63c695a0a3b0c047d86b989f95d9 Reviewed-on: https://go-review.googlesource.com/c/go/+/587796 Reviewed-by: Sam Thanawalla <samthanawalla@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Than McIntosh <thanm@google.com>
10 dayscmd/compile: intrinsify atomic And/Or on arm64fanzha02
The atomic And/Or operators were added by the CL 528797, the compiler does not intrinsify them, this CL does it for arm64. Also, for the existing atomicAnd/Or operations, the updated value are not used, but at that time we need a register to temporarily hold it. Now that we have v.RegTmp, the new value is not needed anymore. This CL changes it. The other change is that the existing operations don't use their result, but now we need the old value and not the new value for the result. And this CL alias all of the And/Or operations into sync/atomic package. Peformance on an ARMv8.1 machine: old.txt new.txt sec/op sec/op vs base And32-160 8.716n ± 0% 4.771n ± 1% -45.26% (p=0.000 n=10) And32Parallel-160 30.58n ± 2% 26.45n ± 4% -13.49% (p=0.000 n=10) And64-160 8.750n ± 1% 4.754n ± 0% -45.67% (p=0.000 n=10) And64Parallel-160 29.40n ± 3% 25.55n ± 5% -13.11% (p=0.000 n=10) Or32-160 8.847n ± 1% 4.754±1% -46.26% (p=0.000 n=10) Or32Parallel-160 30.75n ± 3% 26.10n ± 4% -15.14% (p=0.000 n=10) Or64-160 8.825n ± 1% 4.766n ± 0% -46.00% (p=0.000 n=10) Or64Parallel-160 30.52n ± 5% 25.89n ± 6% -15.17% (p=0.000 n=10) For #61395 Change-Id: Ib1d1ac83f7f67dcf67f74d003fadb0f80932b826 Reviewed-on: https://go-review.googlesource.com/c/go/+/584715 Auto-Submit: Austin Clements <austin@google.com> TryBot-Bypass: Austin Clements <austin@google.com> Reviewed-by: Austin Clements <austin@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> Run-TryBot: Fannie Zhang <Fannie.Zhang@arm.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
10 dayscmd/go,testdeps: move import of internal/coverage/cfile to testmainThan McIntosh
Instead of having testing/internal/testdeps import the internal/coverage/cfile package directly, have the code in testmain pass in pointers to cfile functions during setup in the case that we're running a "go test -cover" binary. This reduces the size of regular non-coverage test binaries back to what they were before CL 585820. Updates #67401. Fixes #67588. Change-Id: Iaf1a613bc7d3c9df9943189065d0161ca9120d34 Reviewed-on: https://go-review.googlesource.com/c/go/+/587795 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Russ Cox <rsc@golang.org>
10 daysgo/types, types2: factor out check for updated type arguments (cleanup)Robert Griesemer
Change-Id: I3e2668e4a24c145f121199a5f7f4278ff5d5f1da Reviewed-on: https://go-review.googlesource.com/c/go/+/587676 Reviewed-by: Robert Griesemer <gri@google.com> Reviewed-by: Robert Findley <rfindley@google.com> Auto-Submit: Robert Griesemer <gri@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
10 daysgo/types, types2: instantiate generic alias typesRobert Griesemer
For #46477. Change-Id: Ifa47d3ff87f67c60fa25654e54194ca8b31ea5a2 Reviewed-on: https://go-review.googlesource.com/c/go/+/567617 Auto-Submit: Robert Griesemer <gri@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Robert Findley <rfindley@google.com> Reviewed-by: Robert Griesemer <gri@google.com>
10 daysruntime: move exit hooks into internal/runtime/exithookRuss Cox
This removes a //go:linkname usage in the coverage implementation. For #67401. Change-Id: I0602172c7e372a84465160dbf46d9fa371582fff Reviewed-on: https://go-review.googlesource.com/c/go/+/586259 Auto-Submit: Russ Cox <rsc@golang.org> Reviewed-by: Than McIntosh <thanm@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
10 dayscmd/go/internal/work: add telemetry counters for build cache hits/missesMichael Matloob
The following counters are added in this cl go/buildcache/hit go/buildcache/miss go/buildcache/stdlibrecompiled (incremented at most once per invocation) Change-Id: Ia78e136feac8226cb35e554503b672343cc30262 Reviewed-on: https://go-review.googlesource.com/c/go/+/587577 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Robert Findley <rfindley@google.com> Reviewed-by: Sam Thanawalla <samthanawalla@google.com>
10 dayscmd/compile: repairing variable names and commentsDavid Chase
Change-Id: I2e775e92dcebf068426b3e2acbe088679c318ec4 Reviewed-on: https://go-review.googlesource.com/c/go/+/587578 Reviewed-by: Keith Randall <khr@golang.org> Auto-Submit: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
10 daysinternal/abi, cmd/compile, runtime: deduplicate rangefunc constsDavid Chase
Change-Id: I61ec5a7fa0c10f95ae2261c3349743d6fda2c1d2 Reviewed-on: https://go-review.googlesource.com/c/go/+/587596 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Keith Randall <khr@golang.org> Auto-Submit: Keith Randall <khr@golang.org>
10 daysall: change from sort functions to slices functions where feasibleIan Lance Taylor
Doing this because the slices functions are slightly faster and slightly easier to use. It also removes one dependency layer. This CL does not change packages that are used during bootstrap, as the bootstrap compiler does not have the required slices functions. It does not change the go/scanner package because the ErrorList Len, Swap, and Less methods are part of the Go 1 API. Change-Id: If52899be791c829198e11d2408727720b91ebe8a Reviewed-on: https://go-review.googlesource.com/c/go/+/587655 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> Commit-Queue: Ian Lance Taylor <iant@google.com> Reviewed-by: Damien Neil <dneil@google.com>
10 daysruntime,cmd/compile: fix wording of rangefunc panic messagesDavid Chase
Change-Id: I883e7b6554646f32ad44e4ea6583440c33f02b84 Reviewed-on: https://go-review.googlesource.com/c/go/+/587595 Reviewed-by: Robert Griesemer <gri@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
10 dayscmd/go: add additional counters for mode and host/target OS and archMichael Matloob
The following counters are added: (* means we will record the actual value for the counter, but of course the config will limit us to collecting preknown values) go/mode:{gopath,workspace,module} go/platform/{host,target}/{goos,goarch}:* go/platform/target/{ go386,goamd64,goarm,goarm64,gomips,goppc64,goriscv64,gowasm}:* For windows and unix: go/platform/host/*/version:* go/platform/host/*/major-version:*-* For windows: go/platform/host/windows/build:* Change-Id: I3c865afede2382bae103e5b4b9d1aa6b20c123df Reviewed-on: https://go-review.googlesource.com/c/go/+/587115 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Sam Thanawalla <samthanawalla@google.com> Auto-Submit: Michael Matloob <matloob@golang.org> Reviewed-by: Robert Findley <rfindley@google.com>
10 dayscmd/go: add go mod tidy -diffSam Thanawalla
The -diff flag causes tidy not to modify the files but instead print the necessary changes as a unified diff. It exits with a non-zero code if updates are needed. Fixes: #27005 Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest,gotip-windows-amd64-longtest Change-Id: Ie239367f2fc73ecb55ec2ce76442293635c1b47d Reviewed-on: https://go-review.googlesource.com/c/go/+/585401 Reviewed-by: Michael Matloob <matloob@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
10 dayscmd/compile/internal/ssa: reintroduce ANDconst opcode on PPC64Paul E. Murphy
This allows more effective conversion of rotate and mask opcodes into their CC equivalents, while simplifying the first lowering pass. This was removed before the latelower pass was introduced to fold more cases of compare against zero. Add ANDconst to push the conversion of ANDconst to ANDCCconst into latelower with the other CC opcodes. This also requires introducing RLDICLCC to prevent regressions when ANDconst is converted to RLDICL then to RLDICLCC and back to ANDCCconst when possible. Change-Id: I9e5f9c99fbefa334db18c6c152c5f967f3ff2590 Reviewed-on: https://go-review.googlesource.com/c/go/+/586160 Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Carlos Amedee <carlos@golang.org>
10 daysgo/types, types2: better error message for invalid ERROR pattern in testsRobert Griesemer
When unquoting of an ERROR or ERRORx pattern fails, say so instead of simply printing "syntax error". Change-Id: I586dffa86ca80f5b40a5cbe16a7005cc1f7862f8 Reviewed-on: https://go-review.googlesource.com/c/go/+/586958 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Robert Griesemer <gri@google.com> Auto-Submit: Robert Griesemer <gri@google.com> Reviewed-by: Robert Findley <rfindley@google.com>
10 daysgo/types, types2: operand.AssignableTo must consider Alias typesRobert Griesemer
Fixes regression from Go 1.22. For #67547. Change-Id: Id0d07d6b24e1eab6ed1c7476d9d9b82d28aee80a Reviewed-on: https://go-review.googlesource.com/c/go/+/587161 Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com> Reviewed-by: Robert Findley <rfindley@google.com> Reviewed-by: Robert Griesemer <gri@google.com> Auto-Submit: Robert Griesemer <gri@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
10 dayscmd/compile: keep closure pointer live for range body closuresCherry Mui
For range-over-function, the compiler generates a hidden closure for the range body, and call the iterator function with the hidden closure as the yield parameter. For debuggers, if it stops inside the range body (hidden closure), it needs some way to find the outer function (that contains the range statement), to access the variables that are in scope. To do this, we keep the closure pointer live on stack with a special name ".closureptr", so the debugger can look for this name and find the closure pointer. In the usual case, the closure is a struct defined in the outer frame, so following the pointer it will find the frame. We do this in SSA generation, so if the range func is inlined and there is no actual closure, we don't generate any extra code. In the case that there is an actual closure, it's just a single store to the stack, so the overhead is still small. TODO: add some test Change-Id: I0e8219b895733f8943a13c67b03ca776bdc02bc9 Reviewed-on: https://go-review.googlesource.com/c/go/+/586975 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com>
10 daysgo/types, types2: operand.convertibleTo must consider Alias typesRobert Griesemer
Fixes regression from Go 1.22. Fixes #67540. For #67547. Change-Id: I61f642970c6a9bd8567654bb5ecf645ae77b3bcc Reviewed-on: https://go-review.googlesource.com/c/go/+/587159 Reviewed-by: Robert Griesemer <gri@google.com> Reviewed-by: Robert Findley <rfindley@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com> Auto-Submit: Robert Griesemer <gri@google.com>
10 daysall: convert PPC64 CMPx ...,R0,... to CMPx Rx,$0Paul E. Murphy
Cleanup all remaining trivial compares against $0 in ppc64x assembly. In math, SRD ...,Rx; CMP Rx, $0 is further simplified to SRDCC. Change-Id: Ia2bc204953e32f08ee142bfd06a91965f30f99b6 Reviewed-on: https://go-review.googlesource.com/c/go/+/587016 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com> Run-TryBot: Paul Murphy <murp@ibm.com> Reviewed-by: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
11 dayscmd/go: add -cover flag to report by go version -mKioni
Fixes #67366 Change-Id: Ie39a8ebe7fe2faf59a5f723c69d6d5c8e1a9cd8b GitHub-Last-Rev: 021134582d8c20b5799514f34b27d8b603a52fef GitHub-Pull-Request: golang/go#67572 Reviewed-on: https://go-review.googlesource.com/c/go/+/587375 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Matloob <matloob@golang.org> Reviewed-by: Sam Thanawalla <samthanawalla@google.com>
11 dayscmd/compile: update PGO profileCherry Mui
Since last time the default.pgo profile is collected, there has been a lot of development in the compiler. It's time to refresh the compiler's PGO profile. Profile collected by running the cmd/compile/profile.sh script on the gotip-linux-amd64_c3h88-perf_vs_release gomote. Benchmark results on Linux/AMD64: │ nopgo.txt │ old.txt │ new.txt │ │ sec/op │ sec/op vs base │ sec/op vs base │ Template 120.7m ± 0% 118.1m ± 0% -2.17% (p=0.000 n=20) 116.5m ± 0% -3.46% (p=0.000 n=20) Unicode 104.59m ± 0% 99.05m ± 0% -5.29% (p=0.000 n=20) 99.30m ± 1% -5.06% (p=0.000 n=20) GoTypes 676.8m ± 0% 662.3m ± 0% -2.15% (p=0.000 n=20) 650.8m ± 0% -3.85% (p=0.000 n=20) Compiler 96.29m ± 1% 91.85m ± 1% -4.61% (p=0.000 n=20) 90.44m ± 1% -6.08% (p=0.000 n=20) SSA 5.185 ± 0% 5.038 ± 0% -2.83% (p=0.000 n=20) 4.945 ± 0% -4.64% (p=0.000 n=20) Flate 69.00m ± 0% 67.39m ± 0% -2.33% (p=0.000 n=20) 66.60m ± 0% -3.48% (p=0.000 n=20) GoParser 143.3m ± 0% 140.6m ± 1% -1.89% (p=0.000 n=20) 138.3m ± 1% -3.46% (p=0.000 n=20) Reflect 310.0m ± 1% 305.1m ± 0% -1.56% (p=0.000 n=20) 298.2m ± 1% -3.79% (p=0.000 n=20) Tar 109.5m ± 0% 107.5m ± 1% -1.79% (p=0.000 n=20) 106.0m ± 0% -3.18% (p=0.000 n=20) XML 147.6m ± 1% 144.2m ± 0% -2.31% (p=0.000 n=20) 142.0m ± 0% -3.83% (p=0.000 n=20) geomean 215.0m 209.2m -2.70% 206.2m -4.09% For #60234. Change-Id: Iee853146f120ce310c81aabfccf6e5665e6d8b65 Reviewed-on: https://go-review.googlesource.com/c/go/+/587195 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Pratt <mpratt@google.com>
11 dayscmd/internal/obj/loong64: add atomic memory access instructions supportGuoqi Chen
The AM* atomic access instruction performs a sequence of “read-modify-write” operations on a memory cell atomically. Specifically, it retrieves the old value at the specified address in memory and writes it to the general register rd, performs some simple operations on the old value in memory and the value in the general register rk, and then write the result of the operation back to the memory address pointed to by general register rj. Go asm syntax: AM{SWAP/ADD/AND/OR/XOR/MAX/MIN}[DB]{W/V} RK, (RJ), RD AM{MAX/MIN}[DB]{WU/VU} RK, (RJ), RD Equivalent platform assembler syntax: am{swap/add/and/or/xor/max/min}[_db].{w/d} rd, rk, rj am{max/min}[_db].{wu/du} rd, rk, rj Ref: https://loongson.github.io/LoongArch-Documentation/LoongArch-Vol1-EN.html Change-Id: I99ea4553ae731675180d63691c19ef334e7e7817 Reviewed-on: https://go-review.googlesource.com/c/go/+/481577 Reviewed-by: Meidan Li <limeidan@loongson.cn> Reviewed-by: sophie zhao <zhaoxiaolin@loongson.cn> Reviewed-by: Mauri de Souza Meneguzzo <mauri870@gmail.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Qiqi Huang <huangqiqi@loongson.cn> Reviewed-by: WANG Xuerui <git@xen0n.name> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
11 daysgo/types, types2: underIs must consider Alias typesRobert Griesemer
Fixes regression from Go 1.22. For #67547. Change-Id: I012681c7b8b01b02018b313dd3804690bc7aeed1 Reviewed-on: https://go-review.googlesource.com/c/go/+/587158 Reviewed-by: Robert Griesemer <gri@google.com> Auto-Submit: Robert Griesemer <gri@google.com> Reviewed-by: Robert Findley <rfindley@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
11 daysgo/types, types2: coreType/String must consider Alias typesRobert Griesemer
Fixes regression from Go 1.22. For #67547. Change-Id: Idd319b9d2a73c824caa2c821df0e2fcd4f58cb08 Reviewed-on: https://go-review.googlesource.com/c/go/+/587176 Reviewed-by: Robert Findley <rfindley@google.com> Auto-Submit: Robert Griesemer <gri@google.com> Reviewed-by: Robert Griesemer <gri@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
11 daysgo/types, types2: don't panic converting a constant to aliased type parameterRobert Griesemer
For #67547. Change-Id: I1b2118a311dce906327ae6e29e582da539c60b2b Reviewed-on: https://go-review.googlesource.com/c/go/+/587157 Auto-Submit: Robert Griesemer <gri@google.com> Reviewed-by: Robert Griesemer <gri@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Robert Findley <rfindley@google.com>
11 daysgo/types, types2: add missing Unalias calls (clarification)Robert Griesemer
This change adds an Unalias call in applyTypeFunc and arrayPtrDeref. At the moment this doesn't change anything or fix any bugs because of the way these two functions are invoked, but that could change in the future. Also, manually reviewed all type assertions to Type types. Excluding assertions to type parameters, no obvious issues were found except for #67540 for which a separate fix is pending. There are potential issues with assertions type parameters which will be addressed in a follow-up CL. For #67547. Change-Id: I312268dc5e104f95b68f115f00aec3ec4c82e41f Reviewed-on: https://go-review.googlesource.com/c/go/+/587156 Reviewed-by: Robert Findley <rfindley@google.com> Auto-Submit: Robert Griesemer <gri@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Robert Griesemer <gri@google.com>
11 dayscmd/compile: for rangefunc, add checks and tests, fix panic interactionsDavid Chase
Modify rangefunc #next protocol to make it more robust Extra-terrible nests of rangefunc iterators caused the prior implementation to misbehave non-locally (in outer loops). Add more rangefunc exit flag tests, parallel and tricky This tests the assertion that a rangefunc iterator running in parallel can trigger the race detector if any of the parallel goroutines attempts an early exit. It also verifies that if everything else is carefully written, that it does NOT trigger the race detector if all the parts run time completion. Another test tries to rerun a yield function within a loop, so that any per-line shared checking would be fooled. Added all the use-of-body/yield-function checking. These checks handle pathological cases that would cause rangefunc for loops to behave in surprising ways (compared to "regular" for loops). For example, a rangefunc iterator might defer-recover a panic thrown in the syntactic body of a loop; this notices the fault and panics with an explanation Modified closure naming to ID rangefunc bodies Add a "-range<N>" suffix to the name of any closure generated for a rangefunc loop body, as provided in Alessandro Arzilli's CL (which is merged into this one). Fix return values for panicky range functions This removes the delayed implementation of "return x" by ensuring that return values (in rangefunc-return-containing functions) always have names and translating the "return x" into "#rv1 = x" where #rv1 is the synthesized name of the first result. Updates #61405. Change-Id: I933299ecce04ceabcf1c0c2de8e610b2ecd1cfd8 Reviewed-on: https://go-review.googlesource.com/c/go/+/584596 Reviewed-by: Matthew Dempsky <mdempsky@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Tim King <taking@google.com>
11 dayscmd/compile: Fix SSA building bug for CAS atomics on ARM64Andrey Bokhanko
Fixes #67229 Change-Id: I39f1255d38d2b2083753e17f0f5acf520e6167d5 Reviewed-on: https://go-review.googlesource.com/c/go/+/583995 Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Shu-Chun Weng <scw@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>