1. 29 Sep, 2017 4 commits
    • Ian Lance Taylor's avatar
      cmd/go: don't modify input slice in gccSupportsFlag · c56434f6
      Ian Lance Taylor authored
      Modifying the input slice broke the new test for whether gccgo
      supports -fgo-importcfg, as the test passed a slice of the argument
      slice it was in the process of building.
      
      Fixes #22089
      
      Change-Id: I45444a82673223c46be0c8579da3e31a74c32d73
      Reviewed-on: https://go-review.googlesource.com/67191
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
      c56434f6
    • Marvin Stenger's avatar
      cmd/compile: avoid copying in nilcheckelim2 · bad5abf6
      Marvin Stenger authored
      nilcheckelim2 cleans up by copying b.Values in a loop, omitting
      OpUnknowns. However, the common case is that there are no OpUnknowns,
      in which case we can skip a lot of work.
      
      So we track the first nilcheck which was eliminated, if any, and only
      start copying from there. If no nilcheck was eliminated we won't copy at all.
      
      Fixes #20964
      
      Change-Id: Icd44194cf8ac81ce6485ce257b4d33e093003a40
      Reviewed-on: https://go-review.googlesource.com/65651
      Run-TryBot: Cherry Zhang <cherryyz@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarCherry Zhang <cherryyz@google.com>
      bad5abf6
    • Russ Cox's avatar
      cmd/go: add gccgo support for recent work · d8efa0e0
      Russ Cox authored
      Implement importcfg on behalf of gccgo by writing out a
      tree of symbolic links. In addition to keeping gccgo working
      with the latest changes, this also fixes a precedence bug in
      gccgo's cmd/go vendor support (the vendor equivalent of #14271).
      
      Change-Id: I0e5645116e1c84c957936baf22e3126ba6b0d46e
      Reviewed-on: https://go-review.googlesource.com/61731
      Run-TryBot: Russ Cox <rsc@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarDavid Crawshaw <crawshaw@golang.org>
      d8efa0e0
    • Russ Cox's avatar
      cmd/go: use -importcfg to invoke compiler, linker · 0be2d52e
      Russ Cox authored
      This is a step toward using cached build artifacts: the importcfg
      will direct the compiler and linker to read them right from the cache
      if necessary. However, this CL does not have a cache yet, so it still
      reads them from the usual install location or build location.
      Even so, this fixes a long-standing issue that -I and -L (no longer used)
      are not expressive enough to describe complex GOPATH setups.
      
      Shared libraries are handled enough that all.bash passes, but
      there may still be more work to do here. If so, tests and fixes
      can be added in follow-up CLs.
      
      Gccgo will need updating to support -importcfg as well.
      
      Fixes #14271.
      
      Change-Id: I5c52a0a5df0ffbf7436e1130c74e9e24fceff80f
      Reviewed-on: https://go-review.googlesource.com/56279
      Run-TryBot: Russ Cox <rsc@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarDavid Crawshaw <crawshaw@golang.org>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      0be2d52e
  2. 28 Sep, 2017 9 commits
  3. 27 Sep, 2017 23 commits
  4. 26 Sep, 2017 4 commits
    • Daniel Martí's avatar
      net/http: error if Transport.Proxy returns https · e61c5e2f
      Daniel Martí authored
      Transport.Proxy is documented as only supporting the http and socks5
      schemes. If one tries to use it for https URLs, they end up with a
      cryptic error like:
      
      	http: TLS handshake error from [...]: tls: oversized record received with length 20037
      
      This is because Transport simply skips TLS if Proxy is non-nil, since it
      knows it doesn't support Proxy with https.
      
      However, that error is very confusing and it can take a while to figure
      out what's going on. Instead, error if Proxy is used and it returns an
      unsupported scheme.
      
      Updates #19493.
      
      Change-Id: Ia036357011752f45bb9b8282a4ab5e31bc8d1a69
      Reviewed-on: https://go-review.googlesource.com/66010
      Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarTom Bergan <tombergan@google.com>
      e61c5e2f
    • Austin Clements's avatar
      runtime: make runtime.GC() trigger GC even if GOGC=off · 0744c21b
      Austin Clements authored
      Currently, the priority of checks in (gcTrigger).test() puts the
      gcpercent<0 test above gcTriggerCycle, which is used for runtime.GC().
      This is an unintentional change from 1.8 and before, where
      runtime.GC() triggered a GC even if GOGC=off.
      
      Fix this by rearranging the priority so the gcTriggerCycle test
      executes even if gcpercent < 0.
      
      Fixes #22023.
      
      Change-Id: I109328d7b643b6824eb9d79061a9e775f0149575
      Reviewed-on: https://go-review.googlesource.com/65994
      Run-TryBot: Austin Clements <austin@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarRick Hudson <rlh@golang.org>
      0744c21b
    • Ian Lance Taylor's avatar
      internal/poll: don't return from Close until descriptor is closed · 382d4928
      Ian Lance Taylor authored
      This permits the program to reliably know that when the Close method
      returns, the descriptor has definitely been closed. This matters at
      least for listeners.
      
      Fixes #21856
      Updates #7970
      
      Change-Id: I1fd0cfd2333649e6e67c6ae956e19fdff3a35a83
      Reviewed-on: https://go-review.googlesource.com/66150
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarJoe Tsai <joetsai@google.com>
      382d4928
    • Giovanni Bajo's avatar
      runtime: improve comments for nextSample · 8e11cb3f
      Giovanni Bajo authored
      The previous comment of nextSample didn't mention Poisson processes,
      which is the reason why it needed to create an exponential
      distribution, so it was hard to follow the reasoning for people
      not highly familiar with statistics.
      
      Since we're at it, we also make it clear that we are just creating
      a random number with exponential distribution by moving the
      bulk of the function into a new fastexprand().
      
      No functional changes.
      
      Change-Id: I9c275e87edb3418ee0974257af64c73465028ad7
      Reviewed-on: https://go-review.googlesource.com/65657Reviewed-by: 's avatarAustin Clements <austin@google.com>
      Run-TryBot: Austin Clements <austin@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      8e11cb3f