- 12 Jul, 2015 2 commits
-
-
Brad Fitzpatrick authored
Co-hacking with josharian at Gophercon. Change-Id: Ia59dfab676c6ed598c2c25483439cd1395a4ea87 Reviewed-on: https://go-review.googlesource.com/12029Reviewed-by:
Keith Randall <khr@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
-
Brad Fitzpatrick authored
And dependent fixes and misc cleanup. Co-hacking with josharian at Gophercon. Change-Id: Ib85dc13b303929017eb0a4d2fc2f603485f7479b Reviewed-on: https://go-review.googlesource.com/12027Reviewed-by:
Keith Randall <khr@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
-
- 11 Jul, 2015 5 commits
-
-
Keith Randall authored
Fixes #11676 Change-Id: I941f951633c89bb1454ce6d1d1b4124d46a7d9dd Reviewed-on: https://go-review.googlesource.com/12091Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
ALTree authored
Since the spec guarantees than 0 <= len always: https://golang.org/ref/spec#Length_and_capacity replace len(...) <= 0 check with len(...) == 0 check Change-Id: I5517a9cb6b190f0b1ee314a67487477435f3b409 Reviewed-on: https://go-review.googlesource.com/12034Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
Keith Randall authored
If an expression has an Ninit list, generate code for it. Required for (at least) OANDAND. Change-Id: I94c9e22e2a76955736f4a8e574d92711419c5e5c Reviewed-on: https://go-review.googlesource.com/12072Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
Josh Bleecher Snyder authored
removePredecessor can change which blocks are live. However, it cannot remove dead blocks from the function's slice of blocks because removePredecessor may have been called from within a function doing a walk of the blocks. CL 11879 did not handle this correctly and broke the build. To fix this, mark the block as dead but leave its actual removal for a deadcode pass. Blocks that are dead must have no successors, predecessors, values, or control values, so they will generally be ignored by other passes. To be safe, we add a deadcode pass after the opt pass, which is the only other pass that calls removePredecessor. Two alternatives that I considered and discarded: (1) Make all call sites aware of the fact that removePrecessor might make arbitrary changes to the list of blocks. This will needlessly complicate callers. (2) Handle the things that can go wrong in practice when we encounter a dead-but-not-removed block. CL 11930 takes this approach (and the tests are stolen from that CL). However, this is just patching over the problem. Change-Id: Icf0687b0a8148ce5e96b2988b668804411b05bd8 Reviewed-on: https://go-review.googlesource.com/12004Reviewed-by:
Todd Neal <todd@tneal.org> Reviewed-by:
Michael Matloob <michaelmatloob@gmail.com>
-
Josh Bleecher Snyder authored
Reduces 'go run run.go 64bit.go' from 23s to 8s on my machine. Change-Id: Ie5b642d0abb56e8eb3899d69472bc88a85a1c985 Reviewed-on: https://go-review.googlesource.com/12023Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
- 10 Jul, 2015 1 commit
-
-
Josh Bleecher Snyder authored
This is a prerequisite for implementing break and continue; blocks ending in break or continue need to have the increment block as a successor. While we're here, implement for loops with no condition. Change-Id: I85d8ba020628d805bfd0bd583dfd16e1be6f6fae Reviewed-on: https://go-review.googlesource.com/11941Reviewed-by:
Keith Randall <khr@golang.org>
-
- 07 Jul, 2015 1 commit
-
-
Todd Neal authored
This change has some tests verifying functionality and an assortment of benchmarks of various block lists. It modifies NewBlock to allocate in contiguous blocks improving the performance of intersect() for extremely large graphs by 30-40%. benchmark old ns/op new ns/op delta BenchmarkDominatorsLinear-8 1185619 901154 -23.99% BenchmarkDominatorsFwdBack-8 1302138 863537 -33.68% BenchmarkDominatorsManyPred-8 404670521 247450911 -38.85% BenchmarkDominatorsMaxPred-8 455809002 471675119 +3.48% BenchmarkDominatorsMaxPredVal-8 819315864 468257300 -42.85% BenchmarkNilCheckDeep1-8 766 706 -7.83% BenchmarkNilCheckDeep10-8 2553 2209 -13.47% BenchmarkNilCheckDeep100-8 58606 57545 -1.81% BenchmarkNilCheckDeep1000-8 7753012 8025750 +3.52% BenchmarkNilCheckDeep10000-8 1224165946 789995184 -35.47% Change-Id: Id3d6bc9cb1138e8177934441073ac7873ddf7ade Reviewed-on: https://go-review.googlesource.com/11716Reviewed-by:
Keith Randall <khr@golang.org>
-
- 06 Jul, 2015 1 commit
-
-
Josh Bleecher Snyder authored
The removal of if false { ... } blocks in the opt pass exposed that removePredecessor needed to do more cleaning, on pain of failing later consistency checks. Change-Id: I45d4ff7e1f7f1486fdd99f867867ce6ea006a288 Reviewed-on: https://go-review.googlesource.com/11879Reviewed-by:
Keith Randall <khr@golang.org>
-
- 05 Jul, 2015 5 commits
-
-
Josh Bleecher Snyder authored
Change-Id: Ie23b13142fd820d7071a348a8370175e58b76d64 Reviewed-on: https://go-review.googlesource.com/11878Reviewed-by:
Keith Randall <khr@golang.org>
-
Josh Bleecher Snyder authored
Loops such as func f(c chan int) int { for x := range c { return x } return 0 } don't loop. Remove the assumption that they must. Partly fixes the build. Change-Id: I766cebeec8e36d14512bea26f54c06c8eaf95e23 Reviewed-on: https://go-review.googlesource.com/11876Reviewed-by:
Keith Randall <khr@golang.org>
-
Josh Bleecher Snyder authored
There is clearly work to do to fix labels and gotos. The compiler currently hangs on ken/label.go. For the moment, stop the bleeding. Fixes the build. Change-Id: Ib68360d583cf53e1a8ca4acff50644b570382728 Reviewed-on: https://go-review.googlesource.com/11877Reviewed-by:
Keith Randall <khr@golang.org>
-
Josh Bleecher Snyder authored
Partly fixes the build, by punting. Other things have broken in the meantime. Change-Id: I1e2b8310057cbbbd9ffc501ef51e744690e00726 Reviewed-on: https://go-review.googlesource.com/11875Reviewed-by:
Keith Randall <khr@golang.org>
-
Josh Bleecher Snyder authored
Change-Id: I4e4200b0fa847a1ff8a8b7d1e318bbc1c5e26b5b Reviewed-on: https://go-review.googlesource.com/11874Reviewed-by:
Keith Randall <khr@golang.org>
-
- 02 Jul, 2015 1 commit
-
-
Daniel Morsing authored
Doesn't fix the build entirely, but does make it get to the race detector tests. Change-Id: Ie986d52374936855b7ee975dc68742306527eb15 Reviewed-on: https://go-review.googlesource.com/11835Reviewed-by:
Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by:
Keith Randall <khr@golang.org>
-
- 01 Jul, 2015 5 commits
-
-
Josh Bleecher Snyder authored
These additional checks were useful in tracking down the broken build (CL 11238). This CL does not fix the build, sadly. Change-Id: I34de3bed223f450aaa97c1cadaba2e4e5850050b Reviewed-on: https://go-review.googlesource.com/11681Reviewed-by:
Keith Randall <khr@golang.org>
-
Daniel Morsing authored
This will make it possible for us to start implementing interfaces and other stack allocated types which are more than one machine word. Change-Id: I52b187a791cf1919cb70ed6dabdc9f57b317ea83 Reviewed-on: https://go-review.googlesource.com/11631Reviewed-by:
Keith Randall <khr@golang.org>
-
Keith Randall authored
Forgot to add this in the tip merge. Change-Id: I0e5a2681133f4ae7a7c360ae2c2d71d46420c693 Reviewed-on: https://go-review.googlesource.com/11793Reviewed-by:
Keith Randall <khr@golang.org>
-
Keith Randall authored
Semi-regular merge from tip into ssa branch. Change-Id: I9cbe23f566410496d4ceb97c1435e2df7f2b56ec
-
Rob Pike authored
Everything in the library but crypto and net. Change-Id: I89b21b9621e6d338fa1891da0eabba5d7d2fe349 Reviewed-on: https://go-review.googlesource.com/11820Reviewed-by:
Russ Cox <rsc@golang.org>
-
- 30 Jun, 2015 18 commits
-
-
Brad Fitzpatrick authored
Adding a mutex was easier than documenting it, and is consistent with gob. Fixes #9847 Change-Id: Ifa94c17e7c11643add81b35431ef840b794d78b1 Reviewed-on: https://go-review.googlesource.com/11682Reviewed-by:
Andrew Gerrand <adg@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Brad Fitzpatrick authored
See RFC 7230. Thanks to Régis Leroy for the report. Change-Id: Ic1779bc2180900430d4d7a4938cac04ed73c304c Reviewed-on: https://go-review.googlesource.com/11810Reviewed-by:
Russ Cox <rsc@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
-
Brad Fitzpatrick authored
Fixes #11475 Change-Id: Ibaedbb732bb1b9f062bd5af7b866ec4758c724a7 Reviewed-on: https://go-review.googlesource.com/11770Reviewed-by:
Russ Cox <rsc@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
-
Alan Donovan authored
The optional Qualifier function determines what prefix to attach to package-level names, enabling clients to qualify packages in different ways, for example, using only the package name instead of its complete path, or using the locally appropriate name for package given a set of (possibly renaming) imports. Prior to this change, clients wanting this behavior had to copy hundreds of lines of complex printing logic. Fun fact: (*types.Package).Path and (*types.Package).Name are valid Qualifier functions. We provide the RelativeTo helper function to create Qualifiers so that the old behavior remains a one-liner. Fixes golang/go#11133 This CL is a copy of https://go-review.googlesource.com/#/c/11692/ to the golang.org/x/tools repository. Change-Id: I26d0f3644d077a26bfe350989f9c545f018eefbf Reviewed-on: https://go-review.googlesource.com/11790Reviewed-by:
Robert Griesemer <gri@golang.org> Run-TryBot: Robert Griesemer <gri@golang.org>
-
Russ Cox authored
We can't address more than this on amd64 anyway. Fixes #9862. Change-Id: Ifb1abae558e2e1ee2dc953a76995f3f08c60b1df Reviewed-on: https://go-review.googlesource.com/11715Reviewed-by:
Austin Clements <austin@google.com>
-
Russ Cox authored
Compiling a simple file containing a slice of 100,000 strings, the size of the resulting binary dropped from 5,896,224 bytes to 3,495,968 bytes, which is the expected 2,400,000 bytes, give or take. Fixes #7384. Change-Id: I3e551b5a1395b523a41b33518d81a1bf28da0906 Reviewed-on: https://go-review.googlesource.com/11698Reviewed-by:
Austin Clements <austin@google.com>
-
Russ Cox authored
Fixes #7561 correctly. Fixes #9137. Change-Id: I7f27e199d7101b785a7645f789e8fe41a405a86f Reviewed-on: https://go-review.googlesource.com/11713Reviewed-by:
Dmitry Vyukov <dvyukov@google.com>
-
Brad Fitzpatrick authored
This was originally done in https://codereview.appspot.com/5690059 (Feb 2012) to deal with bad response headers coming back from webcams, but it presents a potential security problem with HTTP request smuggling for request headers containing "Content Length" instead of "Content-Length". Part of overall HTTP hardening for request smuggling. See RFC 7230. Thanks to Régis Leroy for the report. Change-Id: I92b17fb637c9171c5774ea1437979ae2c17ca88a Reviewed-on: https://go-review.googlesource.com/11772Reviewed-by:
Russ Cox <rsc@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Dmitry Vyukov authored
If you have more than 10 procs, then currently they are sorted alphabetically as 0, 10, 11, ..., 19, 2, 20, ... Assign explicit order to procs so that they are sorted numerically. Change-Id: I6d978d2cd439aa2fcbcf147842a643f9073eef75 Reviewed-on: https://go-review.googlesource.com/11750Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by:
Russ Cox <rsc@golang.org>
-
Brad Fitzpatrick authored
Fixes #9758 Change-Id: I3089ec06cddd74b547d8b10834d7478a04b02069 Reviewed-on: https://go-review.googlesource.com/11701Reviewed-by:
Russ Cox <rsc@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Russ Cox authored
RawPath is a hint to the desired encoding of Path. It is ignored when it is not a valid encoding of Path, such as when Path has been changed but RawPath has not. It is not ignored but also not useful when it matches the url package's natural choice of encoding. In this latter case, set it to the empty string. This should help drive home the point that clients cannot in general depend on it being present and that they should use the EncodedPath method instead. This also reduces the impact of the change on tests, especially tests that use reflect.DeepEqual on parsed URLs. Change-Id: I437c51a33b85439a31c307caf1436118508ea196 Reviewed-on: https://go-review.googlesource.com/11760Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
Dmitry Vyukov authored
Change-Id: Iacb84421215ca80c7add2818118b2af1a650fd58 Reviewed-on: https://go-review.googlesource.com/11639Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
Roger Peppe authored
When an xmlns="..." attribute was explicitly generated, it was being ignored because the name space on the attribute was assumed to have been explicitly set (to the empty name space) and it's not possible to have an element in the empty name space when there is a non-empty name space set. We fix this by recording when a default name space has been explicitly set and setting the name space of the element to that so printer.defineNS can do its work correctly. We do not attempt to add our own xmlns="..." attribute when one is explicitly set. We also add tests for EncodeElement, as that's the only way to attain coverage of some of the changed behaviour. Some other test coverage is also increased, although more work remains to be done in this area. This change was jointly developed with Martin Hilton (mhilton on github). Fixes #11431. Change-Id: I7b85e06eea5b18b2c15ec16dcbd92a8e1d6a9a4e Reviewed-on: https://go-review.googlesource.com/11635Reviewed-by:
Russ Cox <rsc@golang.org>
-
Andrew Gerrand authored
Fixes #11438 Change-Id: Iedd31918aa5187fc3fdaed71c8dad82075559084 Reviewed-on: https://go-review.googlesource.com/11667Reviewed-by:
Rob Pike <r@golang.org>
-
Nigel Tao authored
The spec says this is invalid, but it matches giflib's behavior. Fixes #9856 (together with https://go-review.googlesource.com/11661). Change-Id: I05701f62a9e5e724a2d85c6b87ae4111e537146b Reviewed-on: https://go-review.googlesource.com/11663Reviewed-by:
Rob Pike <r@golang.org>
-
Nigel Tao authored
This is needed by issue #9856. Change-Id: Idad570a7e55ad903aab55372d390bc746c4e19cf Reviewed-on: https://go-review.googlesource.com/11661Reviewed-by:
Rob Pike <r@golang.org>
-
Alex Brainman authored
Fixes #11426 Change-Id: I77368b0e852149ed4533e139cc43887508ac7f78 Reviewed-on: https://go-review.googlesource.com/11662Reviewed-by:
Austin Clements <austin@google.com> Reviewed-by:
Russ Cox <rsc@golang.org>
-
Aaron Jacobs authored
This allows for "race free" cancellation, in the sense discussed in issue #11013: in contrast to Transport.CancelRequest, the cancellation will not be lost if the user cancels before the request is put into the transport's internal map. Fixes #11013. Change-Id: I0b5e7181231bdd65d900e343f764b4d1d7c422cd Reviewed-on: https://go-review.googlesource.com/11601 Run-TryBot: David Symonds <dsymonds@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
- 29 Jun, 2015 1 commit
-
-
Russ Cox authored
For #11326 (but not a fix). Change-Id: Ic51814f5cd7357427c3fd990a5522775d05e7987 Reviewed-on: https://go-review.googlesource.com/11673Reviewed-by:
Robert Griesemer <gri@golang.org>
-