1. 17 Nov, 2015 12 commits
  2. 16 Nov, 2015 16 commits
  3. 15 Nov, 2015 7 commits
  4. 14 Nov, 2015 5 commits
    • Håvard Haugen's avatar
      encoding/json: use reflect.SetBytes when decoding bytes · c60707b1
      Håvard Haugen authored
      This allows slices of custom types with byte as underlying type to be
      decoded, fixing a regression introduced in CL 9371.
      
      Fixes #12921.
      
      Change-Id: I62a715eaeaaa912b6bc599e94f9981a9ba5cb242
      Reviewed-on: https://go-review.googlesource.com/16303Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      c60707b1
    • Didier Spezia's avatar
      cmd/compile: regenerate builtin.go · 0624fd3f
      Didier Spezia authored
      Following a recent change, file builtin.go is not up-to-date.
      Generate it again by running go generate.
      
      Fixes #13203
      
      Change-Id: Ib91c5ccc93665c043da95c7d3783ce5d94e48466
      Reviewed-on: https://go-review.googlesource.com/16821Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      0624fd3f
    • Shenghou Ma's avatar
      cmd/dist: disable shootout/spectralnorm on linux/mips64 builder · 3a96bf0d
      Shenghou Ma authored
      It is too slow with kernel FPU emulator.
      
      Updates #12688.
      
      Change-Id: Ib3a5adfeb46e894550231b14eb0f4fb20aecee11
      Reviewed-on: https://go-review.googlesource.com/16922Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      3a96bf0d
    • Ian Lance Taylor's avatar
      cmd/link, cmd/go, cmd/dist: use copy of libgcc.a for internal linking · 754f707f
      Ian Lance Taylor authored
      Change the linker to use a copy of the C compiler support library,
      libgcc.a, when doing internal linking.  This will be used to satisfy any
      undefined symbols referenced by host objects.
      
      Change the dist tool to copy the support library into a new directory
      tree under GOROOT/pkg/libgcc.  This ensures that libgcc is available
      even when building Go programs on a system that has no C compiler.  The
      C compiler is required when building the Go installation in the first
      place, but is not required thereafter.
      
      Change the go tool to not link libgcc into cgo objects.
      
      Correct the linker handling of a weak symbol in an ELF input object to
      not always create a new symbol, but to use an existing symbol if there
      is one; this is necessary on freebsd-amd64, where libgcc contains a weak
      definition of compilerrt_abort_impl.
      
      Fixes #9510.
      
      Change-Id: I1ab28182263238d9bcaf6a42804e5da2a87d8778
      Reviewed-on: https://go-review.googlesource.com/16741Reviewed-by: default avatarRuss Cox <rsc@golang.org>
      754f707f
    • Brad Fitzpatrick's avatar
      crypto/tls, crypto/aes: remove allocations when Writing & Reading · 5a0d9ef8
      Brad Fitzpatrick authored
      benchmark          old ns/op     new ns/op     delta
      BenchmarkTLS-4     8571          7938          -7.39%
      
      benchmark          old MB/s     new MB/s     speedup
      BenchmarkTLS-4     119.46       128.98       1.08x
      
      benchmark          old allocs     new allocs     delta
      BenchmarkTLS-4     8              0              -100.00%
      
      benchmark          old bytes     new bytes     delta
      BenchmarkTLS-4     128           0             -100.00%
      
      On:
      
      func BenchmarkTLS(b *testing.B) {
              b.ReportAllocs()
              b.SetBytes(1024)
              ts := httptest.NewTLSServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
                      io.Copy(ioutil.Discard, r.Body)
              }))
              defer ts.Close()
              buf := make([]byte, 1024)
              for i := range buf {
                      buf[i] = byte(i)
              }
              c, err := tls.Dial("tcp", ts.Listener.Addr().String(), &tls.Config{
                      InsecureSkipVerify: true,
              })
              if err != nil {
                      b.Fatal(err)
              }
              defer c.Close()
              clen := int64(b.N) * 1024
              if _, err := c.Write([]byte(
                  "POST / HTTP/1.1\r\nHost: foo\r\nContent-Length: " +
                  fmt.Sprint(clen) + "\r\n\r\n")); err != nil {
                      b.Fatal(err)
              }
              b.ResetTimer()
              for i := 0; i < b.N; i++ {
                      if _, err := c.Write(buf); err != nil {
                              b.Fatal(err)
                      }
              }
      }
      
      Change-Id: I206e7e2118b97148f9751b740d8470895634d3f5
      Reviewed-on: https://go-review.googlesource.com/16828Reviewed-by: default avatarAdam Langley <agl@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      5a0d9ef8