1. 29 Apr, 2015 24 commits
  2. 28 Apr, 2015 16 commits
    • Nigel Tao's avatar
      image/gif: encode disposal, bg index and Config. · baf3814b
      Nigel Tao authored
      The previous CL implemented decoding, but not encoding.
      
      Also return the global color map (if present) for DecodeConfig.
      
      Change-Id: I3b99c93720246010c9fe0924dc40a67875dfc852
      Reviewed-on: https://go-review.googlesource.com/9389Reviewed-by: 's avatarRob Pike <r@golang.org>
      baf3814b
    • Ian Lance Taylor's avatar
      runtime/cgo: use PTHREAD_{MUTEX,COND}_INITIALIZER · 0c62c93a
      Ian Lance Taylor authored
      Technically you must initialize static pthread_mutex_t and
      pthread_cond_t variables with the appropriate INITIALIZER macro.  In
      practice the default initializers are zero anyhow, but it's still good
      code hygiene.
      
      Change-Id: I517304b16c2c7943b3880855c1b47a9a506b4bdf
      Reviewed-on: https://go-review.googlesource.com/9433Reviewed-by: 's avatarDavid Crawshaw <crawshaw@golang.org>
      0c62c93a
    • Brad Fitzpatrick's avatar
      net/http: documentation updates · 339cf980
      Brad Fitzpatrick authored
      Fixes #10366 (how to set custom headers)
      Fixes #9836 (PATCH in PostForm)
      Fixes #9276 (generating a server-side Request for testing)
      Update #8991 (clarify Response.Write for now; export ReverseProxy's copy later?)
      
      Change-Id: I95a11bf3bb3eeeeb72775b6ebfbc761641addc35
      Reviewed-on: https://go-review.googlesource.com/9410Reviewed-by: 's avatarDavid Crawshaw <crawshaw@golang.org>
      339cf980
    • Rob Pike's avatar
      doc/go1.5.txt: snow leopard not maintained · ac354ba7
      Rob Pike authored
      Change-Id: If50fd2dd4005d0ce39081c6b8302707403c139f9
      Reviewed-on: https://go-review.googlesource.com/9432Reviewed-by: 's avatarRob Pike <r@golang.org>
      ac354ba7
    • Brad Fitzpatrick's avatar
      net/http: test and document suppressing implicit Content-Type response header · 5ed44e9d
      Brad Fitzpatrick authored
      No code changes.
      
      Fixes #8992
      
      Change-Id: I10c8340a4f8e3e7add9b3ac5aa0a1e8d8aa49f40
      Reviewed-on: https://go-review.googlesource.com/9412Reviewed-by: 's avatarDavid Crawshaw <crawshaw@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      5ed44e9d
    • Rob Pike's avatar
      cmd/doc: print documentation for all matches in a package, not just the first · d3bd6b6a
      Rob Pike authored
      Change-Id: Id0d4ac7169f741dfeec7b1e67bdc21e49ae37b9e
      Reviewed-on: https://go-review.googlesource.com/9430Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
      d3bd6b6a
    • Rob Pike's avatar
      cmd/asm: add comments back for aliases on jumps for x86 · a88994c1
      Rob Pike authored
      These were lost in the transition from 8a/6a to asm.
      Also, in the process, discover more aliases. I'm betting the missing
      ones were a casualty of the recent merge of 386 and amd64.
      
      Update #10385.
      
      Change-Id: I1681034b25af3ffc103f75e5fc57baca5feb3fcd
      Reviewed-on: https://go-review.googlesource.com/9431Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
      a88994c1
    • Adam Langley's avatar
      doc: mention several recent crypto changes in go1.5.txt · d2d840aa
      Adam Langley authored
      Change-Id: Icf212fc7ea108ff22bb7fa9da137410d729d2569
      Reviewed-on: https://go-review.googlesource.com/9413Reviewed-by: 's avatarAdam Langley <agl@golang.org>
      d2d840aa
    • Richard Barnes's avatar
      encoding/asn1: Improved control of flags and times · 0bb96bea
      Richard Barnes authored
      This change corrects the serialization of asn1.Flag values, so that
      when set, they serialize to an empty value, and when unset, they are
      omitted. It also adds a format parameter that allows calling code
      to control whether time.Time values are serialized as UTCTime or
      GeneralizedTime.
      
      Change-Id: I6d97abf009ea317338dab30c80f35a2de7e07104
      Reviewed-on: https://go-review.googlesource.com/5970Reviewed-by: 's avatarAdam Langley <agl@golang.org>
      Run-TryBot: Adam Langley <agl@golang.org>
      0bb96bea
    • Adam Langley's avatar
      crypto/x509: allow parsing of certificates with unknown critical extensions. · d942737f
      Adam Langley authored
      Previously, unknown critical extensions were a parse error. However, for
      some cases one wishes to parse and use a certificate that may contain
      these extensions. For example, when using a certificate in a TLS server:
      it's the client's concern whether it understands the critical extensions
      but the server still wishes to parse SNI values out of the certificate
      etc.
      
      This change moves the rejection of unknown critical extensions from
      ParseCertificate to Certificate.Verify. The former will now record the
      OIDs of unknown critical extensions in the Certificate and the latter
      will fail to verify certificates with them. If a user of this package
      wishes to handle any unknown critical extensions themselves, they can
      extract the extensions from Certificate.Extensions, process them and
      remove known OIDs from Certificate.UnknownCriticalExtensions.
      
      See discussion at
      https://groups.google.com/forum/#!msg/golang-nuts/IrzoZlwalTQ/qdK1k-ogeHIJ
      and in the linked bug.
      
      Fixes #10459
      
      Change-Id: I762521a44c01160fa0901f990ba2f5d4977d7977
      Reviewed-on: https://go-review.googlesource.com/9390Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      d942737f
    • Austin Clements's avatar
      runtime: eliminate one heapBitsForObject from scanobject · 63caec5d
      Austin Clements authored
      scanobject with ptrmask!=nil is only ever called with the base
      pointer of a heap object. Currently, scanobject calls
      heapBitsForObject, which goes to a great deal of trouble to check
      that the pointer points into the heap and to find the base of the
      object it points to, both of which are completely unnecessary in
      this case.
      
      Replace this call to heapBitsForObject with much simpler logic to
      fetch the span and compute the heap bits.
      
      Benchmark results with five runs:
      
      name                                    old mean                new mean        delta
      BenchmarkBinaryTree17              9.21s × (0.95,1.02)     8.55s × (0.91,1.03)  -7.16% (p=0.022)
      BenchmarkFannkuch11                2.65s × (1.00,1.00)     2.62s × (1.00,1.00)  -1.10% (p=0.000)
      BenchmarkFmtFprintfEmpty          73.2ns × (0.99,1.01)    71.7ns × (1.00,1.01)  -1.99% (p=0.004)
      BenchmarkFmtFprintfString          302ns × (0.99,1.00)     292ns × (0.98,1.02)  -3.31% (p=0.020)
      BenchmarkFmtFprintfInt             281ns × (0.98,1.01)     279ns × (0.96,1.02)  ~ (p=0.596)
      BenchmarkFmtFprintfIntInt          482ns × (0.98,1.01)     488ns × (0.95,1.02)  ~ (p=0.419)
      BenchmarkFmtFprintfPrefixedInt     382ns × (0.99,1.01)     365ns × (0.96,1.02)  -4.35% (p=0.015)
      BenchmarkFmtFprintfFloat           475ns × (0.99,1.01)     472ns × (1.00,1.00)  ~ (p=0.108)
      BenchmarkFmtManyArgs              1.89µs × (1.00,1.01)    1.90µs × (0.94,1.02)  ~ (p=0.883)
      BenchmarkGobDecode                22.4ms × (0.99,1.01)    21.9ms × (0.92,1.04)  ~ (p=0.332)
      BenchmarkGobEncode                24.7ms × (0.98,1.02)    23.9ms × (0.87,1.07)  ~ (p=0.407)
      BenchmarkGzip                      397ms × (0.99,1.01)     398ms × (0.99,1.01)  ~ (p=0.718)
      BenchmarkGunzip                   96.7ms × (1.00,1.00)    96.9ms × (1.00,1.00)  ~ (p=0.230)
      BenchmarkHTTPClientServer         71.5µs × (0.98,1.01)    68.5µs × (0.92,1.06)  ~ (p=0.243)
      BenchmarkJSONEncode               46.1ms × (0.98,1.01)    44.9ms × (0.98,1.03)  -2.51% (p=0.040)
      BenchmarkJSONDecode               86.1ms × (0.99,1.01)    86.5ms × (0.99,1.01)  ~ (p=0.343)
      BenchmarkMandelbrot200            4.12ms × (1.00,1.00)    4.13ms × (1.00,1.00)  +0.23% (p=0.000)
      BenchmarkGoParse                  5.89ms × (0.96,1.03)    5.82ms × (0.96,1.04)  ~ (p=0.522)
      BenchmarkRegexpMatchEasy0_32       141ns × (0.99,1.01)     142ns × (1.00,1.00)  ~ (p=0.178)
      BenchmarkRegexpMatchEasy0_1K       408ns × (1.00,1.00)     392ns × (0.99,1.00)  -3.83% (p=0.000)
      BenchmarkRegexpMatchEasy1_32       122ns × (1.00,1.00)     122ns × (1.00,1.00)  ~ (p=0.178)
      BenchmarkRegexpMatchEasy1_1K       626ns × (1.00,1.01)     624ns × (0.99,1.00)  ~ (p=0.122)
      BenchmarkRegexpMatchMedium_32      202ns × (0.99,1.00)     205ns × (0.99,1.01)  +1.58% (p=0.001)
      BenchmarkRegexpMatchMedium_1K     54.4µs × (1.00,1.00)    55.5µs × (1.00,1.00)  +1.86% (p=0.000)
      BenchmarkRegexpMatchHard_32       2.68µs × (1.00,1.00)    2.71µs × (1.00,1.00)  +0.97% (p=0.002)
      BenchmarkRegexpMatchHard_1K       79.8µs × (1.00,1.01)    80.5µs × (1.00,1.01)  +0.94% (p=0.003)
      BenchmarkRevcomp                   590ms × (0.99,1.01)     585ms × (1.00,1.00)  ~ (p=0.066)
      BenchmarkTemplate                  111ms × (0.97,1.02)     112ms × (0.99,1.01)  ~ (p=0.201)
      BenchmarkTimeParse                 392ns × (1.00,1.00)     385ns × (1.00,1.00)  -1.69% (p=0.000)
      BenchmarkTimeFormat                449ns × (0.98,1.01)     448ns × (0.99,1.01)  ~ (p=0.550)
      
      Change-Id: Ie7c3830c481d96c9043e7bf26853c6c1d05dc9f4
      Reviewed-on: https://go-review.googlesource.com/9364Reviewed-by: 's avatarRick Hudson <rlh@golang.org>
      63caec5d
    • David Crawshaw's avatar
      cmd/internal/ld: remove Biobuf unget · 05d53165
      David Crawshaw authored
      The underlying *bufio.Reader does everything that's needed here.
      
      Change-Id: If0712a5b4d3142ae4bceaa2efe287eaf2b91e54e
      Reviewed-on: https://go-review.googlesource.com/9365Reviewed-by: 's avatarJosh Bleecher Snyder <josharian@gmail.com>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      05d53165
    • Russ Cox's avatar
      doc/go1.5.txt: mention goroutine scheduling change · cbbe9f63
      Russ Cox authored
      Change-Id: I43a40f0c10472b3126c06b0d4268b32b54665f12
      Reviewed-on: https://go-review.googlesource.com/9349Reviewed-by: 's avatarRob Pike <r@golang.org>
      cbbe9f63
    • Josh Bleecher Snyder's avatar
      Revert "Revert "cmd/dist: consolidate runtime CPU tests"" · 45ccea71
      Josh Bleecher Snyder authored
      This reverts commit 81c2233b.
      
      Change-Id: Ie7024f04dba6352ae79ba68d4da5c0c25844cd8c
      Reviewed-on: https://go-review.googlesource.com/9397Reviewed-by: 's avatarDave Cheney <dave@cheney.net>
      Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      45ccea71
    • Russ Cox's avatar
      cmd/internal/gc: emit typedmemmove write barrier from sgen · 2a735590
      Russ Cox authored
      Emitting it here instead of rewriting the tree earlier sets us up
      to generate an inline check, like we do for single pointers.
      But even without the inline check, generating at this level lets
      us generate significantly more efficient code, probably due to
      having fewer temporaries and less complex high-level code
      for the compiler to churn through.
      
      Revcomp is worse, almost certainly due to register pressure.
      
      name                                       old                     new          delta
      BenchmarkBinaryTree17              18.0s × (0.99,1.01)     18.0s × (0.99,1.01)  ~
      BenchmarkFannkuch11                4.43s × (1.00,1.00)     4.36s × (1.00,1.00)  -1.44%
      BenchmarkFmtFprintfEmpty           114ns × (0.95,1.05)      86ns × (0.97,1.06)  -24.12%
      BenchmarkFmtFprintfString          468ns × (0.99,1.01)     420ns × (0.99,1.02)  -10.16%
      BenchmarkFmtFprintfInt             433ns × (1.00,1.01)     386ns × (0.99,1.02)  -10.74%
      BenchmarkFmtFprintfIntInt          748ns × (0.99,1.01)     647ns × (0.99,1.01)  -13.56%
      BenchmarkFmtFprintfPrefixedInt     547ns × (0.99,1.01)     499ns × (0.99,1.02)  -8.78%
      BenchmarkFmtFprintfFloat           756ns × (1.00,1.01)     689ns × (1.00,1.00)  -8.86%
      BenchmarkFmtManyArgs              2.79µs × (1.00,1.01)    2.53µs × (1.00,1.00)  -9.30%
      BenchmarkGobDecode                39.6ms × (0.99,1.00)    39.2ms × (0.98,1.01)  -1.07%
      BenchmarkGobEncode                37.6ms × (1.00,1.01)    37.5ms × (0.99,1.01)  ~
      BenchmarkGzip                      663ms × (0.99,1.02)     660ms × (0.98,1.01)  ~
      BenchmarkGunzip                    142ms × (1.00,1.00)     143ms × (1.00,1.00)  ~
      BenchmarkHTTPClientServer          132µs × (0.99,1.01)     133µs × (0.99,1.02)  ~
      BenchmarkJSONEncode               56.2ms × (0.99,1.01)    54.0ms × (0.98,1.01)  -3.97%
      BenchmarkJSONDecode                138ms × (1.00,1.00)     134ms × (0.99,1.02)  -2.70%
      BenchmarkMandelbrot200            6.03ms × (1.00,1.01)    6.00ms × (1.00,1.01)  ~
      BenchmarkGoParse                  9.82ms × (0.93,1.10)   10.35ms × (0.88,1.11)  ~
      BenchmarkRegexpMatchEasy0_32       207ns × (1.00,1.00)     163ns × (0.99,1.01)  -21.26%
      BenchmarkRegexpMatchEasy0_1K       581ns × (1.00,1.01)     566ns × (0.99,1.00)  -2.50%
      BenchmarkRegexpMatchEasy1_32       185ns × (0.99,1.01)     138ns × (1.00,1.01)  -25.41%
      BenchmarkRegexpMatchEasy1_1K       975ns × (1.00,1.01)     892ns × (1.00,1.00)  -8.51%
      BenchmarkRegexpMatchMedium_32      328ns × (0.99,1.00)     252ns × (1.00,1.00)  -23.17%
      BenchmarkRegexpMatchMedium_1K     88.6µs × (1.00,1.01)    73.0µs × (1.00,1.01)  -17.66%
      BenchmarkRegexpMatchHard_32       4.69µs × (0.95,1.03)    3.85µs × (1.00,1.01)  -17.91%
      BenchmarkRegexpMatchHard_1K        133µs × (1.00,1.01)     117µs × (1.00,1.00)  -12.34%
      BenchmarkRevcomp                   902ms × (0.99,1.05)    1001ms × (0.94,1.01)  +11.04%
      BenchmarkTemplate                  174ms × (0.99,1.01)     160ms × (0.99,1.01)  -7.70%
      BenchmarkTimeParse                 639ns × (1.00,1.00)     622ns × (1.00,1.00)  -2.66%
      BenchmarkTimeFormat                736ns × (1.00,1.01)     736ns × (1.00,1.02)  ~
      
      Change-Id: Ib3bbeb379f5f4819e6f5dcf69bc88a2b7ed41460
      Reviewed-on: https://go-review.googlesource.com/9225Reviewed-by: 's avatarAustin Clements <austin@google.com>
      Run-TryBot: Russ Cox <rsc@golang.org>
      2a735590
    • Russ Cox's avatar
      cmd/internal/gc: inline writeBarrierEnabled check before calling writebarrierptr · 653d5607
      Russ Cox authored
      I believe the benchmarks that get slower are under register pressure,
      and not making the call unconditionally makes the pressure worse,
      and the register allocator doesn't do a great job. But part of the point
      of this sequence is to get the write barriers out of the way so I can work
      on the register allocator, so that's okay.
      
      name                                       old                     new          delta
      BenchmarkBinaryTree17              17.9s × (1.00,1.01)     18.0s × (0.99,1.01)  ~
      BenchmarkFannkuch11                4.43s × (1.00,1.00)     4.43s × (1.00,1.00)  ~
      BenchmarkFmtFprintfEmpty           110ns × (1.00,1.06)     114ns × (0.95,1.05)  ~
      BenchmarkFmtFprintfString          487ns × (0.99,1.00)     468ns × (0.99,1.01)  -4.00%
      BenchmarkFmtFprintfInt             450ns × (0.99,1.00)     433ns × (1.00,1.01)  -3.88%
      BenchmarkFmtFprintfIntInt          762ns × (1.00,1.00)     748ns × (0.99,1.01)  -1.84%
      BenchmarkFmtFprintfPrefixedInt     584ns × (0.99,1.01)     547ns × (0.99,1.01)  -6.26%
      BenchmarkFmtFprintfFloat           738ns × (1.00,1.00)     756ns × (1.00,1.01)  +2.37%
      BenchmarkFmtManyArgs              2.80µs × (1.00,1.01)    2.79µs × (1.00,1.01)  ~
      BenchmarkGobDecode                39.0ms × (0.99,1.00)    39.6ms × (0.99,1.00)  +1.54%
      BenchmarkGobEncode                37.8ms × (0.98,1.01)    37.6ms × (1.00,1.01)  ~
      BenchmarkGzip                      661ms × (0.99,1.01)     663ms × (0.99,1.02)  ~
      BenchmarkGunzip                    142ms × (1.00,1.00)     142ms × (1.00,1.00)  ~
      BenchmarkHTTPClientServer          132µs × (0.99,1.01)     132µs × (0.99,1.01)  ~
      BenchmarkJSONEncode               56.3ms × (0.99,1.01)    56.2ms × (0.99,1.01)  ~
      BenchmarkJSONDecode                138ms × (0.99,1.01)     138ms × (1.00,1.00)  ~
      BenchmarkMandelbrot200            6.01ms × (1.00,1.00)    6.03ms × (1.00,1.01)  +0.23%
      BenchmarkGoParse                  10.2ms × (0.87,1.05)     9.8ms × (0.93,1.10)  ~
      BenchmarkRegexpMatchEasy0_32       208ns × (1.00,1.00)     207ns × (1.00,1.00)  ~
      BenchmarkRegexpMatchEasy0_1K       588ns × (1.00,1.00)     581ns × (1.00,1.01)  -1.27%
      BenchmarkRegexpMatchEasy1_32       182ns × (0.99,1.01)     185ns × (0.99,1.01)  +1.65%
      BenchmarkRegexpMatchEasy1_1K       986ns × (1.00,1.01)     975ns × (1.00,1.01)  -1.17%
      BenchmarkRegexpMatchMedium_32      323ns × (1.00,1.01)     328ns × (0.99,1.00)  +1.55%
      BenchmarkRegexpMatchMedium_1K     89.9µs × (1.00,1.00)    88.6µs × (1.00,1.01)  -1.38%
      BenchmarkRegexpMatchHard_32       4.72µs × (0.95,1.01)    4.69µs × (0.95,1.03)  ~
      BenchmarkRegexpMatchHard_1K        133µs × (1.00,1.01)     133µs × (1.00,1.01)  ~
      BenchmarkRevcomp                   900ms × (1.00,1.05)     902ms × (0.99,1.05)  ~
      BenchmarkTemplate                  168ms × (0.99,1.01)     174ms × (0.99,1.01)  +3.30%
      BenchmarkTimeParse                 637ns × (1.00,1.00)     639ns × (1.00,1.00)  +0.31%
      BenchmarkTimeFormat                738ns × (1.00,1.00)     736ns × (1.00,1.01)  ~
      
      Change-Id: I03ce152852edec404538f6c20eb650fac82e2aa2
      Reviewed-on: https://go-review.googlesource.com/9224Reviewed-by: 's avatarAustin Clements <austin@google.com>
      653d5607