- 02 Feb, 2017 18 commits
-
-
David Lazar authored
This ensures there isn't a live reference to buf1 on our stack when MultiReader is inlined. Fixes #18819. Change-Id: I96a8cdc1ffad8f8a10c0ddcbf0299005f3176b61 Reviewed-on: https://go-review.googlesource.com/35931 Run-TryBot: David Lazar <lazard@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Austin Clements <austin@google.com> Reviewed-by:
Russ Cox <rsc@golang.org>
-
Josh Bleecher Snyder authored
Instead of always appending to c.Values, choose whichever slice is larger; b.Values will be set to nil anyway. Appending once instead of in a loop also limits slice growth to once per function call and is more efficient. Reduces max rss for the program in #18602 by 6.5%, and eliminates fuseBlockPlain from the alloc_space pprof output. fuseBlockPlain previously accounted for 16.74% of allocated memory. Updates #18602. Change-Id: I417b03722d011a59a679157da43dc91f4425210e Reviewed-on: https://go-review.googlesource.com/35114 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by:
Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Keith Randall authored
Remove rotate generation from walk. Remove OLROT and ssa.Lrot* opcodes. Generate rotates during SSA lowering for architectures that have them. This CL will allow rotates to be generated in more situations, like when the shift values are determined to be constant only after some analysis. Fixes #18254 Change-Id: I8d6d684ff5ce2511aceaddfda98b908007851079 Reviewed-on: https://go-review.googlesource.com/34232 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Cherry Zhang <cherryyz@google.com>
-
Keith Randall authored
Intrinsics are ok to inline as they don't rewrite to actual calls. Change-Id: Ieb19c834c61579823c62c6d1a1b425d6c4d4de23 Reviewed-on: https://go-review.googlesource.com/34272 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
David Chase <drchase@google.com>
-
Keith Randall authored
When we discover a relation x <= len(s), also discover the relation x <= cap(s). That way, in situations like: a := s[x:] // tests 0 <= x <= len(s) b := s[:x] // tests 0 <= x <= cap(s) the second check can be eliminated. Fixes #16813 Change-Id: Ifc037920b6955e43bac1a1eaf6bac63a89cfbd44 Reviewed-on: https://go-review.googlesource.com/33633 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Alexandru Moșoi <alexandru@mosoi.ro> Reviewed-by:
David Chase <drchase@google.com>
-
Keith Randall authored
CSE opportunities were being missed for commutative ops. We used to order the args of commutative ops (by arg ID) once at the start of CSE. But that may not be enough. i1 = (Load ptr mem) i2 = (Load ptr mem) x1 = (Add i1 j) x2 = (Add i2 j) Equivalent commutative ops x1 and x2 may not get their args ordered in the same way because because at the start of CSE, we don't know that the i values will be CSEd. If x1 and x2 get opposite orders we won't CSE them. Instead, (re)order the args of commutative operations by their equivalence class IDs each time we partition an equivalence class. Change-Id: Ic609fa83b85299782a5e85bf93dc6023fccf4b0c Reviewed-on: https://go-review.googlesource.com/33632 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Todd Neal <todd@tneal.org>
-
Emmanuel Odeke authored
Fixes #10561. Provides a better diagnostic message for failed type switch satisfaction in the case that a value receiver is being used in place of the pointer receiver that implements and satisfies the interface. Change-Id: If8c13ba13f2a8d81bf44bac7c3a66c12921ba921 Reviewed-on: https://go-review.googlesource.com/35235Reviewed-by:
Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Hiroshi Ioka authored
Change-Id: Ib2c1490a42e3485913a05a0b2fecdcc425d42871 Reviewed-on: https://go-review.googlesource.com/36083 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
TestMain doesn't make use of any flags. Change-Id: I98ec582fb004045a5067618f605ccfeb1f9f4bbb Reviewed-on: https://go-review.googlesource.com/33613Reviewed-by:
David Crawshaw <crawshaw@golang.org> Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Elias Naur authored
Tests that use TestMain might never call m.Run(), and simply return from TestMain. In that case, the iOS test harness never sees the PASS from the testing framework and assumes the test failed. Allow an exit with exit code 0 to also mean test success, thereby fixing the objdump test on iOS. Change-Id: I1fe9077b05931aa0905e41b88945cd153c5b35b6 Reviewed-on: https://go-review.googlesource.com/36065Reviewed-by:
David Crawshaw <crawshaw@golang.org> Run-TryBot: Elias Naur <elias.naur@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Emmanuel Odeke authored
Fixes #8481. Inform the user that init functions cannot be directly invoked in user code, as mandated by the spec at: http://golang.org/ref/spec#Program_initialization_and_execution. Change-Id: Ib12c0c08718ffd48b76b6f9b13c76bb6612d2e7b Reviewed-on: https://go-review.googlesource.com/34790Reviewed-by:
Keith Randall <khr@golang.org> Reviewed-by:
Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Martin Möhrmann authored
Change-Id: If3cb64f52fe0fd7331b6f1acf3d15dd705dfd633 Reviewed-on: https://go-review.googlesource.com/32591 Run-TryBot: Martin Möhrmann <moehrmann@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Josh Bleecher Snyder <josharian@gmail.com>
-
Emmanuel Odeke authored
Fixes #15055. Updates exprfmt printing using fmt verb "%v" to check that n.Left is non-nil before attempting to print it, otherwise we'll print the nodes in the list using verb "%.v". Credit to @mdempsky for this approach and for finding the root cause of the issue. Change-Id: I20a6464e916dc70d5565e145164bb9553e5d3865 Reviewed-on: https://go-review.googlesource.com/25361Reviewed-by:
Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Josh Bleecher Snyder authored
Make sure that the lack of an lvalue doesn't cause extra side-effects. Updates #18661 Updates #18739 Change-Id: I52eb4b4a5c6f8ff5cddd2115455f853c18112c19 Reviewed-on: https://go-review.googlesource.com/36126 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Matthew Dempsky <mdempsky@google.com>
-
Matthew Dempsky authored
The binary export format embeds type definitions inline as necessary, so there's no need to add them to exportlist. Also, constants are embedded directly by value, so they can be omitted too. Change-Id: Id1879eb97c298a5a52f615cf9883c346c7f7bd69 Reviewed-on: https://go-review.googlesource.com/36170 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Robert Griesemer <gri@golang.org>
-
Matthew Dempsky authored
When switching to the new parser, I changed cmd/compile to handle iota per an intuitive interpretation of how nested constant declarations should work (which also matches go/types). Note: if we end up deciding that the current spec wording is intentional (i.e., confirming gccgo's current behavior), the test will need to be updated to expect 4 instead of 1. Updates #15550. Change-Id: I441f5f13209f172b73ef75031f2a9daa5e985277 Reviewed-on: https://go-review.googlesource.com/36122Reviewed-by:
David Crawshaw <crawshaw@golang.org> Reviewed-by:
Robert Griesemer <gri@golang.org> Reviewed-by:
Josh Bleecher Snyder <josharian@gmail.com> Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Alex Brainman authored
Sometimes STEXT symbols point to the first byte of .data section, instead of the end of .text section. But, while writing pe symbol table, we should treat them as if they belong to the .text section. Change pe symbol table records for these symbols. Fixes #14710 Change-Id: I1356e61aa8fa37d590d7b1677b2bac214ad0ba4e Reviewed-on: https://go-review.googlesource.com/35272 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Austin Clements <austin@google.com>
-
Ian Lance Taylor authored
The comment for maxPtrmaskBytes implied that the value was still 16, but that changed in CL 10815. Change-Id: I86e304bc7d9d1a0a6b22b600fefcc1325e4372d9 Reviewed-on: https://go-review.googlesource.com/36120Reviewed-by:
David Crawshaw <crawshaw@golang.org> Reviewed-by:
Austin Clements <austin@google.com>
-
- 01 Feb, 2017 22 commits
-
-
Kale Blankenship authored
Adds helper function to auto-skip tests when DNS returns a successful response for a domain known not to exist. The error from `net.LookupHost` is intentionally ignored because the DNS tests will fail anyway if there are issues unrelated to NXDOMAIN responses. Fixes #17884 Change-Id: I729391bd702218507561818668f791331295299e Reviewed-on: https://go-review.googlesource.com/34516Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Matthew Dempsky authored
It's easier to understand what's happening after inlining these into noder.typeDecl. Change-Id: I7beed5a1e18047bf09f2d4ddf64b9646c324d8d6 Reviewed-on: https://go-review.googlesource.com/36111 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Josh Bleecher Snyder <josharian@gmail.com>
-
Michael Fraenkel authored
Fixes #18319 Change-Id: If88e60a86828f60d8d93fc291932c19bab19e8dc Reviewed-on: https://go-review.googlesource.com/34470Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Elias Naur authored
If -test.timeout is not specified to go test, it will time out after a default 10 minutes. The iOS exec wrapper also contains a fail safe timeout mechanism for a stuck device. However, if no explicit -test.timeout is specified, it will use a timeout of 0, plus some constant amount. Use the same default timeout in the exec wrapper as for go test, 10 minutes. Change-Id: I6465ccd9f7b9ce08fa302e6697f7938a0ea9af34 Reviewed-on: https://go-review.googlesource.com/36062Reviewed-by:
David Crawshaw <crawshaw@golang.org> Run-TryBot: Elias Naur <elias.naur@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Elias Naur authored
Notably, this change fixes the TestTCPReadWriteAllocs test because the errnoErr wrapper is now used, elimitating the allocation for common errnos. The change to Dup is caused by a CL 8095 that changed the Dup* calls to use Syscall instead of RawSyscall. Found while working on the new iOS builders. Change-Id: I44ab9dcad27db190e175aa149865b33944f48674 Reviewed-on: https://go-review.googlesource.com/36061Reviewed-by:
David Crawshaw <crawshaw@golang.org> Run-TryBot: Elias Naur <elias.naur@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Elias Naur authored
The iOS exec wrapper use the constant bundle id "golang.gotest" for running Go programs on iOS. However, that only happens to work on the old iOS builders where their provisioning profile covers that bundle id. Expand the detection script to list all available provisioning profiles for the attached device and include the bundle id in the GOIOS_APP_ID environment variable. To allow the old builders to continue, the "golang.gotest" bundle id is used as a fallback if only the app id prefix is specified in GOIOS_APP_ID. For the new builders. Change-Id: I8baa1d4d57f845de851c3fad3f178e05e9a01b17 Reviewed-on: https://go-review.googlesource.com/36060Reviewed-by:
David Crawshaw <crawshaw@golang.org> Run-TryBot: Elias Naur <elias.naur@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Elias Naur authored
On (at least) macOS 10.12, the `security cms` subcommand used by the iOS detection script will output an error to stderr. The command otherwise succeeds, but the extra line confuses a later parsing step. To fix it, use only stdout and ignore stderr from every command run by detect.go. For the new iOS builders. Change-Id: Iee426da7926d7f987ba1be061fa92ebb853ef53d Reviewed-on: https://go-review.googlesource.com/36059Reviewed-by:
David Crawshaw <crawshaw@golang.org> Run-TryBot: Elias Naur <elias.naur@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Adam Langley authored
SNI values may not include a trailing dot according to https://tools.ietf.org/html/rfc6066#section-3. Although crypto/tls handled this correctly as a client, it didn't reject this as a server. This change makes sending an SNI value with a trailing dot a fatal error. Updates #18114. Change-Id: Ib7897ab40e98d4a7a4646ff8469a55233621f631 Reviewed-on: https://go-review.googlesource.com/33904 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
Adam Langley authored
X.509v1 certificates are ancient and should be dead. (They are even prohibited by the Baseline requirements, section 7.1.1.) However, there are a number of v1 roots from the 1990's that are still in operation. Thus crypto/x509.Certificate.CheckSignatureFrom allows X.509v1 certificates to sign other certificates. The chain building code, however, only allows v1 certificates to sign others if they're a root. This change adds a test to check that. Change-Id: Ib8d81e522f30d41932b89bdf3b19ef3782d8ec12 Reviewed-on: https://go-review.googlesource.com/34383 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
Anmol Sethi authored
ConnectionState.NegotiatedProtocol's documentation implies that it will always be from Config.NextProtos. This commit clarifies that there is no guarantee. This commit also adds a note to ConnectionState.NegotiatedProtocolIsMutual, making it clear that it is client side only. Fixes #18841 Change-Id: Icd028af8042f31e45575f1080c5e9bd3012e03d7 Reviewed-on: https://go-review.googlesource.com/35917Reviewed-by:
Filippo Valsorda <hi@filippo.io> Reviewed-by:
Adam Langley <agl@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Adam Langley <agl@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Blake Mizerany authored
This commit elimates the request allocation and shallow copy duplication already done by req.WithContext. name old time/op new time/op delta ServeHTTP-4 216µs ±36% 212µs ±15% ~ (p=0.853 n=10+10) name old alloc/op new alloc/op delta ServeHTTP-4 917kB ±36% 1137kB ± 0% ~ (p=0.352 n=10+10) name old allocs/op new allocs/op delta ServeHTTP-4 5.00 ± 0% 4.00 ± 0% -20.00% (p=0.000 n=10+10) Change-Id: I514a59c30b037c7a65c355b06fd82c2d6ff17bb0 Reviewed-on: https://go-review.googlesource.com/35569Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Thomas Bonfort authored
The existing implementation falls back to using image.At() for each pixel when encoding an *image.YCbCr which is inefficient and causes many memory allocations. This change makes the jpeg encoder directly read Y, Cb, and Cr pixel values. benchmark old ns/op new ns/op delta BenchmarkEncodeYCbCr-4 43990846 24201148 -44.99% benchmark old MB/s new MB/s speedup BenchmarkEncodeYCbCr-4 20.95 38.08 1.82x Fixes #18487 Change-Id: Iaf2ebc646997e3e1fffa5335f1b0d642e15bd453 Reviewed-on: https://go-review.googlesource.com/34773 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Nigel Tao <nigeltao@golang.org>
-
Filippo Valsorda authored
Change-Id: I82c41bd1d82adda457ddb5dd08caf0647905da22 Reviewed-on: https://go-review.googlesource.com/36091Reviewed-by:
Matt Layher <mdlayher@gmail.com> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
Brad Fitzpatrick authored
This reverts commit ed8c62b7. Turns out it was needed in later commits. Change-Id: I07a7bc2429976d8a5a89f915a11625c118b85500 Reviewed-on: https://go-review.googlesource.com/36113 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by:
Joe Tsai <thebrokentoaster@gmail.com>
-
Alberto Donizetti authored
Whoever called toint() is expecting the {Mpint, Mpflt, Mpcplx} arg to be converted to an integer expression, so it never makes sense to report an error as "constant X truncated to real". Fixes #11580 Change-Id: Iadcb105f0802358a7f77188c2b1e63fe80c5580c Reviewed-on: https://go-review.googlesource.com/34638 TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Robert Griesemer <gri@golang.org> Run-TryBot: Robert Griesemer <gri@golang.org>
-
Anmol Sethi authored
The syscall package checks for null bytes now. This was added in https://codereview.appspot.com/6458050 Change-Id: I59a2fed3757a25b85e2668905ff5cf2ec8c3a0d3 Reviewed-on: https://go-review.googlesource.com/34978Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Jeff Johnson authored
A user application can now use os.Setenv("ZONEINFO", ..) becase the value is no longer read on init of the time package. Fixes #18619 Change-Id: Id8e303d67e6fb9c5d6ea9f969d8c94f6fff1bee3 Reviewed-on: https://go-review.googlesource.com/35639Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Kyrylo Silin authored
The function call was removed in: ead08e91 Change-Id: I78fe563c9ea4554811c74130533d2186a65d3033 Reviewed-on: https://go-review.googlesource.com/35532Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Ibrahim AshShohail authored
Update the link to PKWARE "Application Notes on the .ZIP file format" document. Now uses the permanent link according to 1.5 in version 6.3.3 (https://pkware.cachefly.net/webdocs/APPNOTE/APPNOTE-6.3.3.TXT): http://www.pkware.com/appnote Fixes #18738 Change-Id: If252a5fca1dd666e70c2591a83d8714672d02932 Reviewed-on: https://go-review.googlesource.com/35500Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
Ibrahim AshShohail authored
Errors from http.Client already includes the URL in the message. Fixes #18754 Change-Id: I65fc25a8f3aa6a2d4627aac3fb47eed8d3c4151a Reviewed-on: https://go-review.googlesource.com/35650Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Patrick Pelletier authored
As per RFC 2046, the boundary for multipart MIME is allowed up to 70 characters. The old SetBoundary implementation only allowed up to 69 so this bumps it to the correct value of 70. The relevant RFC is at https://www.ietf.org/rfc/rfc2046.txt and section 5.1.1 defines the boundary specification. Fixes #18793 Change-Id: I91d2ed4549c3d27d6049cb473bac680a750fb520 Reviewed-on: https://go-review.googlesource.com/35830Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Kevin Burke authored
Change-Id: I67db3b342929a7bd11f01bf3b9afb49f4da69a0a Reviewed-on: https://go-review.googlesource.com/35841Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-