1. 25 Oct, 2017 20 commits
    • Adam Thomason's avatar
      cmd/go: add -shift to go vet's flag whitelist · 4aa28896
      Adam Thomason authored
      CL 40112 intended to allow full flag processing in go vet, but missed
      vet's -shift flag; this corrects the omission.
      
      Fixes #22442
      
      Change-Id: I47525018306bd8b9aa452fb378d0d45319f8cf11
      Reviewed-on: https://go-review.googlesource.com/73553
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      4aa28896
    • Michael Fraenkel's avatar
      io: flatten MultiWriter writers · 060d1a57
      Michael Fraenkel authored
      Replace any nested Writer that is a MultiWriter with its associated
      Writers.
      
      Fixes #22431
      
      Change-Id: Ida7c4c83926363c1780689e216cf0c5241a5b8eb
      Reviewed-on: https://go-review.googlesource.com/73470
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      060d1a57
    • Lynn Boger's avatar
      cmd/go: enable TestNoteReading on ppc64le · b4e207d7
      Lynn Boger authored
      This test was previously disabled when external linking was
      unsupported on ppc64le. It should still be disabled on ppc64
      since there is no cgo or external linking there, but I removed
      the if test for GOARCH=ppc64 since the initial test for cgo
      enabled will cause it to be skipped on ppc64.
      
      Fixes #22360
      
      Change-Id: I5a0e3e4a1bd71ac7bf0ed0c792f7b78fb4a5e100
      Reviewed-on: https://go-review.googlesource.com/73510
      Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      b4e207d7
    • Henry's avatar
      net/smtp: added Noop to Client · 8b8e57b7
      Henry authored
      This adds a Noop() function to the net/stmp client.
      
      It allows for testing if a connaction is still healthy.
      
      Fixes #22321
      
      Change-Id: I023b613b1536ea21274cc36d41f5720c9bbdecbc
      Reviewed-on: https://go-review.googlesource.com/71650
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      8b8e57b7
    • Lorenz Bauer's avatar
      net: make {TCP,Unix}Listener implement syscall.Conn · eed308de
      Lorenz Bauer authored
      This change adds the syscall.Conn interface to Listener types, with the caveat that only RawConn.Control is supported. Custom socket options can now be set safely.
      
      Updates #19435
      Fixes #22065
      
      Change-Id: I7e74780d00318dc54a923d1c628a18a36009acab
      Reviewed-on: https://go-review.googlesource.com/71651
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      eed308de
    • Daniel Theophanes's avatar
      database/sql: scan into *time.Time without reflection · ff4ee881
      Daniel Theophanes authored
      Previously scanning time.Time into a *time.Time required reflection.
      Now it does not. Scanning already checked if the source value was of
      type time.Time. The only addition was checking the destination was
      of type *time.Time.
      
      Existing tests already scan time.Time into *time.Time, so no new
      tests were added. Linked issue has performance justification.
      
      Fixes #22300
      
      Change-Id: I4eea461c78fad71ce76e7677c8503a1919666931
      Reviewed-on: https://go-review.googlesource.com/73232
      Run-TryBot: Daniel Theophanes <kardianos@gmail.com>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      ff4ee881
    • Ian Lance Taylor's avatar
      os: add deadline methods for File type · 187957d3
      Ian Lance Taylor authored
      Add SetDeadline, SetReadDeadline, and SetWriteDeadline methods to os.File,
      just as they exist today for the net package.
      
      Fixes #22114
      
      Change-Id: I4d390d739169b991175baba676010897dc8568fa
      Reviewed-on: https://go-review.googlesource.com/71770
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarDavid Crawshaw <crawshaw@golang.org>
      Reviewed-by: 's avatarJoe Tsai <thebrokentoaster@gmail.com>
      187957d3
    • Daniel Theophanes's avatar
      database/sql: ensure all driver interfaces are called under single lock · 1126d148
      Daniel Theophanes authored
      Russ pointed out in a previous CL golang.org/cl/65731 that not only
      was the locking incomplete, previous changes did not correctly
      lock driver calls in other sections. After inspecting
      driverConn, driverStmt, driverResult, Tx, and Rows structs
      where driver interfaces are stored, I discovered a few more places
      that failed to lock driver calls. The largest of these
      was the parameter type converter "driverArgs".
      
      driverArgs was typically called right before another call to the
      driver in a locked region, so I made the entire driverArgs expect
      a locked driver mutex and combined the region. This should not
      be a problem because the connection is pulled out of the connection
      pool either way so there shouldn't be contention.
      
      Fixes #21117
      
      Change-Id: I88d46f74dca25fb11a30f0bf8e79785a73133d23
      Reviewed-on: https://go-review.googlesource.com/71433
      Run-TryBot: Daniel Theophanes <kardianos@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
      1126d148
    • Russ Cox's avatar
      runtime: avoid monotonic time zero on systems with low-res timers · 98658212
      Russ Cox authored
      Otherwise low-res timers cause problems at call sites that expect to
      be able to use 0 as meaning "no time set" and therefore expect that
      nanotime never returns 0 itself. For example, sched.lastpoll == 0
      means no last poll.
      
      Fixes #22394.
      
      Change-Id: Iea28acfddfff6f46bc90f041ec173e0fea591285
      Reviewed-on: https://go-review.googlesource.com/73410
      Run-TryBot: Russ Cox <rsc@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      Reviewed-by: 's avatarAustin Clements <austin@google.com>
      98658212
    • Russ Cox's avatar
      doc: document Go 1.9.2 · eb7e8450
      Russ Cox authored
      Change-Id: I7d63e747e798d588bdcf2b79b6ecd21fce7bbc9c
      Reviewed-on: https://go-review.googlesource.com/73391
      Run-TryBot: Russ Cox <rsc@golang.org>
      Reviewed-by: 's avatarChris Broadfoot <cbro@golang.org>
      eb7e8450
    • Russ Cox's avatar
      doc: document Go 1.8.5 · 381b6807
      Russ Cox authored
      Change-Id: I9241e6acb65c337b961eed9cdeaf4c041b6326a3
      Reviewed-on: https://go-review.googlesource.com/73390
      Run-TryBot: Russ Cox <rsc@golang.org>
      Reviewed-by: 's avatarChris Broadfoot <cbro@golang.org>
      381b6807
    • Russ Cox's avatar
      cmd/go: explain fmt, fix, vet a bit more in go help · 321597ba
      Russ Cox authored
      Fixes #20918.
      
      Change-Id: I84306242084631bbe7a9adc839f92e72ac1a3e75
      Reviewed-on: https://go-review.googlesource.com/73331
      Run-TryBot: Russ Cox <rsc@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      321597ba
    • Wei Xiao's avatar
      bytes: add optimized Equal for arm64 · 78ddf274
      Wei Xiao authored
      Use SIMD instructions when comparing chunks bigger than 16 bytes.
      Benchmark results of bytes:
      
      name                 old time/op    new time/op    delta
      Equal/0-8              6.52ns ± 1%    5.51ns ± 0%   -15.43%  (p=0.000 n=8+9)
      Equal/1-8              11.5ns ± 0%    10.5ns ± 0%    -8.70%  (p=0.000 n=10+10)
      Equal/6-8              19.0ns ± 0%    13.5ns ± 0%   -28.95%  (p=0.000 n=10+10)
      Equal/9-8              31.0ns ± 0%    13.5ns ± 0%   -56.45%  (p=0.000 n=10+10)
      Equal/15-8             40.0ns ± 0%    15.5ns ± 0%   -61.25%  (p=0.000 n=10+10)
      Equal/16-8             41.5ns ± 0%    14.5ns ± 0%   -65.06%  (p=0.000 n=10+10)
      Equal/20-8             47.5ns ± 0%    17.0ns ± 0%   -64.21%  (p=0.000 n=10+10)
      Equal/32-8             65.6ns ± 0%    17.0ns ± 0%   -74.09%  (p=0.000 n=10+10)
      Equal/4K-8             6.17µs ± 0%    0.57µs ± 1%   -90.76%  (p=0.000 n=10+10)
      Equal/4M-8             6.41ms ± 0%    1.11ms ±14%   -82.71%  (p=0.000 n=8+10)
      Equal/64M-8             104ms ± 0%      33ms ± 0%   -68.64%  (p=0.000 n=10+10)
      EqualPort/1-8          13.0ns ± 0%    13.0ns ± 0%      ~     (all equal)
      EqualPort/6-8          22.0ns ± 0%    22.7ns ± 0%    +3.06%  (p=0.000 n=8+9)
      EqualPort/32-8         78.1ns ± 0%    78.1ns ± 0%      ~     (all equal)
      EqualPort/4K-8         7.54µs ± 0%    7.61µs ± 0%    +0.92%  (p=0.000 n=10+8)
      EqualPort/4M-8         8.16ms ± 2%    8.05ms ± 1%    -1.31%  (p=0.023 n=10+10)
      EqualPort/64M-8         142ms ± 0%     142ms ± 0%    +0.37%  (p=0.000 n=10+10)
      CompareBytesEqual-8    39.0ns ± 0%    41.6ns ± 2%    +6.67%  (p=0.000 n=9+10)
      
      name                 old speed      new speed      delta
      Equal/1-8            86.9MB/s ± 0%  95.2MB/s ± 0%    +9.53%  (p=0.000 n=8+8)
      Equal/6-8             315MB/s ± 0%   444MB/s ± 0%   +40.74%  (p=0.000 n=9+10)
      Equal/9-8             290MB/s ± 0%   666MB/s ± 0%  +129.63%  (p=0.000 n=8+10)
      Equal/15-8            375MB/s ± 0%   967MB/s ± 0%  +158.09%  (p=0.000 n=10+10)
      Equal/16-8            385MB/s ± 0%  1103MB/s ± 0%  +186.24%  (p=0.000 n=10+9)
      Equal/20-8            421MB/s ± 0%  1175MB/s ± 0%  +179.44%  (p=0.000 n=9+10)
      Equal/32-8            488MB/s ± 0%  1881MB/s ± 0%  +285.34%  (p=0.000 n=10+8)
      Equal/4K-8            664MB/s ± 0%  7181MB/s ± 1%  +981.32%  (p=0.000 n=10+10)
      Equal/4M-8            654MB/s ± 0%  3822MB/s ±16%  +484.15%  (p=0.000 n=8+10)
      Equal/64M-8           645MB/s ± 0%  2056MB/s ± 0%  +218.90%  (p=0.000 n=10+10)
      EqualPort/1-8        76.8MB/s ± 0%  76.7MB/s ± 0%    -0.09%  (p=0.023 n=10+10)
      EqualPort/6-8         272MB/s ± 0%   264MB/s ± 0%    -2.94%  (p=0.000 n=8+10)
      EqualPort/32-8        410MB/s ± 0%   410MB/s ± 0%    +0.01%  (p=0.004 n=9+10)
      EqualPort/4K-8        543MB/s ± 0%   538MB/s ± 0%    -0.91%  (p=0.000 n=9+9)
      EqualPort/4M-8        514MB/s ± 2%   521MB/s ± 1%    +1.31%  (p=0.023 n=10+10)
      EqualPort/64M-8       473MB/s ± 0%   472MB/s ± 0%    -0.37%  (p=0.000 n=10+10)
      
      Benchmark results of go1:
      
      name                     old time/op    new time/op    delta
      BinaryTree17-8              6.53s ± 0%     6.52s ± 2%    ~     (p=0.286 n=4+5)
      Fannkuch11-8                6.35s ± 1%     6.33s ± 0%    ~     (p=0.690 n=5+5)
      FmtFprintfEmpty-8           108ns ± 1%      99ns ± 1%  -8.31%  (p=0.008 n=5+5)
      FmtFprintfString-8          172ns ± 1%     188ns ± 0%  +9.43%  (p=0.016 n=5+4)
      FmtFprintfInt-8             207ns ± 0%     202ns ± 0%  -2.42%  (p=0.008 n=5+5)
      FmtFprintfIntInt-8          277ns ± 1%     271ns ± 1%  -2.02%  (p=0.008 n=5+5)
      FmtFprintfPrefixedInt-8     386ns ± 0%     380ns ± 0%  -1.55%  (p=0.008 n=5+5)
      FmtFprintfFloat-8           492ns ± 0%     494ns ± 1%    ~     (p=0.175 n=4+5)
      FmtManyArgs-8              1.32µs ± 1%    1.31µs ± 2%    ~     (p=0.651 n=5+5)
      GobDecode-8                16.8ms ± 2%    16.9ms ± 1%    ~     (p=0.310 n=5+5)
      GobEncode-8                14.1ms ± 1%    14.1ms ± 1%    ~     (p=1.000 n=5+5)
      Gzip-8                      788ms ± 0%     789ms ± 0%    ~     (p=0.548 n=5+5)
      Gunzip-8                   83.6ms ± 0%    83.6ms ± 0%    ~     (p=0.548 n=5+5)
      HTTPClientServer-8          120µs ± 0%     120µs ± 1%    ~     (p=0.690 n=5+5)
      JSONEncode-8               33.2ms ± 0%    33.6ms ± 0%  +1.20%  (p=0.008 n=5+5)
      JSONDecode-8                152ms ± 1%     146ms ± 1%  -3.70%  (p=0.008 n=5+5)
      Mandelbrot200-8            10.0ms ± 0%    10.0ms ± 0%    ~     (p=0.151 n=5+5)
      GoParse-8                  7.97ms ± 0%    8.06ms ± 0%  +1.15%  (p=0.008 n=5+5)
      RegexpMatchEasy0_32-8       233ns ± 1%     239ns ± 4%    ~     (p=0.135 n=5+5)
      RegexpMatchEasy0_1K-8      1.86µs ± 0%    1.86µs ± 0%    ~     (p=0.167 n=5+5)
      RegexpMatchEasy1_32-8       250ns ± 0%     263ns ± 1%  +5.28%  (p=0.008 n=5+5)
      RegexpMatchEasy1_1K-8      2.28µs ± 0%    2.13µs ± 0%  -6.64%  (p=0.000 n=4+5)
      RegexpMatchMedium_32-8      332ns ± 1%     319ns ± 0%  -3.97%  (p=0.008 n=5+5)
      RegexpMatchMedium_1K-8     85.5µs ± 2%    79.1µs ± 1%  -7.42%  (p=0.008 n=5+5)
      RegexpMatchHard_32-8       4.34µs ± 1%    4.42µs ± 7%    ~     (p=0.881 n=5+5)
      RegexpMatchHard_1K-8        130µs ± 1%     127µs ± 0%  -2.18%  (p=0.008 n=5+5)
      Revcomp-8                   1.35s ± 1%     1.34s ± 0%  -0.58%  (p=0.016 n=5+4)
      Template-8                  160ms ± 2%     158ms ± 1%    ~     (p=0.222 n=5+5)
      TimeParse-8                 795ns ± 2%     772ns ± 2%  -2.87%  (p=0.024 n=5+5)
      TimeFormat-8                782ns ± 0%     784ns ± 0%    ~     (p=0.198 n=5+5)
      
      name                     old speed      new speed      delta
      GobDecode-8              45.8MB/s ± 2%  45.5MB/s ± 1%    ~     (p=0.310 n=5+5)
      GobEncode-8              54.3MB/s ± 1%  54.4MB/s ± 1%    ~     (p=0.984 n=5+5)
      Gzip-8                   24.6MB/s ± 0%  24.6MB/s ± 0%    ~     (p=0.540 n=5+5)
      Gunzip-8                  232MB/s ± 0%   232MB/s ± 0%    ~     (p=0.548 n=5+5)
      JSONEncode-8             58.4MB/s ± 0%  57.7MB/s ± 0%  -1.19%  (p=0.008 n=5+5)
      JSONDecode-8             12.8MB/s ± 1%  13.3MB/s ± 1%  +3.85%  (p=0.008 n=5+5)
      GoParse-8                7.27MB/s ± 0%  7.18MB/s ± 0%  -1.13%  (p=0.008 n=5+5)
      RegexpMatchEasy0_32-8     137MB/s ± 1%   134MB/s ± 4%    ~     (p=0.151 n=5+5)
      RegexpMatchEasy0_1K-8     551MB/s ± 0%   550MB/s ± 0%    ~     (p=0.222 n=5+5)
      RegexpMatchEasy1_32-8     128MB/s ± 0%   121MB/s ± 1%  -5.09%  (p=0.008 n=5+5)
      RegexpMatchEasy1_1K-8     449MB/s ± 0%   481MB/s ± 0%  +7.12%  (p=0.016 n=4+5)
      RegexpMatchMedium_32-8   3.00MB/s ± 0%  3.13MB/s ± 0%  +4.33%  (p=0.016 n=4+5)
      RegexpMatchMedium_1K-8   12.0MB/s ± 2%  12.9MB/s ± 1%  +7.98%  (p=0.008 n=5+5)
      RegexpMatchHard_32-8     7.38MB/s ± 1%  7.25MB/s ± 7%    ~     (p=0.952 n=5+5)
      RegexpMatchHard_1K-8     7.88MB/s ± 1%  8.05MB/s ± 0%  +2.21%  (p=0.008 n=5+5)
      Revcomp-8                 188MB/s ± 1%   189MB/s ± 0%  +0.58%  (p=0.016 n=5+4)
      Template-8               12.2MB/s ± 2%  12.3MB/s ± 1%    ~     (p=0.183 n=5+5)
      
      Change-Id: I65e79f3f8f8b2914678311c4f1b0a2d98459e220
      Reviewed-on: https://go-review.googlesource.com/71110Reviewed-by: 's avatarCherry Zhang <cherryyz@google.com>
      Run-TryBot: Cherry Zhang <cherryyz@google.com>
      78ddf274
    • Tobias Klauser's avatar
      runtime/internal/sys: use boolean constants for sys.BigEndian · 0c68b79e
      Tobias Klauser authored
      The BigEndian constant is only used in boolean context so assign it
      boolean constants.
      
      Change-Id: If19d61dd71cdfbffede1d98b401f11e6535fba59
      Reviewed-on: https://go-review.googlesource.com/73270
      Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      0c68b79e
    • Jason Wangsadinata's avatar
      container/ring: add examples for various Ring functions · bbafa21b
      Jason Wangsadinata authored
      Change-Id: I6b16cfcbe824f999c9b64df539deea567e327db7
      Reviewed-on: https://go-review.googlesource.com/73090Reviewed-by: 's avatarGabriel Aszalos <gabriel.aszalos@gmail.com>
      Reviewed-by: 's avatarJason Wangsadinata <jwangsadinata@gmail.com>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      Run-TryBot: Gabriel Aszalos <gabriel.aszalos@gmail.com>
      bbafa21b
    • Sergey Semin's avatar
      log: Remove unnecessary else · 883e08a3
      Sergey Semin authored
      Change-Id: I868f5101dd44f427d6504a8dbb198c06107be00e
      Reviewed-on: https://go-review.googlesource.com/72380
      Run-TryBot: Gabriel Aszalos <gabriel.aszalos@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarJoe Tsai <thebrokentoaster@gmail.com>
      883e08a3
    • Russ Cox's avatar
      cmd/link: only adjust pagezero for iOS on darwin/arm64 · 4a5b99c3
      Russ Cox authored
      The new pagezero_size introduced by CL 72730 breaks
      on 32-bit systems, since it is 2³². Restrict the change to
      darwin/arm64, since it is intended for iOS only.
      
      We could plausibly allow GOARCH=amd64 as well, but
      without a compelling reason, changing the zero page size
      doesn't seem worth the risk.
      
      Change-Id: I5d6adcbaff8d0e5b169ff13512f188332cc7ed9a
      Reviewed-on: https://go-review.googlesource.com/73250
      Run-TryBot: Russ Cox <rsc@golang.org>
      Run-TryBot: David Crawshaw <crawshaw@golang.org>
      Reviewed-by: 's avatarDavid Crawshaw <crawshaw@golang.org>
      4a5b99c3
    • Joe Tsai's avatar
      encoding/csv: forbid certain Comma and Comment runes · e7fed7fa
      Joe Tsai authored
      The record delimiter (not configurable by user) is "\r\n" or "\n".
      It is insensible for the user to set Comma or Comment delimiters
      to be some character that conflicts with the record delimiter.
      Furthermore, it is insensible for Comma or Comment to be the same rune.
      Allowing this leaks implementation details to the user in regards to
      the evaluation order of which rune is checked for first.
      
      Fixes #22404
      
      Change-Id: I31e86abc9b3a8fb4584e090477795587740970ae
      Reviewed-on: https://go-review.googlesource.com/72793Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      e7fed7fa
    • Russ Cox's avatar
      build: move final steps of make.bash, make.bat, make.rc into cmd/dist · aedb79f0
      Russ Cox authored
      This CL expands the job of "dist bootstrap" to be "finish make.bash".
      I need to change that logic in upcoming CLs related to cmd/go
      changes, and I'd rather not change it in three places in three different
      shell script languages.
      
      Change-Id: I545dc215e408289e4d0b28f7c2ffcd849d89ad3b
      Reviewed-on: https://go-review.googlesource.com/72870Reviewed-by: 's avatarDavid Crawshaw <crawshaw@golang.org>
      aedb79f0
    • Ian Lance Taylor's avatar
      runtime: unify arm entry point code · d92aaa97
      Ian Lance Taylor authored
      Change-Id: Id51a2d63f7199b3ff71cedd415345ad20e5bd981
      Reviewed-on: https://go-review.googlesource.com/70791Reviewed-by: 's avatarAustin Clements <austin@google.com>
      d92aaa97
  2. 24 Oct, 2017 19 commits
  3. 23 Oct, 2017 1 commit