1. 16 Jul, 2018 11 commits
  2. 15 Jul, 2018 5 commits
  3. 14 Jul, 2018 1 commit
  4. 13 Jul, 2018 14 commits
  5. 12 Jul, 2018 9 commits
    • Rob Pike's avatar
      doc: update Concurrency, Functions and Methods, and Control Flow sections · 489a2632
      Rob Pike authored
      Many parts of the FAQ are dusty and need cleaning up.
      This is the first of a series of changes to bring it up to date.
      Since it was first written at the time of release, some of the
      ideas and background have changed, and some historical
      remarks are largely irrelevant now.
      
      Update #26107.
      
      Change-Id: I1f36df7d8ecc8a1a033d5ac4fa1edeece25ed6b4
      Reviewed-on: https://go-review.googlesource.com/123496Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      489a2632
    • Rebecca Stambler's avatar
      go/types: record type information after detecting error · 6f8e8e14
      Rebecca Stambler authored
      The existing implementation stops recording type information once it
      encounters an error. This results in missing type information that is
      needed by various tools. This change handles a few commonly encountered
      cases by continuing to check subtrees after errors. Also, add tests for
      cases where the package fails to type-check.
      
      Updates #22467
      
      Change-Id: I1bb48d4cb8ae5548dca63bdd785ea2f69329e92b
      Reviewed-on: https://go-review.googlesource.com/123578
      Run-TryBot: Rebecca Stambler <rstambler@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarAlan Donovan <adonovan@google.com>
      6f8e8e14
    • Brad Fitzpatrick's avatar
      net/http: update bundled http2 · 71d29086
      Brad Fitzpatrick authored
      Updates bundled x/net/http2 to git rev d0887baf81f4 for:
      
          http2: ignore unknown 1xx responses like HTTP/1
          https://golang.org/cl/123615
      
          http2: fix bug in earlier CL 123615
          https://golang.org/cl/123675
      
      Also along for the ride, but without any effect:
      
          http2: export a field of an internal type for use by net/http
          https://golang.org/cl/123656
      
      Fixes #26189
      Updates #17739
      
      Change-Id: I1955d844d74113efbcbbdaa7d7a7faebb2225b45
      Reviewed-on: https://go-review.googlesource.com/123676
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      71d29086
    • Russ Cox's avatar
      cmd/go: fix tests from x/vgo repo · 24e5fae9
      Russ Cox authored
      This CL fixes up tests from the x/vgo repo that are failing
      on some of the builders.
      It will be submitted together with CL 123576.
      
      Change-Id: I6bec81a93ad4f7116e8edc8c15beafa25747530c
      Reviewed-on: https://go-review.googlesource.com/123580
      Run-TryBot: Russ Cox <rsc@golang.org>
      Reviewed-by: 's avatarBryan C. Mills <bcmills@google.com>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      24e5fae9
    • Russ Cox's avatar
      cmd/go: merge module support from x/vgo repo · f7248f05
      Russ Cox authored
      This CL corresponds to CL 123361, the final manual CL in that repo,
      making this the final manual sync.
      
      All future commits will happen in this repo (the main Go repo),
      and we'll update x/vgo automatically with a fixed patch+script.
      
      Change-Id: I572243309c1809727604fd704705a23c30e85d1a
      Reviewed-on: https://go-review.googlesource.com/123576
      Run-TryBot: Russ Cox <rsc@golang.org>
      Reviewed-by: 's avatarBryan C. Mills <bcmills@google.com>
      f7248f05
    • Brad Fitzpatrick's avatar
      net/http: make Transport.CloseIdleConnections close non-bundled http2.Transport · f22dd66b
      Brad Fitzpatrick authored
      Previously Transport.CloseIdleConnections only closed the HTTP/2
      Transport's idle connections if the HTTP/2 transport was configured
      automatically via the bundled copy (in h2_bundle.go).
      
      This makes it also work if the user called http2.ConfigureTransport
      themselves using golang.org/x/net/http2 instead of the bundled copy.
      
      No tests because we have no current way to run such cross-repo tests,
      at least in any efficient or non-flaky way.
      
      Tested by hand that:
      
          package main
      
          import (
              "net/http"
      
              "golang.org/x/net/http2"
          )
      
          func main() {
              tr := &http.Transport{}
              http2.ConfigureTransport(tr)
              tr.CloseIdleConnections()
          }
      
      ... now works and calls the x/net/http2.Transport.CloseIdleConnections
      code. (I threw in a print statement locally)
      
      Fixes #22891 once CL 123656 is also in.
      
      Change-Id: Id697fd3e7877c3a988bc3c3368b88940ba56cfd0
      Reviewed-on: https://go-review.googlesource.com/123657
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      f22dd66b
    • Keith Randall's avatar
      cmd/cgo: fix cgo bad typedefs · b888a622
      Keith Randall authored
      Two fixes:
      
      1) Typedefs of the bad typedefs should also not be rewritten to the
         underlying type.  They shouldn't just be uintptr, though, they should
         retain the C naming structure.  For example, in C:
      
         typedef const __CFString * CFStringRef;
         typedef CFStringRef SecKeyAlgorithm;
      
         we want the Go:
      
         type _Ctype_CFStringRef uintptr
         type _Ctype_SecKeyAlgorithm = _Ctype_CFStringRef
      
      2) We need more types than just function arguments/return values.
         At least we need types of global variables, so when we see a reference to:
      
         extern const SecKeyAlgorithm kSecKeyAlgorithmECDSASignatureDigestX962SHA1;
      
         we know that we need to investigate the type SecKeyAlgorithm.
         Might as well just find every typedef and check the badness of all of them.
         This requires looping until a fixed point of known types is reached.
         Usually it takes just 2 iterations, sometimes 3.
      
      Fixes #24161
      
      Change-Id: I32ca7e48eb4d4133c6242e91d1879636f5224ea9
      Reviewed-on: https://go-review.googlesource.com/123177
      Run-TryBot: Keith Randall <khr@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      b888a622
    • Keith Randall's avatar
      cmd/compile: handle degenerate write barrier case · 85cfa4d5
      Keith Randall authored
      If both branches of a write barrier test go to the same block,
      then there's no unsafe points.
      
      This can only happen if the resulting memory state is somehow dead,
      which can only occur in degenerate cases, like infinite loops. No
      point in cleaning up the useless branch in these situations.
      
      Fixes #26024.
      
      Change-Id: I93a7df9fdf2fc94c6c4b1fe61180dc4fd4a0871f
      Reviewed-on: https://go-review.googlesource.com/123655Reviewed-by: 's avatarDavid Chase <drchase@google.com>
      Run-TryBot: Keith Randall <khr@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      85cfa4d5
    • David Chase's avatar
      cmd/compile: add LocalAddr that takes SP,mem operands · 0029cd47
      David Chase authored
      Lack of a well-defined order between VarDef and related
      address operations sometimes causes problems with store order
      and write barrier transformations; glitches in the order are
      made irreparable (by later optimizations) if the two parts of
      the glitch straddle a split in the original block caused by
      insertion of a write barrier diamond.
      
      Fix this by creating a LocalAddr for addresses of locals
      (what VarDef matters for) that takes a memory input to
      help make the order explicit.  Addr is modified to only
      be legal for SB operand, so there is no overlap between
      Addr and LocalAddr uses (there may be some downstream
      cleanup from this).
      
      Changes to generic.rules and rewrite.go ensure that codegen
      tests continue to pass; CSE of LocalAddr is impaired, not
      quite sure of the cost.
      
      Fixes #26105.
      
      Change-Id: Id4192b4440aa4e9d7ba54a465c456df9b530b515
      Reviewed-on: https://go-review.googlesource.com/122483
      Run-TryBot: David Chase <drchase@google.com>
      Reviewed-by: 's avatarKeith Randall <khr@golang.org>
      0029cd47