- 06 Mar, 2019 26 commits
-
-
Rémy Oudompheng authored
Instead of trying to guess type of constants in the AST, which is hard, use the "var cgo%d Type = Constant" so that typechecking is left to the Go compiler. The previous code could still fail in some cases for constants imported from other modules or defined in other, non-cgo files. Fixes #30527 Change-Id: I2120cd90e90a74b9d765eeec53f6a3d2cfc1b642 Reviewed-on: https://go-review.googlesource.com/c/go/+/164897 Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Bryan C. Mills authored
Otherwise, when the 'cmd' module is added the test will run as if in module 'cmd'. While we're here, remove an unnecessary os.Chdir in TestAbsolutePath: we can instead set the Dir on the 'go build' command instead. Then we can run the tests in this file in parallel with everything else. Updates #30228 Change-Id: I13ecd7ec93bc1041010daec14d76bac10e0c89be Reviewed-on: https://go-review.googlesource.com/c/go/+/165744 Run-TryBot: Bryan C. Mills <bcmills@google.com> Reviewed-by: Jay Conrod <jayconrod@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Than McIntosh authored
Test case for a panic/crash in gccgoimporter caused by incorrect gccgo export data emission. Note that the *.gox file checked in contains the correct export data; the main intent of the test is to make sure that gccgo produces the right export data when run on the Go source. Updates #30628 Change-Id: I29c0c17b81a43f92ff64fbfcdc58fdb46a5be370 Reviewed-on: https://go-review.googlesource.com/c/go/+/165739 Run-TryBot: Than McIntosh <thanm@google.com> Reviewed-by: Robert Griesemer <gri@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Keith Randall authored
They are missing a stop byte at the end. Normally this doesn't matter, but when including a GC program in another GC program, we strip the last byte. If that last byte wasn't a stop byte, then we've thrown away part of the program we actually need. Fixes #30606 Change-Id: Ie9604beeb84f7f9442e77d31fe64c374ca132cce Reviewed-on: https://go-review.googlesource.com/c/go/+/165857 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Jay Conrod authored
Fixes #28152 Change-Id: I98db923bdf8de7acf2df452313427bfea43b63c9 Reviewed-on: https://go-review.googlesource.com/c/go/+/165746 Run-TryBot: Jay Conrod <jayconrod@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Bryan C. Mills authored
When running cmd/vet/all on multiple builders, the coordinator places a copy of golang.org/x/tools at a consistent revision in the builders' GOPATHs. Keep using the consistent revision in module mode by executing the build from a working directory within that repository. When not running on a builder, use 'go vet' directly instead of building an arbitrarily stale vet tool from the user's GOPATH. Updates #30228 Change-Id: I19bc809247378da98f3e6ac8572f61bda4518143 Reviewed-on: https://go-review.googlesource.com/c/go/+/165740 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Keith Randall authored
Make sure the side effects inside short-circuited operations (&& and ||) happen correctly. Before this CL, we attached the side effects to the node itself using exprInPlace. That caused other side effects in sibling expressions to get reordered with respect to the short circuit side effect. Instead, rewrite a && b like: r := a if r { r = b } That code we can keep correctly ordered with respect to other side-effects extracted from part of a big expression. exprInPlace seems generally unsafe. But this was the only case where exprInPlace is called not at the top level of an expression, so I don't think the other uses can actually trigger an issue (there can't be a sibling expression). TODO: maybe those cases don't need "in place", and we can retire that function generally. This CL needed a small tweak to the SSA generation of OIF so that the short circuit optimization still triggers. The short circuit optimization looks for triangle but not diamonds, so don't bother allocating a block if it will be empty. Go 1 benchmarks are in the noise. Fixes #30566 Change-Id: I19c04296bea63cbd6ad05f87a63b005029123610 Reviewed-on: https://go-review.googlesource.com/c/go/+/165617 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>
-
Bryan C. Mills authored
TestGoGetInsecure verifies that 'go get -insecure' can fetch a particular package. However, the GOPROXY protocol does not provide a means for proxies to indicate packages as insecure; thus, proxies cannot safely serve those packages. Updates #30571 Change-Id: I447776dff98bd8ee6eb5055b897b9c7d293e3423 Reviewed-on: https://go-review.googlesource.com/c/go/+/165745 Run-TryBot: Bryan C. Mills <bcmills@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Bryan C. Mills authored
Relative imports do not work in module mode. Use a fully-qualified import path instead. Updates #30228 Change-Id: I0a42ffa521a7b513395e7e1788022d24cbb1f31a Reviewed-on: https://go-review.googlesource.com/c/go/+/165817 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com>
-
Bryan C. Mills authored
cmd/dist executes 'go test' within this directory, so it needs a go.mod file to tell the compiler what package path to use in diagnostic and debug information. Updates #30228 Change-Id: Ia313ac06bc0ec4631d415faa20c56cce2ac8dbc5 Reviewed-on: https://go-review.googlesource.com/c/go/+/165498 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
erifan01 authored
This change adds several arm64 v8.1 atomic instructions and test cases. They are LDADDAx, LDADDLx, LDANDAx, LDANDALx, LDANDLx, LDEORAx, LDEORALx, LDEORLx, LDORAx, LDORALx, LDORLx, SWPAx and SWPLx. Their form is consistent with the form of the existing atomic instructions. For instructions STXRx, STLXRx, STXPx and STLXPx, the second destination register can't be RSP. This CL also adds a check for this. LDADDx Rs, (Rb), Rt: *Rb -> Rt, Rs + *Rb -> *Rb LDANDx Rs, (Rb), Rt: *Rb -> Rt, Rs AND NOT(*Rb) -> *Rb LDEORx Rs, (Rb), Rt: *Rb -> Rt, Rs EOR *Rb -> *Rb LDORx Rs, (Rb), Rt: *Rb -> Rt, Rs OR *Rb -> *Rb Change-Id: I9f9b0245958cb57ab7d88c66fb9159b23b9017fd Reviewed-on: https://go-review.googlesource.com/c/go/+/157001Reviewed-by: Cherry Zhang <cherryyz@google.com> Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Wèi Cōngruì authored
fd.l.Lock shouldn't be called in a loop. Change-Id: I3afbc184aa06a60175c9a39319985b5810ecb144 Reviewed-on: https://go-review.googlesource.com/c/go/+/165598 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Wèi Cōngruì authored
Before this change, if a directory was closed twice on Windows, the returning error would be "use of closed network connection". Some code assumes FD.isFile means whether the fd isn't a network socket, which is true on Unix. But isFile reports whether the fd is a normal file rather than directory or console on Windows. With this change, isFile will have the same meaning on different platforms. And the change adds a new field kind to replace isConsole and isDir. Change-Id: Ib12265f1e12fa3d0239ae925291128a84be59cc2 GitHub-Last-Rev: 3f031756de6ce0b96c1f102ad280950f4adbf6c2 GitHub-Pull-Request: golang/go#30589 Reviewed-on: https://go-review.googlesource.com/c/go/+/165257 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Tobias Klauser authored
Use word-wise comparison for aligned buffers, otherwise fall back to the current byte-wise comparison. name old time/op new time/op delta BytesCompare/1-4 41.3ns ± 0% 36.4ns ± 1% -11.73% (p=0.008 n=5+5) BytesCompare/2-4 39.5ns ± 0% 39.5ns ± 1% ~ (p=0.960 n=5+5) BytesCompare/4-4 45.3ns ± 0% 41.0ns ± 1% -9.40% (p=0.008 n=5+5) BytesCompare/8-4 64.8ns ± 1% 44.7ns ± 0% -31.12% (p=0.008 n=5+5) BytesCompare/16-4 86.3ns ± 0% 55.1ns ± 0% -36.21% (p=0.008 n=5+5) BytesCompare/32-4 135ns ± 0% 70ns ± 1% -47.73% (p=0.008 n=5+5) BytesCompare/64-4 231ns ± 1% 99ns ± 0% -57.27% (p=0.016 n=5+4) BytesCompare/128-4 424ns ± 0% 147ns ± 0% -65.31% (p=0.000 n=4+5) BytesCompare/256-4 810ns ± 0% 243ns ± 0% -69.96% (p=0.008 n=5+5) BytesCompare/512-4 1.59µs ± 0% 0.44µs ± 0% -72.43% (p=0.008 n=5+5) BytesCompare/1024-4 3.14µs ± 1% 0.83µs ± 1% -73.56% (p=0.008 n=5+5) BytesCompare/2048-4 6.23µs ± 0% 1.61µs ± 1% -74.21% (p=0.008 n=5+5) CompareBytesEqual-4 79.4ns ± 0% 52.2ns ± 0% -34.23% (p=0.008 n=5+5) CompareBytesToNil-4 31.0ns ± 0% 30.3ns ± 0% -2.32% (p=0.008 n=5+5) CompareBytesEmpty-4 25.7ns ± 0% 25.7ns ± 0% ~ (p=0.556 n=4+5) CompareBytesIdentical-4 25.7ns ± 0% 25.7ns ± 0% ~ (p=1.000 n=5+5) CompareBytesSameLength-4 49.1ns ± 0% 48.5ns ± 0% -1.26% (p=0.008 n=5+5) CompareBytesDifferentLength-4 49.8ns ± 1% 49.3ns ± 0% -1.08% (p=0.008 n=5+5) CompareBytesBigUnaligned-4 5.71ms ± 1% 5.68ms ± 1% ~ (p=0.222 n=5+5) CompareBytesBig-4 4.95ms ± 0% 2.28ms ± 1% -53.81% (p=0.008 n=5+5) CompareBytesBigIdentical-4 27.2ns ± 1% 27.3ns ± 1% ~ (p=0.310 n=5+5) name old speed new speed delta CompareBytesBigUnaligned-4 184MB/s ± 1% 185MB/s ± 1% ~ (p=0.222 n=5+5) CompareBytesBig-4 212MB/s ± 0% 459MB/s ± 1% +116.51% (p=0.008 n=5+5) CompareBytesBigIdentical-4 38.5TB/s ± 0% 38.4TB/s ± 1% ~ (p=0.421 n=5+5) Also, this reduces time for TestCompareBytes by about 20 sec on a linux-arm builder via gomote. Updates #29001 Change-Id: I25f148739b9ccb7cb1fc97b3d8763549b0a66c16 Reviewed-on: https://go-review.googlesource.com/c/go/+/165338 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
-
Clément Chigot authored
Moduledata symbols like runtime.data or runtime.text must have the same position in the final executable (as some symbol accesses are made by offset from them). ld on AIX might move them randomly if there are nil size symbols. ld will also remove unreachable symbols like runtime.epclntab or runtime.rodata. In order to keep them, R_REF relocations are created between firstmoduledata and these symbols. This relocation tells ld to keep these symbols even if there aren't reachable. Change-Id: Ie5a28cf406977131cec6442f7f5b6fd89fb775a3 Reviewed-on: https://go-review.googlesource.com/c/go/+/164004 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Clément Chigot authored
This commit adds external linking in cmd/link for aix/ppc64. As relocations on .text data aren't possible on AIX, Segrelrodata is used to move all these datas to .data section. Change-Id: I4d1361c1fc9290e11e6f5560864460c76551dbeb Reviewed-on: https://go-review.googlesource.com/c/go/+/164003 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Motkov.Kirill authored
This commit rewrites if-else-if-else chain in scanBasePrefix function as a switch. Based on Go style guide https://golang.org/doc/effective_go.html#switch Change-Id: I6392bfd4ad0384f3dc8896de4763bb2164c3eead GitHub-Last-Rev: 9bd8dfdac03c466bf8cacf3119f6245dfb61c009 GitHub-Pull-Request: golang/go#30621 Reviewed-on: https://go-review.googlesource.com/c/go/+/165619 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Michael Stapelberg authored
Note that this particular combination of properties still fails (EPERM), but it no longer hangs. Updates #29789 Change-Id: I29b15b85a25a7acd7ae89ffc5fed074bcdfe0a12 Reviewed-on: https://go-review.googlesource.com/c/go/+/158297 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Daniel Martí authored
If the input was "John Doe", we're definitely missing "<email>", as "John Doe@domain" isn't a valid email address. However, if the input was "john.doe", it's possible that the user meant "john.doe@domain", and not just "john.doe <email>". Make it clear in the error that either could be the source of the problem. Fixes #27064. Change-Id: I1b8f1342775d711823dffc3db974898ee62d3a34 Reviewed-on: https://go-review.googlesource.com/c/go/+/165517 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Kshitij Saraogi authored
The change fixes the following deviations between the existing implementation and the Spec: 1. Using pattern instead of "mask" for assertion and iteration in the Pattern Matching Algorithm. 2. Rename "image/vnd.microsoft.icon" to "image/x-icon" and add another signature for the same. 3. Using named strings instead of hexadecimal representation in "application/zip" and "application/x-rar-compressed". 4. Reordering "sniffSignatures" in accordance with the Spec section "Identifying a resource with an unknown MIME type". In addition to the above fixes, unit tests for Image MIME type group are added. Fixes #30570 Change-Id: I97d2ae22b426c3c57bf8efd2ed9396c0be983688 Reviewed-on: https://go-review.googlesource.com/c/go/+/165277Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com> Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Agniva De Sarker authored
While parsing inside a struct or an interface, skipping over empty lines too to collect the next group of comments. We do not need to skip over more than 1 empty line since gofmt already removes multiple empty consecutive lines. Fixes #10858 Change-Id: I0c97b65b5fc44e225e5dc7871ace24f43419ce08 Reviewed-on: https://go-review.googlesource.com/c/go/+/161177 Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
-
Clément Chigot authored
TestGdbAutotmpTypes takes more than one minute due to gdb performances. Therefore, it must be skipped in short mode. Change-Id: I253ebce62264cc7367c9b0f6ce9c5088a9994641 Reviewed-on: https://go-review.googlesource.com/c/go/+/164339Reviewed-by: Bryan C. Mills <bcmills@google.com> Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Clément Chigot authored
Fixes #28558 Change-Id: I0ecd9c47fb017cf4bd44725a83a0016c7bb94633 Reviewed-on: https://go-review.googlesource.com/c/go/+/156478 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Clément Chigot authored
This commit add port of runtime/cgo for aix/ppc64. AIX assembly is different from Linux assembly, therefore gcc_ppc64.S must be redone for AIX. Change-Id: I780ebab4ef9c4ce912f4c4d521d8c135b1eebf6e Reviewed-on: https://go-review.googlesource.com/c/go/+/164002 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Chris Marchesi authored
This adds benchmarks to test file uploads using PUT requests. It's designed to complement changes https://golang.org/cl/163599 and https://golang.org/cl/163737, allowing an easy comparison of performance before and after these changes are applied. Updates #30377. Co-authored-by: Emmanuel Odeke <emm.odeke@gmail.com> Change-Id: Ib8e692c61e1f7957d88c7101669d4f7fb8110c65 GitHub-Last-Rev: 242622b4fca9f289defa2f268efc31208743e5dd GitHub-Pull-Request: golang/go#30424 Reviewed-on: https://go-review.googlesource.com/c/go/+/163862 Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com> Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
-
Rob Pike authored
And explain that it does this. A minor change probably worth mentioning, although (#28782) I'd still like to freeze this document against any substantial changes. Fix #30568. Change-Id: I74c56744871cfaf00dc52a9b480ca61d3ed19a6b Reviewed-on: https://go-review.googlesource.com/c/go/+/165597Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 05 Mar, 2019 14 commits
-
-
Agniva De Sarker authored
Currently, lineWrapper does not detect if it is printing a line comment or not. Hence, while wrapping a comment, the new line does not get prefixed with a //. We add logic to lineWrapper to detect this case and add // accordingly. Block comments do not need any such handling. Added tests for both cases. Fixes #20929 Change-Id: I656037c2d865f31dd853cf9195f43ab7c6e6fc53 Reviewed-on: https://go-review.googlesource.com/c/go/+/163578 Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
-
Austin Clements authored
Currently, the pacer assumes the goal growth ratio is always exactly GOGC/100. But sometimes this isn't the case, like when the heap is very small (limited by heapminimum). So to placate the pacer, we lie about the value of heap_marked in such situations. Right now, these two lies make a truth, but GOGC is about to get more complicated with the introduction of heap limits. Rather than introduce more lies into the system to handle this, introduce the concept of an "effective GOGC", which is the GOGC we're actually using for pacing (we'll need this concept anyway with heap limits). This commit changes the pacer to use the effective GOGC rather than the user-set GOGC. This way, we no longer need to lie about heap_marked because its true value is incorporated into the effective GOGC. Change-Id: I5b005258f937ab184ffcb5e76053abd798d542bd Reviewed-on: https://go-review.googlesource.com/c/go/+/66092 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: Rick Hudson <rlh@golang.org>
-
Austin Clements authored
Currently, the minimum sweep distance is 1MB * GOGC/100. It's been this way since it was introduced in CL 13043 with no justification. Since there seems to be no good reason to scale the minimum sweep distance by GOGC, make the minimum sweep distance just 1MB. Change-Id: I5320574a23c0eec641e346282aab08a3bbb057da Reviewed-on: https://go-review.googlesource.com/c/go/+/66091 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: Rick Hudson <rlh@golang.org>
-
Austin Clements authored
This slightly rearranges gcSetTriggerRatio to compute the goal before computing the other controls. This will simplify implementing the heap limit, which needs to control the absolute goal and flow the rest of the control parameters from this. For #16843. Change-Id: I46b7c1f8b6e4edbee78930fb093b60bd1a03d75e Reviewed-on: https://go-review.googlesource.com/c/go/+/46750 Run-TryBot: Austin Clements <austin@google.com> Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: Rick Hudson <rlh@golang.org>
-
Austin Clements authored
This was used during the implementation of concurrent runtime.GC() but now there's nothing that triggers GC unconditionally. Remove this trigger type and simplify (gcTrigger).test() accordingly. Change-Id: I17a893c2ed1f661b8146d7783d529f71735c9105 Reviewed-on: https://go-review.googlesource.com/c/go/+/66090 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: Rick Hudson <rlh@golang.org>
-
sergey authored
The following corner cases for readCookiesTests are tested now: - An extra cookie delimiter ";" at the end of a Cookie header - An empty Cookie header Change-Id: Id8028b448e4182613fb261bf0903efc98cbf4997 Reviewed-on: https://go-review.googlesource.com/c/go/+/164702Reviewed-by: Volker Dobler <dr.volker.dobler@gmail.com> Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com> Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Keith Randall authored
I missed regenerating op_string.go in CL 152537 (adding OINLMARK op). Change-Id: I929540087b817b6a1b0256c1e65341615e61ef40 Reviewed-on: https://go-review.googlesource.com/c/go/+/165359 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
-
Clément Chigot authored
With cgo, some syscalls will be called with g == nil or m == nil. SyscallX functions cannot handle them so they call an equivalent function in sys_aix_ppc64.s which will directly call this syscall. Change-Id: I6508ec772b304111330e6833e7db729200af547c Reviewed-on: https://go-review.googlesource.com/c/go/+/164001 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Daniel Martí authored
I had been finding these over a year or so, but none were big enough changes to warrant CLs. They're a handful now, so clean them all up in a single commit. The smaller bodies get a bit simpler, but most importantly, the larger bodies get unindented. Change-Id: I5707a6fee27d4c9ff9efd3d363af575d7a4bf2aa Reviewed-on: https://go-review.googlesource.com/c/go/+/165340 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Russ Cox authored
Base64-encoding 32 bytes results in a 44-byte string. While in general a 44-byte string might decode to 33 bytes, if you take a 44-byte string that actually only encodes 32 bytes, and you try to decode it into 32 bytes, that should succeed. Instead it fails trying to do a useless dst[33:] slice operation. Delete that slice operation. Noticed while preparing CL 156322. Change-Id: I8024bf28a65e2638675b980732b2ff91c66c62cf Reviewed-on: https://go-review.googlesource.com/c/go/+/164628Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Alberto Donizetti authored
Fix builder breakage from CL 148958. This is an inlining test that should be skipped on -N -l. The inlining also doesn't happen on arm and wasm, so skip the test there too. Fixes the noopt builder, the linux-arm builder, and the wasm builder. Updates #30605 Change-Id: I06b90d595be7185df61db039dd225dc90d6f678f Reviewed-on: https://go-review.googlesource.com/c/go/+/165339Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Bryan C. Mills authored
Updates #30228 Updates #30240 Updates #30241 Change-Id: Idc311ba77e99909318b5b86f8ef82d4878f73e47 Reviewed-on: https://go-review.googlesource.com/c/go/+/165378 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com>
-
Bryan C. Mills authored
Updates #30228 Updates #30241 Change-Id: I6b5f842d00ba273ed241abe55a1ea71c105ec284 Reviewed-on: https://go-review.googlesource.com/c/go/+/165377 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com>
-
Daniel Martí authored
Two additions are faster than two multiplications and one addition. The code seems simpler to me too, as it's more obvious that we advance two destination bytes for each source byte. name old time/op new time/op delta Encode/256-8 374ns ± 0% 331ns ± 0% -11.44% (p=0.008 n=5+5) Encode/1024-8 1.47µs ± 0% 1.29µs ± 0% -11.89% (p=0.004 n=6+5) Encode/4096-8 5.85µs ± 1% 5.15µs ± 0% -11.89% (p=0.004 n=6+5) Encode/16384-8 23.3µs ± 0% 20.6µs ± 0% -11.68% (p=0.004 n=6+5) Change-Id: Iabc63616c1d9fded55fa668ff41dd49efeaa2ea4 Reviewed-on: https://go-review.googlesource.com/c/go/+/151198 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: roger peppe <rogpeppe@gmail.com>
-