1. 26 Apr, 2019 5 commits
  2. 25 Apr, 2019 14 commits
  3. 24 Apr, 2019 16 commits
  4. 23 Apr, 2019 5 commits
    • sergey's avatar
      net/url: Reduce allocation on parsing URL func · 601eee39
      sergey authored
      Build result string via string.Builder to avoid allocation.
      As side effect some performance boots.
      
      name                 old time/op    new time/op    delta
      QueryUnescape/#00-4     114ns ± 0%      98ns ± 1%  -13.89%  (p=0.000 n=4+5)
      QueryUnescape/#01-4     401ns ± 2%     383ns ± 1%   -4.54%  (p=0.008 n=5+5)
      QueryUnescape/#02-4     300ns ± 2%     274ns ± 2%   -8.66%  (p=0.008 n=5+5)
      QueryUnescape/#03-4     564ns ± 2%     542ns ± 2%   -4.04%  (p=0.008 n=5+5)
      QueryUnescape/#04-4    3.27µs ± 2%    3.34µs ± 8%     ~     (p=0.690 n=5+5)
      PathUnescape/#00-4      112ns ± 2%      99ns ± 3%  -11.25%  (p=0.008 n=5+5)
      PathUnescape/#01-4      392ns ± 2%     374ns ± 6%     ~     (p=0.063 n=5+5)
      PathUnescape/#02-4      296ns ± 2%     274ns ± 2%   -7.43%  (p=0.008 n=5+5)
      PathUnescape/#03-4      556ns ± 2%     537ns ± 1%   -3.45%  (p=0.008 n=5+5)
      PathUnescape/#04-4     2.99µs ± 1%    3.00µs ± 1%     ~     (p=0.690 n=5+5)
      
      name                 old allocs/op  new allocs/op  delta
      QueryUnescape/#00-4      2.00 ± 0%      1.00 ± 0%  -50.00%  (p=0.008 n=5+5)
      QueryUnescape/#01-4      2.00 ± 0%      1.00 ± 0%  -50.00%  (p=0.008 n=5+5)
      QueryUnescape/#02-4      2.00 ± 0%      1.00 ± 0%  -50.00%  (p=0.008 n=5+5)
      QueryUnescape/#03-4      2.00 ± 0%      1.00 ± 0%  -50.00%  (p=0.008 n=5+5)
      QueryUnescape/#04-4      2.00 ± 0%      1.00 ± 0%  -50.00%  (p=0.008 n=5+5)
      PathUnescape/#00-4       2.00 ± 0%      1.00 ± 0%  -50.00%  (p=0.008 n=5+5)
      PathUnescape/#01-4       2.00 ± 0%      1.00 ± 0%  -50.00%  (p=0.008 n=5+5)
      PathUnescape/#02-4       2.00 ± 0%      1.00 ± 0%  -50.00%  (p=0.008 n=5+5)
      PathUnescape/#03-4       2.00 ± 0%      1.00 ± 0%  -50.00%  (p=0.008 n=5+5)
      PathUnescape/#04-4       2.00 ± 0%      1.00 ± 0%  -50.00%  (p=0.008 n=5+5)
      
      Change-Id: I7cba5eb53bebef7b1fdd44598eed47241ce83167
      Reviewed-on: https://go-review.googlesource.com/c/go/+/166463Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      601eee39
    • Matthew Dempsky's avatar
      cmd/compile: don't call hcrash in Warn · 24513d33
      Matthew Dempsky authored
      Fixes #31638.
      
      Change-Id: I748f64b48b75241a9db31c9f37555379a841677a
      Reviewed-on: https://go-review.googlesource.com/c/go/+/173443
      Run-TryBot: Matthew Dempsky <mdempsky@google.com>
      Reviewed-by: default avatarKeith Randall <khr@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      24513d33
    • Brad Fitzpatrick's avatar
      net: don't crash on Windows when Lookup name has null byte in string · 2e118812
      Brad Fitzpatrick authored
      Fixes #31597
      
      Change-Id: I0db1f6f457632c49f9ecfa9d85b99b4cf7d91325
      Reviewed-on: https://go-review.googlesource.com/c/go/+/173362
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      Reviewed-by: default avatarAlex Brainman <alex.brainman@gmail.com>
      2e118812
    • Keith Randall's avatar
      Revert "cmd/compile: add signed divisibility by power of 2 rules" · 17615969
      Keith Randall authored
      This reverts CL 168038 (git 68819fb6)
      
      Reason for revert: Doesn't work on 32 bit archs.
      
      Change-Id: Idec9098060dc65bc2f774c5383f0477f8eb63a3d
      Reviewed-on: https://go-review.googlesource.com/c/go/+/173442Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      17615969
    • Bryan C. Mills's avatar
      cmd/go/internal/web: merge internal/web2 into web · 58de7c6d
      Bryan C. Mills authored
      The cmd/go/internal/web package was forked in order to support direct
      HTTPS fetches from widely-used hosting providers,¹ but direct fetches
      were subsequently dropped in CL 107657. The forked web2 package, with
      its GitHub-specific diagnostics and .netrc support, remained in use
      for module proxy support, but was not used for the initial '?go-get=1'
      path resolution, so the .netrc file was only used to fetch from
      already-resolved module protocol servers.
      
      This CL moves the .netrc support into its own (new) package,
      cmd/go/internal/auth, and consolidates the web and web2 packages back
      into just web. As a result, fetches via the web package now support
      .netrc, and fetches that previously used web2 now enforce the same
      security policies as web (such as prohibiting HTTPS-to-HTTP
      redirects).
      
      ¹https://github.com/golang/vgo/commit/63138cb6ceed7d6d4e51a8cbd568c64bd3e2b132
      
      Fixes #29591
      Fixes #29888
      Fixes #30610
      Updates #26232
      
      Change-Id: Ia3a13526e443679cf14a72a1f3db96f336ce5e73
      Reviewed-on: https://go-review.googlesource.com/c/go/+/170879
      Run-TryBot: Russ Cox <rsc@golang.org>
      Reviewed-by: default avatarRuss Cox <rsc@golang.org>
      Reviewed-by: default avatarJay Conrod <jayconrod@google.com>
      58de7c6d