Bryan C. Mills [Tue, 15 Aug 2023 22:07:51 +0000 (18:07 -0400)]
cmd/go: skip gccgo_link_c when cross-compiling
I don't understand the rationale given in
https://git.alpinelinux.org/aports/commit/community/go/tests-unset-GCCGO.patch?id=a10e9a5e48507198e26a8cf19709e4059da4c79f,
but I suspect that it may be working around test failures when
cross-compiling, since we have a lot of other gccgo tests that need to
skip in that circumstance.
Alternatively, that may just be a stale patch working around #53815.
I can't fine any issue filed against the Go project for this patch,
so it's hard to be sure.
Either way, adding this skip should make the test more robust.
Russ Cox [Fri, 30 Jun 2023 20:18:44 +0000 (16:18 -0400)]
cmd/compile, runtime: make room for rangefunc defers
This is subtle and the compiler and runtime be in sync.
It is easier to develop the rest of the changes (especially when using
toolstash save/restore) if this change is separated out and done first.
Preparation for proposal #61405. The actual logic in the
compiler will be guarded by a GOEXPERIMENT, but it is
easier not to have GOEXPERIMENT-specific data structures
in the runtime, so just make the field always.
Russ Cox [Wed, 28 Jun 2023 21:45:26 +0000 (17:45 -0400)]
regexp/syntax: use more compact Regexp.String output
Compact the Regexp.String output. It was only ever intended for debugging,
but there are at least some uses in the wild where regexps are built up
using regexp/syntax and then formatted using the String method.
Compact the output to help that use case. Specifically:
- Compact 2-element character class ranges: [a-b] -> [ab].
- Aggregate flags: (?i:A)(?i:B)*(?i:C)|(?i:D)?(?i:E) -> (?i:AB*C|D?E).
Russ Cox [Wed, 16 Aug 2023 15:18:02 +0000 (11:18 -0400)]
cmd/api: rename api.go to main_test.go
This makes cmd/api no longer an importable package.
In CL 453258 I forgot that there was no direct prohibition
on importing packages from cmd - we just rely on the
fact that cmd/* is all package main and everything else
is cmd/internal.
David Chase [Tue, 15 Aug 2023 21:45:50 +0000 (17:45 -0400)]
cmd/compile: in expandCalls, move all arg marshalling into call block
For aggregate-typed arguments passed to a call, expandCalls
decomposed them into parts in the same block where the value
was created. This is not necessarily the call block, and in
the case where stores are involved, can change the memory
leaving that block, and getting that right is problematic.
Instead, do all the expanding in the same block as the call,
which avoids the problems of (1) not being able to reorder
loads/stores across a block boundary to conform to memory
order and (2) (incorrectly, not) exposing the new memory to
consumers in other blocks. Putting it all in the same block
as the call allows reordering, and the call creates its own
new memory (which is already dealt with correctly).
Fixes #61992.
Change-Id: Icc7918f0d2dd3c480cc7f496cdcd78edeca7f297
Reviewed-on: https://go-review.googlesource.com/c/go/+/519276 Reviewed-by: Keith Randall <khr@google.com>
Run-TryBot: David Chase <drchase@google.com> Reviewed-by: Keith Randall <khr@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
qmuntal [Thu, 10 Aug 2023 09:17:25 +0000 (11:17 +0200)]
os: support file systems without file IDs when reading directories on windows
Some file systems do not support file IDs. We should not use
FILE_ID_BOTH_DIR_INFO when reading directories on these file systems,
as it will fail. Instead, we should use FILE_ID_FULL_DIR_INFO,
which doesn't require file ID support.
Russ Cox [Fri, 11 Aug 2023 15:24:07 +0000 (11:24 -0400)]
cmd/go: remove conversion of legacy pre-module dependency configs
This kind of worked, kind of didn't, but by now no one is running into
those configs anymore during "go mod init", the code is complex,
and the tests are slow. Not worth the trouble of maintaining anymore.
We've decided to keep basic GOPATH mode running
for trees that already exist, but GOPATH-mode get is
being removed. It is old and not useful and probably
full of security holes. See #60915 for more details.
cui fliter [Tue, 15 Aug 2023 15:07:18 +0000 (23:07 +0800)]
errors: add a colon after Output to make the Example in the document display correctly
Change-Id: Iaa1751c6ac0df9d5b2cb74efb16996f4eaea0503
Reviewed-on: https://go-review.googlesource.com/c/go/+/519236 Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: shuang cui <imcusg@gmail.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
qiulaidongfeng [Wed, 16 Aug 2023 02:04:19 +0000 (02:04 +0000)]
bufio: clarify the maximum token size
Fixes #43183.
Change-Id: I50d99ef8ed513bba47166a25ea5c7c80cd8bd799
GitHub-Last-Rev: 684d70e9a3dbc0ce280e1112105d666cd5754e9f
GitHub-Pull-Request: golang/go#61979
Reviewed-on: https://go-review.googlesource.com/c/go/+/518860 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Rob Pike <r@golang.org>
Inada Naoki [Tue, 15 Aug 2023 04:33:37 +0000 (04:33 +0000)]
doc/go1.22: mention new sql.Null[T]
For #60370.
Change-Id: Idae906ec7027be6d95f78bf43f7ce8f9d07e6c00
GitHub-Last-Rev: c645f0cf82ac595855fa154ce342869262932770
GitHub-Pull-Request: golang/go#62033
Reviewed-on: https://go-review.googlesource.com/c/go/+/519555
TryBot-Bypass: Ian Lance Taylor <iant@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Robert Griesemer [Tue, 15 Aug 2023 21:17:02 +0000 (14:17 -0700)]
go/types, types2: don't verify infer result if no Config.Error is given
With no error handler installed, an error leads to an (internal panic
and) immediate abort of type checking. Not all invariants hold up in
this case, but it also doesn't matter.
In Checker.infer, verify result conditions always if an error handler
is installed, but only then.
Fixes #61938.
Change-Id: I4d3d61bbccc696a75639fee5010f5d3cef17e855
Reviewed-on: https://go-review.googlesource.com/c/go/+/519775 Reviewed-by: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@google.com>
Robert Griesemer [Mon, 14 Aug 2023 22:56:08 +0000 (15:56 -0700)]
go/types, types2: use correct parameter list when checking argument passing
The existing code was simply wrong: we cannot ever use the result
signature parameter list (rsig.params) if sigParams was adjusted
for variadic functions. If it was adjusted, we always must either
use sigParams or its separately instantiated version.
In the condition "n > 0 && adjusted", the "n > 0" should have
been in either of the respective "if statement" branches.
Simplified the code by merging with the result signature parameter
update.
Fixes #61931.
Change-Id: I5d39bc8bbc4dd85c7c985055d29532b4b176955e
Reviewed-on: https://go-review.googlesource.com/c/go/+/519456
Auto-Submit: Robert Griesemer <gri@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Robert Griesemer <gri@google.com> Reviewed-by: Robert Griesemer <gri@google.com> Reviewed-by: Robert Findley <rfindley@google.com>
Matthew Dempsky [Sat, 12 Aug 2023 01:21:22 +0000 (18:21 -0700)]
cmd/compile: improve ir.StaticValue and extract ir.StaticCalleeName
This CL extends ir.StaticValue to also work on closure variables.
Also, it extracts the code from escape analysis that's responsible for
determining the static callee of a function. This will be useful when
go/defer statement normalization is moved to typecheck.
Change-Id: I69e1f7fb185658dc9fbfdc69d0f511c84df1d3ac
Reviewed-on: https://go-review.googlesource.com/c/go/+/518959 Reviewed-by: Than McIntosh <thanm@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Auto-Submit: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Robert Griesemer [Mon, 14 Aug 2023 21:07:56 +0000 (14:07 -0700)]
go/types, types2: use exact unification when comparing interface methods
Irrespective of whether unification is exact or inexact, method
signatures of interfaces must always match exactly: a type never
satisfies/implements an interface if relevant method signatures
are different (i.e., not identical, possibly after substitution).
Fixes #61879.
Change-Id: I20c0aa28ac86e2edec615b40f2269938e4a96938
Reviewed-on: https://go-review.googlesource.com/c/go/+/519435
TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@google.com>
Run-TryBot: Robert Griesemer <gri@google.com> Reviewed-by: Robert Findley <rfindley@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
Tobias Klauser [Tue, 15 Aug 2023 13:32:42 +0000 (15:32 +0200)]
cmd/go/testdata/script: ensure go test -skip skips ExampleTest1
CL 511837 added a check for go test -skip Example but it currently
doesn't verify that the example doesn't show up in the command output.
Add such a check.
Than McIntosh [Tue, 15 Aug 2023 14:24:41 +0000 (10:24 -0400)]
cmd/internal/archive: skip sentinel archive entries created by Go cmd
When reading an archive, check for the presence of sentinel entries
created by the Go command. These zero-sized marker entries don't contain
any useful symbols, but rather are there to communicate info to the
linker; ignore them during symbol dumping.
Fixes #62036.
Change-Id: Ied017b0c5b92a3cf6fd13bb9c9f3a9664e4f20f8
Reviewed-on: https://go-review.googlesource.com/c/go/+/519635
Run-TryBot: Than McIntosh <thanm@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Joel Sing [Fri, 11 Aug 2023 13:08:25 +0000 (23:08 +1000)]
runtime/cgo: use fatalf on solaris
Change-Id: I3302cc2f0e03014e9497976e36d1c7a381a2f962
Reviewed-on: https://go-review.googlesource.com/c/go/+/518623
Run-TryBot: Joel Sing <joel@sing.id.au>
TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
Nick Ripley [Fri, 4 Aug 2023 21:31:43 +0000 (17:31 -0400)]
runtime: restore caller's frame pointer when recovering from panic
When recovering from a panic, restore the caller's frame pointer before
returning control to the caller. Otherwise, if the function proceeds to
run more deferred calls before returning, the deferred functions will
get invalid frame pointers pointing to an address lower in the stack.
This can cause frame pointer unwinding to crash, such as if an execution
trace event is recorded during the deferred call on architectures which
support frame pointer unwinding.
Fixes #61766
Change-Id: I45f41aedcc397133560164ab520ca638bbd93c4e
Reviewed-on: https://go-review.googlesource.com/c/go/+/516157
TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: Felix Geisendörfer <felix.geisendoerfer@datadoghq.com>
Nick Ripley [Mon, 3 Apr 2023 13:32:05 +0000 (09:32 -0400)]
runtime: zero saved frame pointer when reusing goroutine stack on arm64
When a goroutine stack is reused on arm64, the spot on the stack where
the "caller's" frame pointer goes for the topmost frame should be
explicitly zeroed. Otherwise, the frame pointer check in adjustframe
with debugCheckBP enabled will fail on the topmost frame of a call stack
the first time a reused stack is grown.
Updates #39524, #58432
Change-Id: Ic1210dc005e3ecdbf9cd5d7b98846566e56df8f5
Reviewed-on: https://go-review.googlesource.com/c/go/+/481636 Reviewed-by: Felix Geisendörfer <felix.geisendoerfer@datadoghq.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Joel Sing [Mon, 7 Aug 2023 15:18:17 +0000 (01:18 +1000)]
crypto/internal/bigmod: provide assembly addMulVVW* for riscv64
This provides an assembly implementation of addMulVVW* for riscv64,
processing four words per loop, resulting in a performance gain
of 23%+ for RSA decryption/signing on a StarFive VisionFive 2:
Change-Id: I8414ba0028b0781a945610abe02c285d2387aef3
Reviewed-on: https://go-review.googlesource.com/c/go/+/516536 Reviewed-by: Mark Ryan <markdryan@rivosinc.com> Reviewed-by: Filippo Valsorda <filippo@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: M Zhuo <mzh@golangcn.org> Reviewed-by: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Joel Sing <joel@sing.id.au>
TryBot-Result: Gopher Robot <gobot@golang.org>
Joel Sing [Fri, 11 Aug 2023 13:02:32 +0000 (23:02 +1000)]
runtime/cgo: consolidate openbsd cgo code
All openbsd architectures now use the same code, deduplicate accordingly.
Change-Id: I65f1d9bd78c97dbdf552ec95ebba7ec4d04c8d2d
Reviewed-on: https://go-review.googlesource.com/c/go/+/518622
Run-TryBot: Joel Sing <joel@sing.id.au> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Joel Sing [Fri, 11 Aug 2023 12:46:32 +0000 (22:46 +1000)]
runtime/cgo: consolidate netbsd cgo code
All netbsd architectures now use the same code, deduplicate accordingly.
Change-Id: Ieb179fd76885b7af6d388d7f2aee0f9fac6f1264
Reviewed-on: https://go-review.googlesource.com/c/go/+/518621 Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Joel Sing <joel@sing.id.au>
Joel Sing [Fri, 11 Aug 2023 08:54:52 +0000 (18:54 +1000)]
runtime/cgo: consolidate linux cgo code
Much of the gcc_linux_*.c code is identical and duplicated across
architectures. Consolidate code for 386, arm, loong64, mips* and
riscv64, where the only difference is the build tags (386 also
has some non-functional ordering differences).
Change-Id: I14ee9a4cc6b72e165239d196b68b6343efaddf0a
Reviewed-on: https://go-review.googlesource.com/c/go/+/518620
Run-TryBot: Joel Sing <joel@sing.id.au> Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Joel Sing [Fri, 11 Aug 2023 12:53:30 +0000 (22:53 +1000)]
runtime/cgo: consolidate freebsd cgo code
Most freebsd architectures now use the same code, deduplicate accordingly.
The arm code differs slightly in that it has a compile time check for
ARM_TP_ADDRESS, however this is written in a way that it can be included
for all architectures.
Change-Id: I7f6032b63521d24d0c3b5e0e08d57e32b4f9ddc4
Reviewed-on: https://go-review.googlesource.com/c/go/+/518619 Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Joel Sing <joel@sing.id.au> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Joel Sing [Fri, 11 Aug 2023 09:49:38 +0000 (19:49 +1000)]
runtime/cgo: rename crosscall_arm1 to crosscall1
This reduces inconsistency with other architectures and will allow
for further code deduplication.
Change-Id: Icf0d02f765546c3193cccaa22c79e632e12d6bba
Reviewed-on: https://go-review.googlesource.com/c/go/+/518616
Run-TryBot: Joel Sing <joel@sing.id.au>
TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
Joel Sing [Fri, 11 Aug 2023 08:20:21 +0000 (18:20 +1000)]
runtime/cgo: use fatalf on dragonfly, freebsd, netbsd and openbsd
Use fatalf consistently on freebsd. Also use it on dragonfly, netbsd
and openbsd.
Change-Id: I8643c0b7bc13c3cb5173209d311d6d297913955b
Reviewed-on: https://go-review.googlesource.com/c/go/+/518615 Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Joel Sing <joel@sing.id.au> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Joel Sing [Wed, 19 Oct 2022 05:43:22 +0000 (16:43 +1100)]
cmd/compile: sign or zero extend for 32 bit equality on riscv64
For 32 bit equality (Eq32), rather than always zero extending to 64 bits,
sign extend for signed types and zero extend for unsigned types. This makes
no difference to the equality test (via SUB), however it increases the
likelihood of avoiding unnecessary sign or zero extension simply for the
purpose of equality testing.
While here, replace the Neq* rules with (Not (Eq*)) - this makes no
difference to the generated code (as the intermediates get expanded and
eliminated), however it means that changes to the equality rules also
reflect in the inequality rules.
As an example, the following:
lw t0,956(t0)
slli t0,t0,0x20
srli t0,t0,0x20
li t1,1
bne t1,t0,278fc
Becomes:
lw t0,1024(t0)
li t1,1
bne t1,t0,278b0
Removes almost 1000 instructions from the Go binary on riscv64.
Change-Id: Iac60635f494f6db87faa47752bd1cc16e6b5967f
Reviewed-on: https://go-review.googlesource.com/c/go/+/516595
Run-TryBot: Joel Sing <joel@sing.id.au> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: M Zhuo <mzh@golangcn.org> Reviewed-by: Michael Knyszek <mknyszek@google.com>
Mauri de Souza Meneguzzo [Sun, 13 Aug 2023 14:04:53 +0000 (14:04 +0000)]
runtime: mark traceEnabled and traceShuttingDown as no:split
This fixes a regression from CL 494181.
The traceEnabled function splits the stack and is being
called by reentersyscall that shouldn't call anything
that splits the stack. Same with traceShuttingDown.
Fixes #61975
Change-Id: I5eca0ba74cfa6acb0259e8400b03c2093cd59dd1
GitHub-Last-Rev: 9e55ae9d7cc700de9757d32a7905127a349d973a
GitHub-Pull-Request: golang/go#61981
Reviewed-on: https://go-review.googlesource.com/c/go/+/519055 Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@google.com>
Jes Cok [Mon, 14 Aug 2023 11:53:26 +0000 (11:53 +0000)]
encoding/json: declare hex as a const
hex is in fact immutable, declare it as a const to avoid accidental
modification, also for consistency with other packages.
Change-Id: I99f292e98c82d4c4526e46c9897d154d0c073da5
GitHub-Last-Rev: d2f06965e7e03df470d8c3c8882619187abf1609
GitHub-Pull-Request: golang/go#62011
Reviewed-on: https://go-review.googlesource.com/c/go/+/519155
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Ian Lance Taylor <iant@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
cui fliter [Fri, 11 Aug 2023 03:00:44 +0000 (11:00 +0800)]
internal/fuzz: use the built-in min function
Change-Id: I26be9a9faa27c6c03cf8b9dec5908d8617d61312
Reviewed-on: https://go-review.googlesource.com/c/go/+/518276
Run-TryBot: shuang cui <imcusg@gmail.com> Reviewed-by: qiulaidongfeng <2645477756@qq.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
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>
Paul E. Murphy [Tue, 27 Jun 2023 16:30:29 +0000 (11:30 -0500)]
cmd/compile/internal: add RLDICR opcode for PPC64
This is encoded similarly to RLDICL, but can clear the least
significant bits.
Likewise, update the auxint encoding of RLDICL to match those
used by the rotate and mask word ssa opcodes for easier usage
within lowering rules. The RLDICL ssa opcode is not used yet.
Change-Id: I42486dd95714a3e8e2f19ab237a6cf3af520c905
Reviewed-on: https://go-review.googlesource.com/c/go/+/515575 Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
Run-TryBot: Paul Murphy <murp@ibm.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Michael Knyszek <mknyszek@google.com>
Jes Cok [Mon, 14 Aug 2023 11:16:48 +0000 (11:16 +0000)]
cmd/go/internal/cache: use == to test for io.EOF
The documentation of io.EOF: Read must return EOF itself, not an error
wrapping EOF, because callers will test for EOF using ==.
encoding/json package provides an example "ExampleDecoder" which uses
"err == io.EOF" as well, so I think it's more idiomatic to use == to test for io.EOF.
Change-Id: I8a9f06d655ca63b3ec3e7dbbdfc519a2686980e1
GitHub-Last-Rev: 665929e2a20bff231bcb5bad1384998379b41165
GitHub-Pull-Request: golang/go#62012
Reviewed-on: https://go-review.googlesource.com/c/go/+/519156
Auto-Submit: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Bryan Mills <bcmills@google.com>
Matthew Dempsky [Sat, 12 Aug 2023 00:29:08 +0000 (17:29 -0700)]
cmd/compile: desugar ORECOVER during typecheck
This never belonged in escape analysis, but the non-unified generics
frontend didn't use typecheck. That frontend is gone, so now we can
desugar it earlier.
Change-Id: I70f34a851f27fce1133777c5eeca0f549fc60ede
Reviewed-on: https://go-review.googlesource.com/c/go/+/518958
TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Than McIntosh <thanm@google.com> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Auto-Submit: Matthew Dempsky <mdempsky@google.com>
David Chase [Fri, 11 Aug 2023 18:38:19 +0000 (14:38 -0400)]
runtime: profiling on Darwin cannot use blocking reads
On Darwin (and assume also on iOS but not sure), notetsleepg
cannot be called in a signal-handling context. Avoid this
by disabling block reads on Darwin.
An alternate approach was to add "sigNote" with a pipe-based
implementation on Darwin, but that ultimately would have required
at least one more linkname between runtime and syscall to avoid
racing with fork and opening the pipe, so, not.
Fixes #61768.
Change-Id: I0e8dd4abf9a606a3ff73fc37c3bd75f55924e07e
Reviewed-on: https://go-review.googlesource.com/c/go/+/518836
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Michael Knyszek <mknyszek@google.com>
Than McIntosh [Wed, 9 Aug 2023 12:50:41 +0000 (08:50 -0400)]
internal/coverage: separate out cmd defs to separate package
Relocate the definitions in cmddefs.go (used by the compiler and
the cover tool) to a separate package "covcmd". No change
in functionality, this is a pure refactoring, in preparation
for a subsequent change that will require updating the
imports for the package.
Change-Id: Ic1d277c94d9a574de0a11ec5ed77e892302b9a47
Reviewed-on: https://go-review.googlesource.com/c/go/+/517696
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Than McIntosh <thanm@google.com>
Run-TryBot: Than McIntosh <thanm@google.com> Reviewed-by: David Chase <drchase@google.com>
Joel Sing [Fri, 11 Aug 2023 10:19:59 +0000 (20:19 +1000)]
runtime/cgo: rename crosscall_386 to crosscall1 and standardise API
Most architectures have a crosscall1 function that takes a function
pointer, a setg_gcc function pointer and a g pointer. However,
crosscall_386 only takes a function pointer and the call to setg_gcc
is performed in the thread entry function.
Rename crosscall_386 to crosscall1 for consistency with other
architectures, as well as standardising the API - while not strictly
necessary, it will allow for further deduplication as the calling
code becomes more consistent.
Change-Id: I77cf42e1e15e0a4c5802359849a849c32cebd92f
Reviewed-on: https://go-review.googlesource.com/c/go/+/518618
TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Joel Sing <joel@sing.id.au> Reviewed-by: Ian Lance Taylor <iant@google.com>
Joel Sing [Fri, 11 Aug 2023 09:58:26 +0000 (19:58 +1000)]
runtime/cgo: rename crosscall_amd64 to crosscall1
This reduces inconsistency with other architectures and will allow
for further code deduplication.
Change-Id: I5becbf29af2ef714974b5e338f869281f2b4de8e
Reviewed-on: https://go-review.googlesource.com/c/go/+/518617 Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Joel Sing <joel@sing.id.au>
TryBot-Result: Gopher Robot <gobot@golang.org>
Matthew Dempsky [Fri, 11 Aug 2023 19:04:22 +0000 (12:04 -0700)]
cmd/compile: simplify asmhdr and plugin exports handling
This CL removes a bunch of obsolete code, which made the overall
possible data flow of the compiler much harder to understand. In
particular, it:
1. Removes typecheck.Declare by inlining its only two remaining uses,
and simplifying them down to just the couple of relevant assignments
for each remaining caller.
2. Renames ir.Package.{Asms,Exports} to {AsmHdrDecls,PluginExports},
respectively, to better describe what they're used for. In particular,
PluginExports now actually holds only the subset of Exports that used
to be confusingly called "ptabs" in package reflectdata.
3. Renames reflectdata.WriteTabs to reflectdata.WritePluginTable, to
make it clearer what it does.
4. Removes the consistency checks on len(Exports) and len(ptabs),
since now it's plainly obvious that only the unified importer ever
appends to PluginExports.
Change-Id: Iedc9d0a4e7648de4e734f7e3e7df302580fed542
Reviewed-on: https://go-review.googlesource.com/c/go/+/518757 Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Keith Randall [Fri, 11 Aug 2023 04:09:33 +0000 (21:09 -0700)]
cmd/compile: separate out unsafe mark for end-of-block instructions
Even if a block is empty, we need to keep track of whether the
end-of-block instructions are preemptible.
This CL allows us to not mark the load+compare in instruction
sequences like
CMPL $0, runtime·writeBarrier(SB)
JEQ ...
Before, we had to mark the CMPL as uninterruptible because there
was no way to mark just the JEQ. Now there is, so there is no need
to mark the CMPL itself.
Change-Id: I4c27c0dc211c03b14637d420899cd2c2cccf3493
Reviewed-on: https://go-review.googlesource.com/c/go/+/518539 Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Keith Randall <khr@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>
Matthew Dempsky [Wed, 9 Aug 2023 15:39:47 +0000 (08:39 -0700)]
cmd/compile: cleanup ir.Package
Decls used to contain initializer statement for package-level
variables, but now it only contains ir.Funcs. So we might as well
rename it to Funcs and tighten its type to []*ir.Func.
Similarly, Externs always contains *ir.Names, so its type can be
constrained too.
Change-Id: I85b833e2f83d9d3559ab0ef8ab5d8324f4bc37b6
Reviewed-on: https://go-review.googlesource.com/c/go/+/517855 Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Matthew Dempsky [Wed, 9 Aug 2023 11:05:35 +0000 (04:05 -0700)]
cmd/compile: move early deadcode into unified writer
This CL moves the early deadcode elimination pass into the unified
writer. This allows shrinking the export data, by simplifying
expressions and removing unreachable statements. It also means we
don't need to repeatedly apply deadcode elimination on inlined calls
or instantiated generics.
Change-Id: I19bdb04861e50815fccdab39790f4aaa076121fd
Reviewed-on: https://go-review.googlesource.com/c/go/+/517775 Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Auto-Submit: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Than McIntosh <thanm@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Russ Cox [Thu, 10 Aug 2023 03:47:27 +0000 (23:47 -0400)]
cmd/distpack: include directory entries in tar files
Various tools expect tar files to contain entries for directories.
I dropped them when writing cmd/distpack because they're not
strictly necessary and omitting them saves space, but it also
turns out to break some things, so add them back.
We will backport this to release-branch.go1.21 so that Go 1.21.1
will include the directory entries. We can't do anything about
Go 1.21.0 retroactively.
% tar tzvf go1.22rsc1.src.tar.gz | sed 10q
drwxr-xr-x 0 0 0 0 Aug 10 10:07 go/
-rw-r--r-- 0 0 0 1337 Aug 10 10:07 go/CONTRIBUTING.md
-rw-r--r-- 0 0 0 1479 Aug 10 10:07 go/LICENSE
-rw-r--r-- 0 0 0 1303 Aug 10 10:07 go/PATENTS
-rw-r--r-- 0 0 0 1455 Aug 10 10:07 go/README.md
-rw-r--r-- 0 0 0 419 Aug 10 10:07 go/SECURITY.md
-rw-r--r-- 0 0 0 42 Aug 10 10:07 go/VERSION
drwxr-xr-x 0 0 0 0 Aug 10 10:07 go/api/
-rw-r--r-- 0 0 0 1142 Aug 10 10:07 go/api/README
-rw-r--r-- 0 0 0 35424 Aug 10 10:07 go/api/except.txt
% tar tzvf go1.22rsc1.darwin-amd64.tar.gz | sed 10q
drwxr-xr-x 0 0 0 0 Aug 10 10:07 go/
-rw-r--r-- 0 0 0 1337 Aug 10 10:07 go/CONTRIBUTING.md
-rw-r--r-- 0 0 0 1479 Aug 10 10:07 go/LICENSE
-rw-r--r-- 0 0 0 1303 Aug 10 10:07 go/PATENTS
-rw-r--r-- 0 0 0 1455 Aug 10 10:07 go/README.md
-rw-r--r-- 0 0 0 419 Aug 10 10:07 go/SECURITY.md
-rw-r--r-- 0 0 0 42 Aug 10 10:07 go/VERSION
drwxr-xr-x 0 0 0 0 Aug 10 10:07 go/api/
-rw-r--r-- 0 0 0 1142 Aug 10 10:07 go/api/README
-rw-r--r-- 0 0 0 35424 Aug 10 10:07 go/api/except.txt
%
Russ Cox [Thu, 10 Aug 2023 15:56:53 +0000 (11:56 -0400)]
time: make time.Since a few nanoseconds faster
time.Since(base) is an idiom that can be used to read the system
monotonic time as efficiently as possible, when that matters.
The current code structure adds a few nanoseconds on top of
the 15-20ns the time read already takes. Remove those few.
After this CL, there is no reason at all for anyone to
//go:linkname runtime.nanotime1 instead.
Came up while investigating #61765.
Change-Id: Ic9e688af039babfc2a5a8e67dcbb02847a5eb686
Reviewed-on: https://go-review.googlesource.com/c/go/+/518336
TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Damien Neil <dneil@google.com>
Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Joseph Tsai <joetsai@digital-static.net>
Change-Id: Iab170943e6e80ffe08bb061e563c106b53740372
GitHub-Last-Rev: 2964e03f1fbc499247bb6c3365475a91ef64547a
GitHub-Pull-Request: golang/go#61828
Reviewed-on: https://go-review.googlesource.com/c/go/+/516875
TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@google.com> Reviewed-by: Michael Knyszek <mknyszek@google.com>
Change-Id: I9e95806116a8547ec782f66226d1b1382c6156de
GitHub-Last-Rev: 5b4ce994c162775e91aa00c942571bc0ac8b1eca
GitHub-Pull-Request: golang/go#61829
Reviewed-on: https://go-review.googlesource.com/c/go/+/516895
Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com>
Michael Matloob [Wed, 26 Jul 2023 18:09:06 +0000 (14:09 -0400)]
cmd/go: enter vendor mode depending on new modules.txt workspace line
modules.txt gets a new ## workspace line at the start of the file if
it's generated in workspace mode. Then, when deciding whether the go
command runs in mod=vendor, we only do so if we're in the same mode
(workspace or not) as the modules.txt specifies.
Keith Randall [Wed, 9 Aug 2023 22:49:48 +0000 (15:49 -0700)]
cmd/compile: ensure write barrier branches get marked uninterruptible
The branch itself can't be marked, so we ensure we mark the last
ssa.Value in the block as uninterruptible, because that's where the
branch ends up getting its uninterruptibility from.
This is somewhat conservative, as we're marking an instruction as
uninterruptible that doesn't need to be. But it is an easy fix.
TODO: figure out a test
Change-Id: Icd314f0bbdce8f80019bafb9e861baca4e7ecbb1
Reviewed-on: https://go-review.googlesource.com/c/go/+/518055
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Michael Knyszek <mknyszek@google.com>
Split out the code that computes the initial inline "hairyness" budget
for a function so that it can be reused (in a later patch). This is a
pure refactoring; no change in compiler functionality.
Change-Id: I9b1b7b10a7c480559b837492b10eb08771b7a145
Reviewed-on: https://go-review.googlesource.com/c/go/+/514795
Run-TryBot: Than McIntosh <thanm@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Keith Randall <khr@golang.org>
Rename the ir-local function "reassigned" to "Reassigned" so that it
can be used as part of inline heuristic analysis. Fix up the header
comment along that way, which had some stale material. Add support for
detecting reassignments via OASOP (as opposed to just simple
assignments).
Updates #61502.
Change-Id: I50f40f81263c0d7f61f30fcf0258f0b0f93acdca
Reviewed-on: https://go-review.googlesource.com/c/go/+/511560 Reviewed-by: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Than McIntosh <thanm@google.com>
Than McIntosh [Thu, 29 Jun 2023 19:37:26 +0000 (15:37 -0400)]
cmd/compile/internal/inline: add framework to compute func "properties"
Add some machinery to support computing function "properties" for use
in driving inlining heuristics, and a unit testing framework to check
to see if the property computations are correct for a given set of
canned Go source files. This CL is mainly the analysis skeleton and a
testing framework; the code to compute the actual props will arrive in
a later patch.
Updates #61502.
Change-Id: I7970b64f713d17d7fdd7e8e9ccc7d9b0490571bf
Reviewed-on: https://go-review.googlesource.com/c/go/+/511557 Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Than McIntosh <thanm@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Than McIntosh [Thu, 29 Jun 2023 17:43:50 +0000 (13:43 -0400)]
cmd/compile: function "property" defs for inl heuristics
Add definitions for a set of Go function "properties" intended to be
useful for driving inlining decisions. This CL just defines a set of
flags and a container to hold them; a subsequent CL will add code to
compute the properties for a function given its IR/AST representation.
Updates #61502.
Change-Id: Ifa26c1ad055c02ca0ce9cf37078cee7b3385e18a
Reviewed-on: https://go-review.googlesource.com/c/go/+/511556
TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Than McIntosh <thanm@google.com> Reviewed-by: Than McIntosh <thanm@google.com>
Bryan C. Mills [Wed, 9 Aug 2023 21:22:20 +0000 (17:22 -0400)]
cmd/go/internal/web: remove a redundant return value
The URL return value from the fetch helper in web.get was always
either the passed in URL (on success) or nil (on failure).
Remove it to reduce code complexity.
This flag is not terribly useful with the go command, which will pass
all environment variables through to subprocesses it invokes,
but it can be useful in other build systems, notably blaze and bazel,
to pass compiler-debugging variables like GOSSAFUNC through to
the compiler.
We have been maintaining this as a patch against Google's internal
toolchain for many years, and it has proven useful in those non-go-command
contexts.
Bryan C. Mills [Thu, 10 Aug 2023 14:39:58 +0000 (10:39 -0400)]
os: define TestIssue60181 only on Unix platforms
In CL 517755 the test was added in the unconstrained os_test.go
because it appeared to be portable, but it turned out not to be
valid on plan9.
(The build error was masked on the misc-compile TryBots by #61923.)
Although the test can also compile and run on Windows, the bug it
checks for is specific to Linux and only really needs to run there, so
I am moving it to os_unix_test.go instead of adding yet another test
file for “Unix and Windows but not Plan 9”.
Andy Pan [Wed, 9 Aug 2023 13:13:50 +0000 (21:13 +0800)]
syscall: avoid setting O_NONBLOCK needlessly by checking flags beforehand
Change-Id: I097a2941f1d1a7fd98ccf1534940d03f47ac3229
Reviewed-on: https://go-review.googlesource.com/c/go/+/517675
Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Michael Knyszek <mknyszek@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>
Run-TryBot: Andy Pan <panjf2000@gmail.com>
Ian Lance Taylor [Thu, 10 Aug 2023 00:46:00 +0000 (17:46 -0700)]
archive/tar: correct value passed to Uname method
For #50102
Change-Id: I28b5579611b07952b6379bc4603daf29a86a3be0
Reviewed-on: https://go-review.googlesource.com/c/go/+/518056
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: Joseph Tsai <joetsai@digital-static.net>
TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Tianon Gravi (Andrew) <admwiggin@gmail.com> Reviewed-by: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: qiulaidongfeng <2645477756@qq.com> Reviewed-by: Joseph Tsai <joetsai@digital-static.net>
Tobias Klauser [Wed, 9 Aug 2023 14:51:10 +0000 (16:51 +0200)]
os: test that copying to append-only files doesn't fail on Linux
Before CL 494915, this test would fail on Linux in io.Copy with error
"write /dev/stdout: copy_file_range: bad file descriptor" because the
copy_file_range syscall doesn't support destination files opened with
O_APPEND, see
https://man7.org/linux/man-pages/man2/copy_file_range.2.html#ERRORS
Michael Matloob [Mon, 7 Aug 2023 21:03:43 +0000 (17:03 -0400)]
cmd/go: fix missing case checking for empty slice
When we were comparing the first element of import stacks when sorting
depserrors we checked if the first stack was non empty, but not the
second one. Do the check for both stacks.
Matthew Dempsky [Wed, 9 Aug 2023 16:04:37 +0000 (09:04 -0700)]
cmd/compile: keep all open-coded defer slots as used
Open-coded defer slots are assigned indices upfront, so they're
logically like elements in an array. Without reassigning the indices,
we need to keep all of the elements alive so their relative offsets
are correct.
Fixes #61895.
Change-Id: Ie0191fdb33276f4e8ed0becb69086524fff022b2
Reviewed-on: https://go-review.googlesource.com/c/go/+/517856 Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
qmuntal [Tue, 8 Aug 2023 13:31:43 +0000 (15:31 +0200)]
os: make MkdirAll support volume names
MkdirAll fails to create directories under root paths using volume
names (e.g. //?/Volume{GUID}/foo). This is because fixRootDirectory
only handle extended length paths using drive letters (e.g. //?/C:/foo).
This CL fixes that issue by also detecting volume names without path
separator.
Change-Id: I7658f2f1716f74b4ff0b4b9f8ccd386e99dd9d51
GitHub-Last-Rev: f55b84dafb646fbfc0e4d0824d28d0dbf27e56c3
GitHub-Pull-Request: golang/go#61831
Reviewed-on: https://go-review.googlesource.com/c/go/+/516935 Reviewed-by: Michael Knyszek <mknyszek@google.com>
Auto-Submit: Ian Lance Taylor <iant@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>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Matthew Dempsky [Wed, 9 Aug 2023 08:19:38 +0000 (01:19 -0700)]
internal/bisect: fix PrintMarker and examples
PrintMarker was printing 50 NUL bytes before the marker.
Also, the examples for writing your own ShouldEnable helper suggest
"if m == nil { return false }", but this is inconsistent with how
Matcher.ShouldEnable handles nil pointers.
Change-Id: Ie45075ba7fb8fcc63eadce9d793a06ef0c8aa9f6
Reviewed-on: https://go-review.googlesource.com/c/go/+/517615
TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Ian Lance Taylor [Tue, 8 Aug 2023 19:49:48 +0000 (12:49 -0700)]
runtime/cgo: use frame address to set g0 stack bound
This extends CL 419434 to all Unix targets. Rather than repeating
the code, pull all the similar code into a single function.
CL 419434 description:
For a cgo binary, at startup we set g0's stack bounds using the
address of a local variable (&size) in a C function x_cgo_init and
the stack size from pthread_attr_getstacksize. Normally, &size is
an address within the current stack frame. However, when it is
compiled with ASAN, it may be instrumented to __asan_stack_malloc_0
and the address may not live in the current stack frame, causing
the stack bound to be set incorrectly, e.g. lo > hi.
Using __builtin_frame_address(0) to get the stack address instead.
Change-Id: I914a09d32c66a79515b6f700be18c690f3c0c77b
Reviewed-on: https://go-review.googlesource.com/c/go/+/517335 Reviewed-by: Russ Cox <rsc@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Damien Neil [Mon, 7 Aug 2023 22:57:54 +0000 (15:57 -0700)]
net/http: sanitize User-Agent header in request writer
Apply the same transformations to the User-Agent header value that we
do to other headers.
Avoids header and request smuggling in Request.Write and
Request.WriteProxy. RoundTrip already validates values in
Request.Header, and didn't allow bad User-Agent values to
make it as far as the request writer.
Fixes #61824
Change-Id: I360a915c7e08d014e0532bd5af196a5b59c89395
Reviewed-on: https://go-review.googlesource.com/c/go/+/516836 Reviewed-by: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Damien Neil <dneil@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Ian Lance Taylor [Tue, 1 Aug 2023 19:37:15 +0000 (12:37 -0700)]
database/sql: use reflect.TypeFor for known types
For #60088
Change-Id: Ib05ba3d456b22f7370459037b3d263c4b3ebe3b1
Reviewed-on: https://go-review.googlesource.com/c/go/+/514975 Reviewed-by: Daniel Theophanes <kardianos@gmail.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Michael Knyszek <mknyszek@google.com>