- 27 Feb, 2019 39 commits
-
-
Marcel van Lohuizen authored
errors.New now implements Formatter and includes Frame information that is reported when detail is requested. Partly implements proposal Issue #29934. Change-Id: Id76888d246d7d862595b5e92d517b9c03f23a7a6 Reviewed-on: https://go-review.googlesource.com/c/163557 Run-TryBot: Marcel van Lohuizen <mpvl@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Damien Neil <dneil@google.com>
-
Juraj Sukop authored
The proposed change introduces a better initial guess which is closer to the final value and therefore converges in fewer steps. Consider for example sqrt(8): previously the guess was 8, whereas now it is 4 (and the result is 2). All this change does is it computes the division by two more accurately while it keeps the guess ≥ √x. Change-Id: I917248d734a7b0488d14a647a063f674e56c4e30 GitHub-Last-Rev: c06d9d4876c8e7d6739f0e4b687e370fe1e9aad7 GitHub-Pull-Request: golang/go#28981 Reviewed-on: https://go-review.googlesource.com/c/163866 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
-
Marcel van Lohuizen authored
to be used by errors package for checking assignability and setting error values in As. Updates #29934. Change-Id: I8c1d02a2c6efa0919d54b286cfe8b4edc26da059 Reviewed-on: https://go-review.googlesource.com/c/161759 Run-TryBot: Marcel van Lohuizen <mpvl@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
-
Marcel van Lohuizen authored
Comparing errors using DeepEqual breaks if frame information is added as proposed in Issue #29934. Updates #29934. Change-Id: Ib430c9ddbe588dd1dd51314c408c74c07285e1ff Reviewed-on: https://go-review.googlesource.com/c/162179 Run-TryBot: Marcel van Lohuizen <mpvl@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org> Reviewed-by: Damien Neil <dneil@google.com>
-
Marcel van Lohuizen authored
Comparing errors using DeepEqual breaks if frame information is added as proposed in Issue #29934. Updates #29934. Change-Id: I4ef076e262109a9d6f5b18846129df2535611d71 Reviewed-on: https://go-review.googlesource.com/c/162178 Run-TryBot: Marcel van Lohuizen <mpvl@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Damien Neil <dneil@google.com> Reviewed-by: Russ Cox <rsc@golang.org>
-
Marcel van Lohuizen authored
Comparing errors using DeepEqual breaks if frame information is added as proposed in Issue #29934. Updates #29934. Change-Id: I0372883288f974998138f95f6c7c79a60f922a3e Reviewed-on: https://go-review.googlesource.com/c/162177 Run-TryBot: Marcel van Lohuizen <mpvl@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org> Reviewed-by: Damien Neil <dneil@google.com>
-
Bryan C. Mills authored
Now that these tests are written in Go, they must be run in host mode in order to be able to exec `go run` as a subprocess. Updates #30228 Change-Id: Ibedf86a8e18ae1b6f583c1bbdcb99d19c8e01744 Reviewed-on: https://go-review.googlesource.com/c/164137 Run-TryBot: Bryan C. Mills <bcmills@google.com> Reviewed-by: Elias Naur <mail@eliasnaur.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Josh Bleecher Snyder authored
Fixes #29437 Change-Id: Ice0a03a543e564d66651bfdfce5cd32ebaa35926 Reviewed-on: https://go-review.googlesource.com/c/155746 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Josh Bleecher Snyder authored
The specialized conversion functions care only about a type's layout in memory, so e.g. [1]string is equivalent to string. Add types.SoleComponent to assist with such use cases, and use it for the specialized conversion functions. Increases the number of convTstring calls by ~1%. Change-Id: I09a392909f2037387b30642781e65f707a048af5 Reviewed-on: https://go-review.googlesource.com/c/148577 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Josh Bleecher Snyder authored
name old time/op new time/op delta EfaceCmpDiff-8 421ns ± 3% 299ns ± 3% -28.93% (p=0.000 n=92+94) EfaceCmpDiffIndirect-8 497ns ± 4% 496ns ± 3% ~ (p=0.840 n=98+92) Change-Id: Id1a8c779413ba35ab0f58d055870b6a0714b51b7 Reviewed-on: https://go-review.googlesource.com/c/152163 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Elias Naur authored
Noticed by Bryan after CL 163618 went in. Change-Id: Ia33c80dca60321f6a8329097ff55118e5d2634ab Reviewed-on: https://go-review.googlesource.com/c/164042 Run-TryBot: Elias Naur <mail@eliasnaur.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Bryan C. Mills authored
Updates #30228 Updates #30241 Change-Id: I7ee839f4d2840873f7e37b3aff93fe534c6b52e6 Reviewed-on: https://go-review.googlesource.com/c/163207 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Bryan C. Mills authored
Fixes #30429 Updates #16520 Updates #20733 Change-Id: Iae41f06c09aaaed500936f5496d90cefbe8293e4 Reviewed-on: https://go-review.googlesource.com/c/164119 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Bryan C. Mills authored
These tests use runtime.GOOS and runtime.GOARCH to determine whether to run, so must be built and run using the destination's — not the host's — GOOS and GOARCH. Updates #30228 Change-Id: I6774dacd01c68b395fca8ca61f70d5879270af8a Reviewed-on: https://go-review.googlesource.com/c/164117 Run-TryBot: Bryan C. Mills <bcmills@google.com> Reviewed-by: Jay Conrod <jayconrod@google.com>
-
Bryan C. Mills authored
This test currently fails in the Android builders, with the message pkg_test.go:64: go test -short: exec: "go": executable file not found in $PATH (https://build.golang.org/log/39ec0da5bfb7793359e199cc8e358ca5a8257840) I was not able to test this change, because I can't get 'gomote create' to return an instance of anything Android. However, I will watch the build dashboard after submitting to verify that the fix works. Updates #30228 Android appears to lack a 'go' command in the. Change-Id: Ieacac7f50d19e2cfef2f5d60e79a159e55b5cfa8 Reviewed-on: https://go-review.googlesource.com/c/164097 Run-TryBot: Bryan C. Mills <bcmills@google.com> Reviewed-by: Elias Naur <mail@eliasnaur.com>
-
Bryan C. Mills authored
This should help to catch any regressions in the course of implementing #26924. Updates #26924 Change-Id: Ide28a9aa0235867e0ce72f855fbed51c50e2c2f2 Reviewed-on: https://go-review.googlesource.com/c/163520 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com>
-
Alberto Donizetti authored
Fixes #30431 Change-Id: I379e78a1c385942a19e1a10b91d732f9a73899e6 Reviewed-on: https://go-review.googlesource.com/c/164041Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Daniel Martí authored
'go env' is used for many quick operations, such as in go/packages to query GOARCH and GOMOD. It often is a bottleneck; for example, go/packages doesn't know whether or not to use Go modules until it has queried GOMOD. As such, this go command should be fast. Right now it's slower than it should be. This commit adds a simple benchmark with os/exec, since we're particularly interested in the cost of cmd/go's large init function. Updates #29382. Change-Id: Ifee6fb9997b9b89565fbfc2739a00c86117b1d37 Reviewed-on: https://go-review.googlesource.com/c/155961 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com>
-
erifan01 authored
Arm64 has a 32-bit CLZ instruction CLZW, which can be used for intrinsic Len32. Function LeadingZeros32 calls Len32, with this change, the assembly code of LeadingZeros32 becomes more concise. Go code: func f32(x uint32) { z = bits.LeadingZeros32(x) } Before: "".f32 STEXT size=32 args=0x8 locals=0x0 leaf 0x0000 00000 (test.go:7) TEXT "".f32(SB), LEAF|NOFRAME|ABIInternal, $0-8 0x0004 00004 (test.go:7) MOVWU "".x(FP), R0 0x0008 00008 ($GOROOT/src/math/bits/bits.go:30) CLZ R0, R0 0x000c 00012 ($GOROOT/src/math/bits/bits.go:30) SUB $32, R0, R0 0x0010 00016 (test.go:7) MOVD R0, "".z(SB) 0x001c 00028 (test.go:7) RET (R30) After: "".f32 STEXT size=32 args=0x8 locals=0x0 leaf 0x0000 00000 (test.go:7) TEXT "".f32(SB), LEAF|NOFRAME|ABIInternal, $0-8 0x0004 00004 (test.go:7) MOVWU "".x(FP), R0 0x0008 00008 ($GOROOT/src/math/bits/bits.go:30) CLZW R0, R0 0x000c 00012 (test.go:7) MOVD R0, "".z(SB) 0x0018 00024 (test.go:7) RET (R30) Benchmarks: name old time/op new time/op delta LeadingZeros-8 2.53ns ± 0% 2.55ns ± 0% +0.67% (p=0.000 n=10+10) LeadingZeros8-8 3.56ns ± 0% 3.56ns ± 0% ~ (all equal) LeadingZeros16-8 3.55ns ± 0% 3.56ns ± 0% ~ (p=0.465 n=10+10) LeadingZeros32-8 3.55ns ± 0% 2.96ns ± 0% -16.71% (p=0.000 n=10+7) LeadingZeros64-8 2.53ns ± 0% 2.54ns ± 0% ~ (p=0.059 n=8+10) Change-Id: Ie5666bb82909e341060e02ffd4e86c0e5d67e90a Reviewed-on: https://go-review.googlesource.com/c/157000 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
-
Daniel Martí authored
This was implemented as part of go/doc, but it's going to be useful in other packages. In particular, many packages under cmd/go like web and vcs make somewhat heavy use of global regexes, which add a non-trivial amount of init work to the cmd/go program. A lazy wrapper around regexp.Regexp will make it trivial to get rid of the extra cost with a trivial refactor, so make it possible for other packages in the repository to make use of it. While naming the package, give the members better names, such as lazyregexp.New and lazyregexp.Regexp. We're also considering adding some form of a lazy API to the public regexp package, so this internal package will allow us to get some initial experience across std and cmd. For #29382. Change-Id: I30b0e72871d5267c309786f95f4cb15c68b2393d Reviewed-on: https://go-review.googlesource.com/c/164040 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Clément Chigot authored
--whole-archive doesn't exist on AIX. It was already removed most of the time but was still added with c-archive or c-shared buildmodes. Change-Id: Ia7360638509d4a4d91674b0281ed4b112508a2c9 Reviewed-on: https://go-review.googlesource.com/c/164037 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Mikio Hara authored
This reverts commit ec521467. Reson for revert: The test cases using slowDst4 and slowDst6 are fragile. We need to find out a better approach to the trick on the IP routeability. Change-Id: I544453886e809d1c7b339673d8f1d5bdef357147 Reviewed-on: https://go-review.googlesource.com/c/163919Reviewed-by: Bryan C. Mills <bcmills@google.com> Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Agniva De Sarker authored
Fixes #29355 Change-Id: I4018d420c8d413b2681744af18ffb65da03ac504 Reviewed-on: https://go-review.googlesource.com/c/155778 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Richard Musiol <neelance@gmail.com>
-
Bryan C. Mills authored
Fixes #30088 Change-Id: I08cec17feddc86bd08532e6b135807e3c8f4c1b2 Reviewed-on: https://go-review.googlesource.com/c/161197 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
-
Clément Chigot authored
This commits adds a missing syscall and a missing structure in syscall package. Change-Id: I9d630454c56337267f7bbb023e601246e14fc929 Reviewed-on: https://go-review.googlesource.com/c/163978 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Gergely Brautigam authored
If a type switch case expression has failed typechecking, the case body is likely to also fail with confusing or spurious errors. Suppress typechecking the case body when this happens. Fixes #28926 Change-Id: Idfdb9d5627994f2fd90154af1659e9a92bf692c4 Reviewed-on: https://go-review.googlesource.com/c/158617 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
Tobias Klauser authored
Fixes #30253 Change-Id: I0c3d67649ea379b67f3575c1219fe05a04f056ae Reviewed-on: https://go-review.googlesource.com/c/162859 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
-
Tobias Klauser authored
If a PE file with invalid optional header size (neither sizeofOptionalHeader32 nor sizeofOptionalHeader64) is passed to NewFile, the File.OptionalHeader will be nil which leads to a panic in (*File).ImportedSymbols(). Fixes #30250 Change-Id: Ie97306de4a0e2dcfdc7b1b599891f574aa63adca Reviewed-on: https://go-review.googlesource.com/c/162858 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
-
Filippo Valsorda authored
Updates #30055 Change-Id: I3e79dd7592673c5d76568b0bcded6c391c3be6b3 Reviewed-on: https://go-review.googlesource.com/c/163081 Run-TryBot: Filippo Valsorda <filippo@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Adam Langley <agl@golang.org>
-
Filippo Valsorda authored
In Go 1.13 we will enable RSA-PSS in TLS 1.2 at the same time as we make TLS 1.3 enabled by default. This reverts commit 7ccd3583. Updates #30055 Change-Id: I6f2ddf7652d1172a6b29f4e335ff3a71a89974bc Reviewed-on: https://go-review.googlesource.com/c/163080 Run-TryBot: Filippo Valsorda <filippo@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Adam Langley <agl@golang.org>
-
Josh Bleecher Snyder authored
Prior to this change, DATA instructions accepted the values 1, 2, 4, and 8 as sizes. The acceptable sizes were further restricted to 4 and 8 for float constants. This was both too restrictive and not restrictive enough: string constants may reasonably have any length, and address constants should really only accept pointer-length sizes. Fixes #30269 Change-Id: I06e44ecdf5909eca7b19553861aec1fa39655c2b Reviewed-on: https://go-review.googlesource.com/c/163747 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Ian Lance Taylor authored
These are required when testing gccgo. Change-Id: I6a81d7f4d48292c32a8b3b15ef44d859ab3aa26e Reviewed-on: https://go-review.googlesource.com/c/163861 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Leon Klingele authored
Change-Id: Id2e57bc8e18e062f60c6ac8a58dc15e049352088 GitHub-Last-Rev: 6d33b809cf8a3b5412333b1c3cc237000be8101d GitHub-Pull-Request: golang/go#30016 Reviewed-on: https://go-review.googlesource.com/c/160440 Run-TryBot: Mikio Hara <mikioh.public.networking@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Mikio Hara <mikioh.public.networking@gmail.com>
-
Mikio Hara authored
Updates #15228. Change-Id: I1b73defccb4c933d71c408aa31d32af9d1bc4ab8 Reviewed-on: https://go-review.googlesource.com/c/163357Reviewed-by: Matt Layher <mdlayher@gmail.com>
-
Rob Pike authored
Fix the punctuation and use the proper units for microseconds, while explaining the incorrect but common variant 'us'. Change-Id: I9e96694ef27ab4761efccd8616ac7b6700f60d39 Reviewed-on: https://go-review.googlesource.com/c/163917Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Matthew Dempsky authored
Consistent logic for handling both duplicate map keys and case values, and eliminates ad hoc value hashing code. Also makes cmd/compile consistent with go/types's handling of duplicate constants (see #28085), which is at least an improvement over the status quo even if we settle on something different for the spec. As a side effect, this also suppresses cmd/compile's warnings about duplicate nils in (non-interface expression) switch statements, which was technically never allowed by the spec anyway. Updates #28085. Updates #28378. Change-Id: I176a251e770c3c5bc11c2bf8d1d862db8f252a17 Reviewed-on: https://go-review.googlesource.com/c/152544 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
-
Matthew Dempsky authored
CL 142497 renamed "statictmp_N" to ".stmp_N", but missed an instance that was added by CL 151498 (submitted between the window that CL 142497 was reviewed/tested and later rebased/merged). Change-Id: I597ee59dfa40821c7af2881b47e06f84a8140ec8 Reviewed-on: https://go-review.googlesource.com/c/163877 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Brian Kessler authored
If the variables passed in to the cofactor arguments of GCD (x, y) aliased the input arguments (a, b), the previous implementation would result in incorrect results for y. This change reorganizes the calculation so that the only case that need to be handled is when y aliases b, which can be handled with a simple check. Tests were added for all of the alias cases for input arguments and and and irrelevant test case for a previous binary GCD calculation was dropped. Fixes #30217 Change-Id: Ibe6137f09b3e1ae3c29e3c97aba85b67f33dc169 Reviewed-on: https://go-review.googlesource.com/c/162517 Run-TryBot: Robert Griesemer <gri@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
go101 authored
The current ExampleCommentMap might panic if there are more satisfied comments in the parsed program. Change-Id: Ibe6943470aa0cfb450dae9fc07c1199acaabef73 GitHub-Last-Rev: c79e98c2868179ea47618b296ce28c5eebc0b99d GitHub-Pull-Request: golang/go#28587 Reviewed-on: https://go-review.googlesource.com/c/147359 Run-TryBot: Robert Griesemer <gri@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
-
- 26 Feb, 2019 1 commit
-
-
Francesc Campoy authored
This change limits the capacity of the slices of bytes returned by: - Find - FindAll - FindAllSubmatch to be the same as their length. Fixes #30169 Change-Id: I07b632757d2bfeab42fce0d42364e2a16c597360 Reviewed-on: https://go-review.googlesource.com/c/161877Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-