The gofrontend code mishandled this case, so add it to the test.
Change-Id: I183b8fab57552320b04c4826c590b7c6d36b6548
Reviewed-on: https://go-review.googlesource.com/c/go/+/358836
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
Const strings can be marked readonly. This is particularly
important for this relatively large table (88kb).
This is a follow-up to CL 315189.
The generation script is a bit awkward. It needs access to crypto/elliptic
internals, but also needs to be package main. Work around this by
exporting those internals with the "tablegen" build tag.
This requires changing the function signature at the Go-asm bridge.
As long as we're here, shrink the point argument type as well;
the net result is three fewer words of params.
Performance impact is probably noise.
name old time/op new time/op delta
ScalarBaseMult/P256-8 11.4µs ± 2% 11.3µs ± 1% -1.32% (p=0.000 n=19+16)
ScalarBaseMult/P224-8 579µs ± 1% 577µs ± 0% -0.30% (p=0.024 n=19+20)
ScalarBaseMult/P384-8 2.31ms ± 4% 2.34ms ± 4% +1.25% (p=0.033 n=20+20)
ScalarBaseMult/P521-8 1.33ms ± 0% 1.33ms ± 1% ~ (p=0.173 n=18+17)
ScalarMult/P256-8 42.7µs ± 0% 42.7µs ± 2% ~ (p=0.989 n=20+20)
ScalarMult/P224-8 579µs ± 0% 579µs ± 0% ~ (p=0.538 n=19+18)
ScalarMult/P384-8 2.32ms ± 3% 2.34ms ± 5% ~ (p=0.235 n=19+20)
ScalarMult/P521-8 1.33ms ± 1% 1.34ms ± 2% ~ (p=0.141 n=17+20)
Change-Id: I3bee56df34ae61ca8829791d2e67e058ecc8ddbe
Reviewed-on: https://go-review.googlesource.com/c/go/+/339591
Trust: Josh Bleecher Snyder <josharian@gmail.com>
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Roland Shoemaker <roland@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Make the input match gofmt's output,
to make our lives easier as we phase out
old style build tags.
Change-Id: I95dc5a77058bf17cb02e289703f60784616db006
Reviewed-on: https://go-review.googlesource.com/c/go/+/358934
Trust: Josh Bleecher Snyder <josharian@gmail.com>
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
If we receive an async signal while running in the VDSO, such as a
SIGABRT or SIGSEGV sent from another process, we fail to print the
stacktrace with "runtime: unknown pc <vdso PC>".
We already have machinery to handle SIGPROF in the VDSO, but it isn't
hooked up for other signals. Add it to the general signal traceback
path.
This case is covered by TestSegv by making the test more strict w.r.t.
accepted output.
Fixes#47537
Change-Id: I755585f70e0c23e207e135bc6bd2aa68298e5d24
Reviewed-on: https://go-review.googlesource.com/c/go/+/339990
Trust: Michael Pratt <mpratt@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
CL 64070 removed lockOSThread from the cgocall path, but didn't update
the signal-in-cgo detection in sighandler. As a result, signals that
arrive during a cgo call are treated like they arrived during Go
execution, breaking the traceback.
Update the cgo detection to fix the backtrace.
Fixes#47522
Change-Id: I61d77ba6465f55e3e6187246d79675ba8467ec23
Reviewed-on: https://go-review.googlesource.com/c/go/+/339989
Trust: Michael Pratt <mpratt@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Unlike what the comment says, the GC can see this pointer.
Might as well make it a real pointer, even though ^uintptr(0)
isn't currently causing problems.
Removed the comment about GC not seeing the pointer.
Change-Id: I04bc1fd4848698bec6afb79bd5fda671dfc9a073
Reviewed-on: https://go-review.googlesource.com/c/go/+/241661
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: Colin Arnott <colin@urandom.co.uk>
Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Keith Randall <khr@golang.org>
_g_, _p_, and _m_ are primarily vestiges of the C version of the
runtime, while today we prefer Go-style variable names (generally gp,
pp, and mp).
This change replaces all remaining uses of _m_ with mp. There are very
few remaining and all replacements are trivial.
[git-generate]
cd src/runtime
rf 'mv canpanic._m_ canpanic.mp'
GOOS=solaris \
rf 'mv semasleep._m_ semasleep.mp'
GOOS=aix GOARCH=ppc64 \
rf 'mv semasleep._m_ semasleep.mp'
Change-Id: I83690f7b4d4dc57557963100e9a2560ff343f3e8
Reviewed-on: https://go-review.googlesource.com/c/go/+/307813
Trust: Michael Pratt <mpratt@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
There were two main outer switch statements in node() that can just be
combined. Also, for simplicity, changed an IsCmp() conditional into just
another case in the switch statement.
Also, the inner OCALL switch statement had a bunch of fairly duplicate
cases. Combined the cases that all had no special semantics, into a
single default case calling transformCall().
In the OCALL case in dictPass(), got rid of a check for OFUNCINST (which
will always have been removed by this point). Also, eliminated an assert
that could cause unneded failures. transformCall() should always be
called if the node op is still OCALL, so no need to assert on the ops of
call.X.
Added an extra test in issue47078.go, to explicitly check for case where
the X argument of a call is a DOTTYPE.
Change-Id: Ifb3f812ce12820a4ce08afe2887f00f7fc00cd2f
Reviewed-on: https://go-review.googlesource.com/c/go/+/358596
Trust: Dan Scales <danscales@google.com>
Run-TryBot: Dan Scales <danscales@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Only Git and Mercurial are supported for now.
This CL also:
- Skips tagging "revision" and "committime" for empty repositories.
- Stores the full Mercurial changeset ID instead of the short form.
Fixes#37475
Change-Id: I62ab7a986d1ddb2a0e7166a6404b5aa80c2ee387
Reviewed-on: https://go-review.googlesource.com/c/go/+/356251
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Trust: Bryan C. Mills <bcmills@google.com>
Trust: Michael Matloob <matloob@golang.org>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Update the documentation in iexport.go to use the word 'Constraint'
rather than 'Bound', and to account for recent changes to the export
format.
Change-Id: I83fbcd336d5f865af804bc8bef4f5d997cd9f325
Reviewed-on: https://go-review.googlesource.com/c/go/+/358547
Trust: Robert Findley <rfindley@google.com>
Trust: Dan Scales <danscales@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dan Scales <danscales@google.com>
Pull in CL 358034 (and some more changes with passing tests) with:
go get -d golang.org/x/tools@f916b54
go mod tidy
go mod vendor
This teaches x/tools/cmd/bundle and the package loader it uses about
the new export data version.
Fixes#49159.
Change-Id: Icc36e77e602b1cd2da03708f20d05a66fcf693cd
Reviewed-on: https://go-review.googlesource.com/c/go/+/358620
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
CR bits and CR fields should be treated separately. Some instructions
modify an entire CR, a CR field, or a single CR bit.
Add a new argument class for CR bits, and teach the assembler the
recognize them as names like CR0LT or CR2SO, and update the CR
bit logic instructions to use them. They will no longer accept
register field (CRn) type arguments.
Fixes#46422
Change-Id: Iaba127d88abada0c2a49b8d3b07a976180565ae4
Reviewed-on: https://go-review.googlesource.com/c/go/+/357774
Run-TryBot: Paul Murphy <murp@ibm.com>
Trust: Lynn Boger <laboger@linux.vnet.ibm.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Add utimensat as a wrapper around the libc function of the same name.
utimensat was added in macOS 10.13 which is the minimum supported
release since Go 1.17 dropped support for macOS 10.12.
This also allows to drop the fallback to setattrlistTimes which was
used to set timestamps with nanosecond resolution before utimensat could
be used, see #22528 and CL 74952.
Updates #22528
Change-Id: I87b6a76acf1d642ceede9254f7d9d06dddc3fd71
Reviewed-on: https://go-review.googlesource.com/c/go/+/358274
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Use fcntl(oldfd, F_DUP2FD_CLOEXEC, newfd) to duplicate the file
descriptor and mark is as close-on-exec instead of dup2 & fcntl.
Illumos implements dup3 like this in libc.
Change-Id: I9782bce553ffb832e9b1a12bbf3c0a40c821f56e
Reviewed-on: https://go-review.googlesource.com/c/go/+/358374
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
These are the runtime support functions for letting Go code interoperate
with the C/C++ address sanitizer. Calls to asanread/asanwrite are now
inserted by the compiler with the -asan option. Calls to
asanunpoison/asanpoison will be from other runtime functions in a
subsequent CL.
Updates #44853.
Change-Id: I9e8fc0ce937828bc7f4a8b6637453ddc3862c47b
Reviewed-on: https://go-review.googlesource.com/c/go/+/298613
Trust: fannie zhang <Fannie.Zhang@arm.com>
Run-TryBot: fannie zhang <Fannie.Zhang@arm.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
The -asan option compiles Go code to use the address sanitizer. This is
intended for use when linking with C/C++ code compiled with -fsanitize=address.
When memory blocks are passed back and forth between C/C++ and Go, code in
both languages will agree as to whether the memory is validly allocated or not,
and will report errors for any use of invalid memory.
Updates #44853.
Change-Id: I0209002ef795cc1c823daae557fb80c906158db3
Reviewed-on: https://go-review.googlesource.com/c/go/+/298612
Trust: fannie zhang <Fannie.Zhang@arm.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
For MOVK/MOVN/MOVZ instructions, the assembler does not accept zero
shifts, and the CL 275812 added the error check. This CL adds this
restriction to the document.
Change-Id: I8818d76ca2f11dade2307f3678ca521f4e64d164
Reviewed-on: https://go-review.googlesource.com/c/go/+/312210
Trust: fannie zhang <Fannie.Zhang@arm.com>
Run-TryBot: fannie zhang <Fannie.Zhang@arm.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Remove a unnecessary statement in the test function, the variables
aren't checked afterwards. Also remove return statements in helper
functions and remove the declaration that a the helper function return a
value. The return value isn't used in the current state of code
Change-Id: I5bc384104c1002c4138e0894938778ae9710ce4d
Reviewed-on: https://go-review.googlesource.com/c/go/+/358714
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
Trust: Ian Lance Taylor <iant@golang.org>
When adding a large constant to a register we generate two adds,
we may generate two ADD instructions if the constant does not fit
in one ADD but does fit in two. This is generally fine except that
if the target register is SP (such as in function prologues or
epilogues for functions with large frames), this creates an
intermediate state that the SP is not 0 nor the full frame size.
For signal safety (preemption signal and profiling signal) we
require that the frame is either not created at all or fully
created, meaning that the SP must be written in a single
instruction. Splitting to two adds breaks the requirement. So not
splitting it.
(We could mark such instructions not async-preemptible. But
profiling signal can still cause problems.)
(We could generate "ADD $c1, SP, Rtmp; ADD $c2; Rtmp; SP" to save
an instruction if that is desired, while still ensuring that SP
is written in a single instruction.)
May fix flaky failures like https://build.golang.org/log/11537ec020a902b0ec0fc065f61161b729eb9880
Change-Id: I5cf38a6a028afe01aa3b6eeb163487bbd504b64f
Reviewed-on: https://go-review.googlesource.com/c/go/+/358436
Trust: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
Reviewed-by: Joel Sing <joel@sing.id.au>
TryBot-Result: Go Bot <gobot@golang.org>
Bump the export version to a new value iexportVersionGo1_18 (2). This
will give a better error message when old compilers/tools encounter the
new export format (that includes parameterized types and functions).
We are also making a breaking change in the format:
- a 'kind' byte is added to constant values
Also updated tinter() to pass the implicit bit through during type
substitution.
Tested that all tests still pass if the iexportVersionCurrent is changed
back to 1 in typecheck/iexport.go, iimporter/iimport.go, and
gcimporter/iimport.go
Updates #47654
Change-Id: I1dbeb167a97f6c7e0b7e0c011d6bada5db312b36
Reviewed-on: https://go-review.googlesource.com/c/go/+/357049
Run-TryBot: Dan Scales <danscales@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
Trust: Dan Scales <danscales@google.com>
The -asan option causes the compiler to add instrumentation for the
C/C++ address sanitizer. Every memory read/write will be replaced
by a call to asanread/asanwrite.
This CL also inserts asan instrumentation during SSA building.
This CL passes tests but is not usable by itself. The actual
implementation of asanread/asanwrite in the runtime package, and
support for -asan in the go tool and tests, will follow in subsequent
CLs.
Updates #44853.
Change-Id: Ia18c9c5d5c351857420d2f6835f0daec2ad31096
Reviewed-on: https://go-review.googlesource.com/c/go/+/298611
Trust: fannie zhang <Fannie.Zhang@arm.com>
Run-TryBot: fannie zhang <Fannie.Zhang@arm.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
We want to set a finalizer on splicePipe, so make it large enough to
not use the tiny allocator. Otherwise the finalizer will not run until
the rest of the tiny allocation can be freed. This only matters on
32-bit systems.
Fixes#48968
Change-Id: I8eb3c9f48fdccab7dc79c5b918d4257b6151ee91
Reviewed-on: https://go-review.googlesource.com/c/go/+/358114
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Generic function symbols sometimes have % in them, like:
main.B2[%2eshape.string_0].m2·f
Which confuses this code because it doesn't esacpe % when
using this string as a format string, instead of a format argument.
Or could we get rid of the . -> %2e rewrite somehow?
I think it comes from LinkString.
Change-Id: I3275501f44cf30485e9d4577e0dfa77996d4939e
Reviewed-on: https://go-review.googlesource.com/c/go/+/357837
Trust: Keith Randall <khr@golang.org>
Trust: Dan Scales <danscales@google.com>
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dan Scales <danscales@google.com>
The method of using references to dictionaries to hold methods
live during linker deadcode elimination wasn't working very well.
I implemented a new scheme in the CL below this, so this CL strips
out the old method.
The new method has the added benefit of having 0 runtime overhead
(unlike the stuff we're ripping out here, which does have a small overhead).
Update #48047
Change-Id: I68ac57119792d53c58f1480f407de6ab2bb53211
Reviewed-on: https://go-review.googlesource.com/c/go/+/357836
Trust: Keith Randall <khr@golang.org>
Trust: Dan Scales <danscales@google.com>
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dan Scales <danscales@google.com>
We don't need it any more, after CL 357835.
Change-Id: I1ff5f24b5540c3e80c4b35be8215a1c378952274
Reviewed-on: https://go-review.googlesource.com/c/go/+/357894
Trust: Keith Randall <khr@golang.org>
Trust: Dan Scales <danscales@google.com>
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dan Scales <danscales@google.com>
To capture the fact that a method was called on a generic interface,
so we can make sure the linker doesn't throw away any implementations
that might be the method called.
See the comment in reflect.go for details.
Fixes#49049
Change-Id: I0be74b6e727c1ecefedae072b149f59d539dc1e9
Reviewed-on: https://go-review.googlesource.com/c/go/+/357835
Trust: Keith Randall <khr@golang.org>
Trust: Dan Scales <danscales@google.com>
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Dan Scales <danscales@google.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
On wasm, the wasm_exec.js helper passes the command line arguments and
environment variables via a reserved space in the wasm linear memory.
Increase this reserved space from 4096 to 8192 bytes so more environment
variables can fit into the limit.
Later, after https://golang.org/cl/350737 landed, we can switch to the
WASI interface for getting the arguments and environment. This would
remove the limit entirely.
Fixes#49011
Change-Id: I48a6e952a97d33404ed692c98e9b49c5cd6b269b
Reviewed-on: https://go-review.googlesource.com/c/go/+/358194
Trust: Richard Musiol <neelance@gmail.com>
Run-TryBot: Richard Musiol <neelance@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Previously, the test would panic if the short timeout
was reached before fuzzing began. Increasing the
timeout should stop this test from being flaky.
Fixes#49046
Change-Id: Iaa0b3b3e8ea29d9a42ab5fc1c801fc73fffe1675
Reviewed-on: https://go-review.googlesource.com/c/go/+/358055
Trust: Katie Hockman <katie@golang.org>
Run-TryBot: Katie Hockman <katie@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
When doing a tail call the link register is live as the callee
will directly return to the caller (of the function that does the
tail call). Don't allocate or clobber the link register.
Fixes#49032.
Change-Id: I2d60f2354e5b6c14aa285c8983a9786687b90223
Reviewed-on: https://go-review.googlesource.com/c/go/+/358435
Trust: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
In preparation for capturing the implicit interface bit in export data,
thread through the IsImplicit property from types2 into typecheck.
Change-Id: I9b46fe73de102935a127e6ececaacd76738b557e
Reviewed-on: https://go-review.googlesource.com/c/go/+/357109
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Now that we've removed the necessity for subscripts in importers, we can
effectively eliminate them from the the type parameter API by removing
them from the type string.
Change-Id: Ic4491b0dea27b0e0ce2d0636dccfaf05168ef9e5
Reviewed-on: https://go-review.googlesource.com/c/go/+/357814
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
The Content-Length was incorrectly set to 0 for ill-formed and invalid
values. In these cases, return an error.
If the Content-Length header was omitted, it was incorrectly set to 0.
In this case, set the Content-Length value to -1.
Fixes#49108
Change-Id: I24fe9a31ed5b6ddb53f2b2bd10f2c84e428823e3
Reviewed-on: https://go-review.googlesource.com/c/go/+/358134
Run-TryBot: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Trust: Brad Fitzpatrick <bradfitz@golang.org>
Trust: David Crawshaw <crawshaw@golang.org>
CL 357649 fixes inlining labeled FOR/RANGE loops,
we should do same translation for inlined SWITCH's label
Fixes#49145
Change-Id: I9a6f365f57e974271a1eb279b38e81f9b5148788
Reviewed-on: https://go-review.googlesource.com/c/go/+/358315
Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Trust: Dan Scales <danscales@google.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Dan Scales <danscales@google.com>
When running benchmarks with high -count and no tests (either at all or
filtered with -run), the time for runTests to check for tests -count
times can add a significant delay to starting benchmarks.
To avoid this delay, make runTests bail out on the second iteration if
the first found no tests to run. We expect the same tests to run every
time, so there is no reason to duplicate work.
One caveat: the testing docs do not explicitly require the same subtests
to be run on every call, so this could break tests that depend on
multiple runs to actually run all tests. I consider such tests invalid,
but some may exist.
Fixes#49050
Change-Id: I7b34f3832b31493cc089ee0555e231f4dc690154
Reviewed-on: https://go-review.googlesource.com/c/go/+/356669
Trust: Michael Pratt <mpratt@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
- change _TypeSet.hasTerms() to report if a type set has actual types
(excluding a "universe" term)
- handle empty type set type arguments correctly
- bring comments up-to-date in Checker.satisfies
Change-Id: I87f9a1096ebb21a1b08c87a9b59f400f3bc2f040
Reviewed-on: https://go-review.googlesource.com/c/go/+/358175
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
This updates the testing package documentation to reference the
specification for the benchmark format, and points users to our
standard tools for working with benchmark data. (It's somewhat
remarkable how widely used benchstat appears to be given that we don't
mention it anywhere!)
Change-Id: Idbb4416d2fde9606ea7e6c15595f3b9e6a38f3b0
Reviewed-on: https://go-review.googlesource.com/c/go/+/357589
Trust: Austin Clements <austin@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
The existing DrawMask method is generic and is therefore calling the At().RGBA() method for every pixel of the mask and the source.
Do a specific implementation when the mask is *image.Alpha (which is
common) and use use the PixOffset method to increase performances.
name old time/op new time/op delta
RGBA2-12 1.60ms ± 0% 1.13ms ± 1% -29.16% (p=0.008 n=5+5)
GenericMaskOver-12 915µs ± 4% 926µs ± 1% ~ (p=0.190 n=5+4)
RGBA64Over-12 1.53ms ± 3% 1.21ms ± 2% -20.74% (p=0.008 n=5+5)
GrayOver-12 1.36ms ± 2% 1.01ms ± 7% -26.27% (p=0.008 n=5+5)
Fixes: #46395
Change-Id: Iaeaa8cfcc6a3fe93eb19b361f3bf076e41cac5b6
Reviewed-on: https://go-review.googlesource.com/c/go/+/323749
Reviewed-by: Nigel Tao <nigeltao@golang.org>
Trust: Nigel Tao <nigeltao@golang.org>
Trust: Andrew Gerrand <adg@golang.org>
Run-TryBot: Nigel Tao <nigeltao@golang.org>
CL 358117 fixed a bug that Phi's argument wasn't updated correctly after
removing a predecessor of Block. This CL factor out the code that
updates phi argument into a Block's method, so it's easier to use,
maintain and hopefully prevent that kind of bug in the future.
Change-Id: Ie9741e19ea28f56860425089b6093a381aa10f5b
Reviewed-on: https://go-review.googlesource.com/c/go/+/357964
Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
It's only used in two places:
- The one in regalloc.go can be replaced with v.resetArgs()
- The one in rewrite.go can be open coded
and can cause wrong usage like the bug that CL 358117 fixed.
Change-Id: I125baf237db159d056fe4b1c73072331eea4d06a
Reviewed-on: https://go-review.googlesource.com/c/go/+/357965
Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
removePred and removeArg do different things. removePred moves the last
predecessor to index k, whereas removeArg slides all the args k or
greater down by 1 index.
Kind of unfortunate different behavior in things named similarly.
Fixes#49122
Change-Id: I9ae409bdac744e713f4c121f948e43db6fdc8542
Reviewed-on: https://go-review.googlesource.com/c/go/+/358117
Trust: Keith Randall <khr@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
This generalizes range clauses. Removed some dead code and cleaned
up the surrounding bits.
Change-Id: Icd8384205afa3f52b7e7df9abed5de2bb556861d
Reviewed-on: https://go-review.googlesource.com/c/go/+/357778
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
This generalizes make the same way copy was generalized and eliminates
a use of optype.
Change-Id: I8221abd53d77dde8ead47c0075c13fd2a3221642
Reviewed-on: https://go-review.googlesource.com/c/go/+/357776
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>