1. 25 Oct, 2017 1 commit
  2. 24 Oct, 2017 19 commits
  3. 23 Oct, 2017 5 commits
  4. 22 Oct, 2017 2 commits
  5. 21 Oct, 2017 7 commits
  6. 20 Oct, 2017 6 commits
    • Tim Cooper's avatar
      encoding/hex: add NewEncoder, NewDecoder · 6db4950d
      Tim Cooper authored
      NewEncoder returns an io.Writer that writes all incoming bytes as
      hexadecimal characters to the underlying io.Writer. NewDecoder returns an
      io.Reader that does the inverse.
      
      Fixes #21590
      
      Change-Id: Iebe0813faf365b42598f19a9aa41768f571dc0a8
      Reviewed-on: https://go-review.googlesource.com/70210Reviewed-by: 's avatarJoe Tsai <thebrokentoaster@gmail.com>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      6db4950d
    • David Crawshaw's avatar
      cmd/link: move Iself global to ctxt · d05f82a1
      David Crawshaw authored
      For #22095
      
      Change-Id: Iba3dffc782cecc15ea0e90a971a2734729984945
      Reviewed-on: https://go-review.googlesource.com/70834
      Run-TryBot: David Crawshaw <crawshaw@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      d05f82a1
    • David Crawshaw's avatar
      cmd/link: move FlagLinkshared global to ctxt · 6738c494
      David Crawshaw authored
      For #22095
      
      Change-Id: Ica6b3391541fe5a0355620d7c4a5107cf53eee82
      Reviewed-on: https://go-review.googlesource.com/70833
      Run-TryBot: David Crawshaw <crawshaw@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarDaniel Martí <mvdan@mvdan.cc>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      6738c494
    • Joe Tsai's avatar
      encoding/csv: simplify and optimize Reader · 89ccfe49
      Joe Tsai authored
      The Reader implementation is slow because it operates on a rune-by-rune
      basis via bufio.Reader.ReadRune. We speed this up by operating on entire
      lines that we read from bufio.Reader.ReadSlice.
      
      In order to ensure that we read the full line, we augment ReadSlice
      in our Reader.readLine method to automatically expand the slice if
      bufio.ErrBufferFull is every hit.
      
      This change happens to fix #19410 because it no longer relies on
      rune-by-rune parsing and only searches for the relevant delimiter rune.
      
      In order to keep column accounting simple and consistent, this change
      reverts parts of CL 52830.
      
      This CL is an alternative to CL 36270 and builds on some of the ideas
      from that change by Diogo Pinela.
      
      name                                     old time/op    new time/op    delta
      Read-8                                   3.12µs ± 1%    2.54µs ± 2%  -18.76%   (p=0.000 n=10+9)
      ReadWithFieldsPerRecord-8                3.12µs ± 1%    2.53µs ± 1%  -18.91%    (p=0.000 n=9+9)
      ReadWithoutFieldsPerRecord-8             3.13µs ± 0%    2.57µs ± 3%  -18.07%  (p=0.000 n=10+10)
      ReadLargeFields-8                        52.3µs ± 1%     5.3µs ± 2%  -89.93%   (p=0.000 n=10+9)
      ReadReuseRecord-8                        2.05µs ± 1%    1.40µs ± 1%  -31.48%   (p=0.000 n=10+9)
      ReadReuseRecordWithFieldsPerRecord-8     2.05µs ± 1%    1.41µs ± 0%  -31.03%   (p=0.000 n=10+9)
      ReadReuseRecordWithoutFieldsPerRecord-8  2.06µs ± 1%    1.40µs ± 1%  -31.70%   (p=0.000 n=9+10)
      ReadReuseRecordLargeFields-8             50.9µs ± 0%     4.1µs ± 3%  -92.01%  (p=0.000 n=10+10)
      
      name                                     old alloc/op   new alloc/op
      Read-8                                       664B ± 0%      664B ± 0%
      ReadWithFieldsPerRecord-8                    664B ± 0%      664B ± 0%
      ReadWithoutFieldsPerRecord-8                 664B ± 0%      664B ± 0%
      ReadLargeFields-8                          3.94kB ± 0%    3.94kB ± 0%
      ReadReuseRecord-8                           24.0B ± 0%     24.0B ± 0%
      ReadReuseRecordWithFieldsPerRecord-8        24.0B ± 0%     24.0B ± 0%
      ReadReuseRecordWithoutFieldsPerRecord-8     24.0B ± 0%     24.0B ± 0%
      ReadReuseRecordLargeFields-8               2.98kB ± 0%    2.98kB ± 0%
      
      name                                     old allocs/op  new allocs/op
      Read-8                                       18.0 ± 0%      18.0 ± 0%
      ReadWithFieldsPerRecord-8                    18.0 ± 0%      18.0 ± 0%
      ReadWithoutFieldsPerRecord-8                 18.0 ± 0%      18.0 ± 0%
      ReadLargeFields-8                            24.0 ± 0%      24.0 ± 0%
      ReadReuseRecord-8                            8.00 ± 0%      8.00 ± 0%
      ReadReuseRecordWithFieldsPerRecord-8         8.00 ± 0%      8.00 ± 0%
      ReadReuseRecordWithoutFieldsPerRecord-8      8.00 ± 0%      8.00 ± 0%
      ReadReuseRecordLargeFields-8                 12.0 ± 0%      12.0 ± 0%
      
      Updates #22352
      Updates #19019
      Fixes #16791
      Fixes #19410
      
      Change-Id: I31c27cfcc56880e6abac262f36c947179b550bbf
      Reviewed-on: https://go-review.googlesource.com/72150Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      89ccfe49
    • Ian Lance Taylor's avatar
      runtime: for kqueue treat EVFILT_READ with EV_EOF as permitting a write · 23aad448
      Ian Lance Taylor authored
      On systems that use kqueue, we always register descriptors for both
      EVFILT_READ and EVFILT_WRITE. On at least FreeBSD and OpenBSD, when
      the write end of a pipe is registered for EVFILT_READ and EVFILT_WRITE
      events, and the read end of the pipe is closed, kqueue reports an
      EVFILT_READ event with EV_EOF set, but does not report an EVFILT_WRITE
      event. Since the write to the pipe is waiting for an EVFILT_WRITE
      event, closing the read end of a pipe can cause the write end to hang
      rather than attempt another write which will fail with EPIPE.
      
      Fix this by treating EVFILT_READ with EV_EOF set as making both reads
      and writes ready to proceed.
      
      The real test for this is in CL 71770, which tests using various
      timeouts with pipes.
      
      Updates #22114
      
      Change-Id: Ib23fbaaddbccd8eee77bdf18f27a7f0aa50e2742
      Reviewed-on: https://go-review.googlesource.com/71973Reviewed-by: 's avatarMatthew Dempsky <mdempsky@google.com>
      23aad448
    • Matthew Dempsky's avatar
      cmd/compile: prevent inlining go:yeswritebarrierrec functions · 4e64ee42
      Matthew Dempsky authored
      Fixes #22342.
      
      Change-Id: Ic942162e98dce5749e381a31d58b0bf16c7d6f98
      Reviewed-on: https://go-review.googlesource.com/72132
      Run-TryBot: Matthew Dempsky <mdempsky@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarAustin Clements <austin@google.com>
      4e64ee42