1. 25 Nov, 2015 7 commits
    • Charles Weill's avatar
      encoding/xml: Add CDATA-wrapper output support to xml.Marshal. · 3f6b91b1
      Charles Weill authored
      Fixes #12963
      
      Change-Id: Icc50dfb6130fe1e189d45f923c2f7408d3cf9401
      Reviewed-on: https://go-review.googlesource.com/16047Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
      3f6b91b1
    • Aliaksandr Valialkin's avatar
      encoding/gob: reduce the amount of memory allocations. · a48de745
      Aliaksandr Valialkin authored
      Benchmark results:
      
      benchmark                              old ns/op     new ns/op     delta
      BenchmarkEndToEndPipe-4                7547          7294          -3.35%
      BenchmarkEndToEndByteBuffer-4          5146          5092          -1.05%
      BenchmarkEndToEndSliceByteBuffer-4     552779        439768        -20.44%
      BenchmarkEncodeComplex128Slice-4       266370        266184        -0.07%
      BenchmarkEncodeFloat64Slice-4          111891        110258        -1.46%
      BenchmarkEncodeInt32Slice-4            74482         74080         -0.54%
      BenchmarkEncodeStringSlice-4           84404         84279         -0.15%
      BenchmarkEncodeInterfaceSlice-4        3942925       3045995       -22.75%
      BenchmarkDecodeComplex128Slice-4       451837        415282        -8.09%
      BenchmarkDecodeFloat64Slice-4          283584        262558        -7.41%
      BenchmarkDecodeInt32Slice-4            246571        237383        -3.73%
      BenchmarkDecodeStringSlice-4           734210        479625        -34.67%
      BenchmarkDecodeInterfaceSlice-4        4778225       4160935       -12.92%
      
      benchmark                              old allocs     new allocs     delta
      BenchmarkEndToEndPipe-4                3              2              -33.33%
      BenchmarkEndToEndByteBuffer-4          3              2              -33.33%
      BenchmarkEndToEndSliceByteBuffer-4     1002           402            -59.88%
      BenchmarkEncodeComplex128Slice-4       1              1              +0.00%
      BenchmarkEncodeFloat64Slice-4          1              1              +0.00%
      BenchmarkEncodeInt32Slice-4            1              1              +0.00%
      BenchmarkEncodeStringSlice-4           1              1              +0.00%
      BenchmarkEncodeInterfaceSlice-4        3001           1              -99.97%
      BenchmarkDecodeComplex128Slice-4       188            185            -1.60%
      BenchmarkDecodeFloat64Slice-4          188            185            -1.60%
      BenchmarkDecodeInt32Slice-4            188            185            -1.60%
      BenchmarkDecodeStringSlice-4           2188           1185           -45.84%
      BenchmarkDecodeInterfaceSlice-4        6197           4194           -32.32%
      
      benchmark                              old bytes     new bytes     delta
      BenchmarkEndToEndPipe-4                64            48            -25.00%
      BenchmarkEndToEndByteBuffer-4          64            48            -25.00%
      BenchmarkEndToEndSliceByteBuffer-4     34551         10554         -69.45%
      BenchmarkEncodeComplex128Slice-4       55            55            +0.00%
      BenchmarkEncodeFloat64Slice-4          33            33            +0.00%
      BenchmarkEncodeInt32Slice-4            32            32            +0.00%
      BenchmarkEncodeStringSlice-4           36            36            +0.00%
      BenchmarkEncodeInterfaceSlice-4        144555        347           -99.76%
      BenchmarkDecodeComplex128Slice-4       28240         28097         -0.51%
      BenchmarkDecodeFloat64Slice-4          11840         11697         -1.21%
      BenchmarkDecodeInt32Slice-4            10817         10673         -1.33%
      BenchmarkDecodeStringSlice-4           56128         39985         -28.76%
      BenchmarkDecodeInterfaceSlice-4        132565        100421        -24.25%
      
      Change-Id: Ief7c7706b1f2916486ab7190b81aafbb16b70f1e
      Reviewed-on: https://go-review.googlesource.com/13660Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
      a48de745
    • Erik Dubbelboer's avatar
      encoding/json: check if Number is valid · c4be790c
      Erik Dubbelboer authored
      json.Number is a special case which didn't have any checks and could result in invalid JSON.
      
      Fixes #10281
      
      Change-Id: Ie3e726e4d6bf6a6aba535d36f6107013ceac913a
      Reviewed-on: https://go-review.googlesource.com/12250Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
      c4be790c
    • Joe Tsai's avatar
      hash/crc32: add noescape tags to assembly functions · 64cc5fd0
      Joe Tsai authored
      CRC-32 computation is stateless and the p slice does not get stored
      anywhere. Thus, we mark the assembly functions as noescape so that
      it doesn't believe that p leaks in:
      	func Update(crc uint32, tab *Table, p []byte) uint32
      
      Before:
      	./crc32.go:153: leaking param: p
      
      After:
      	./crc32.go:153: Update p does not escape
      
      Change-Id: I52ba35b6cc544fff724327140e0c27898431d1dc
      Reviewed-on: https://go-review.googlesource.com/17069Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
      64cc5fd0
    • Brad Fitzpatrick's avatar
      net/http: more HTTP/2 tests and fixes · e5956bca
      Brad Fitzpatrick authored
      This compares the behavior of server handlers and the net/http
      Transport in both HTTP/1 and HTTP/2 mode and verifies they're the
      same.
      
      This also moves some client<->server tests into clientserver_test.go.
      Many of them were in serve_test.go or transport_test.go but were
      basically testing both.
      
      h2_bundle.go is an update of the golang.org/x/net/http2 code
      from https://golang.org/cl/17204 (x/net git rev c745c36eab10)
      
      Fixes #13315
      Fixes #13316
      Fixes #13317
      Fixes other stuff found in the process too
      Updates #6891 (http2 support in general)
      
      Change-Id: Id9c45fad44cdf70ac95d2b89e578d66e882d3cc2
      Reviewed-on: https://go-review.googlesource.com/17205Reviewed-by: 's avatarAndrew Gerrand <adg@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      e5956bca
    • Michael Hudson-Doyle's avatar
      runtime: fix conflict resolution in golang.org/cl/14207 · fd2bc868
      Michael Hudson-Doyle authored
      Fixes testshared on arm64 and ppc64le.
      
      Change-Id: Ie94bc0c85c7666fbb5ab6fc6d3dbb180407a9955
      Reviewed-on: https://go-review.googlesource.com/17212Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      fd2bc868
    • Shenghou Ma's avatar
      runtime: check that masks and shifts are correct aligned · 3583a44e
      Shenghou Ma authored
      We need a runtime check because the original issue is encountered
      when running cross compiled windows program from linux. It's better
      to give a meaningful crash message earlier than to segfault later.
      
      The added test should not impose any measurable overhead to Go
      programs.
      
      For #12415.
      
      Change-Id: Ib4a24ef560c09c0585b351d62eefd157b6b7f04c
      Reviewed-on: https://go-review.googlesource.com/14207Reviewed-by: 's avatarKeith Randall <khr@golang.org>
      Run-TryBot: Minux Ma <minux@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      3583a44e
  2. 24 Nov, 2015 25 commits
  3. 23 Nov, 2015 8 commits