1. 02 Jun, 2017 2 commits
  2. 01 Jun, 2017 2 commits
    • Ian Lance Taylor's avatar
      sort: clarify comment about not-a-number values · da1b8306
      Ian Lance Taylor authored
      Updates #20540
      
      Change-Id: I864008fadd77b0aeb10fe7e7f1ec696516a5add5
      Reviewed-on: https://go-review.googlesource.com/44492Reviewed-by: 's avatarRobert Griesemer <gri@golang.org>
      da1b8306
    • Ilya Tocar's avatar
      cmd/compile/internal/gc: speed-up small array comparison · 3bdc2f3a
      Ilya Tocar authored
      Currently we inline array comparisons for arrays with at most 4 elements.
      Compare arrays with small size, but more than 4 elements (e. g. [16]byte)
      with larger compares. This provides very slightly smaller binaries,
      and results in faster code.
      
      ArrayEqual-6  7.41ns ± 0%  3.17ns ± 0%  -57.15%  (p=0.000 n=10+10)
      
      For go tool:
      global text (code) = -559 bytes (-0.014566%)
      
      This also helps mapaccess1_faststr, and maps in general:
      
      MapDelete/Str/1-6               195ns ± 1%     186ns ± 2%   -4.47%  (p=0.000 n=10+10)
      MapDelete/Str/2-6               211ns ± 1%     177ns ± 1%  -16.01%  (p=0.000 n=10+10)
      MapDelete/Str/4-6               225ns ± 1%     183ns ± 1%  -18.49%  (p=0.000 n=8+10)
      MapStringKeysEight_16-6        31.3ns ± 0%    28.6ns ± 0%   -8.63%  (p=0.000 n=6+9)
      MapStringKeysEight_32-6        29.2ns ± 0%    27.6ns ± 0%   -5.45%  (p=0.000 n=10+10)
      MapStringKeysEight_64-6        29.1ns ± 1%    27.5ns ± 0%   -5.46%  (p=0.000 n=10+10)
      MapStringKeysEight_1M-6        29.1ns ± 1%    27.6ns ± 0%   -5.49%  (p=0.000 n=10+10)
      
      Change-Id: I9ec98e41b233031e0e96c4e13d86a324f628ed4a
      Reviewed-on: https://go-review.googlesource.com/40771
      Run-TryBot: Ilya Tocar <ilya.tocar@intel.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarKeith Randall <khr@golang.org>
      3bdc2f3a
  3. 31 May, 2017 6 commits
  4. 30 May, 2017 5 commits
  5. 29 May, 2017 3 commits
  6. 28 May, 2017 1 commit
  7. 26 May, 2017 7 commits
  8. 25 May, 2017 5 commits
    • Ben Shi's avatar
      cmd/asm/internal/asm: fix a bug in ARM assembly encoding test · ffab6ab8
      Ben Shi authored
      It is expected to test assembly code for ARMv5, ARMv6 and ARMv7
      in cmd/asm/internal/asm/endtoend_test.go. But actually the loop
      in "func TestARMEndToEnd(t *testing.T)" runs three times all
      for ARMv5.
      
      This patch fixes that bug and adds a new armv6.s which is only tested
      with GOARM=6.
      
      fixes #20465
      
      Change-Id: I5dbf00809a47ace2c195335e2c9bdd768479aada
      Reviewed-on: https://go-review.googlesource.com/43930Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      Reviewed-by: 's avatarCherry Zhang <cherryyz@google.com>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      ffab6ab8
    • Ben Shi's avatar
      cmd/internal/obj/arm: fix illegal forms of ARM VFP instruction · b8a4eb4b
      Ben Shi authored
      "ADDF F0, R1, F2" is silently accepted by the arm assembler and
      assembled to the same binary code of "ADDF F0, F1, F2". So does
      "CMPF F0, R1".
      
      "ABSF F0, F1, F2" is also silently accepted and assembled to a
      different instruction.
      
      This patch reports those illegal forms and adds test cases.
      
      fix #20464
      
      Change-Id: I88b80dc29de24c6266ac7bf7bce1578c5adbc68c
      Reviewed-on: https://go-review.googlesource.com/43931
      Run-TryBot: Cherry Zhang <cherryyz@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarCherry Zhang <cherryyz@google.com>
      b8a4eb4b
    • Austin Clements's avatar
      runtime: accept non-monotonic arena allocation on 32-bit · 13ae3b3a
      Austin Clements authored
      Currently, the heap arena allocator allocates monotonically increasing
      addresses. This is fine on 64-bit where we stake out a giant block of
      the address space for ourselves and start at the beginning of it, but
      on 32-bit the arena starts at address 0 but we start allocating from
      wherever the OS feels like giving us memory. We can generally hint the
      OS to start us at a low address, but this doesn't always work.
      
      As a result, on 32-bit, if the OS gives us an arena block that's lower
      than the current block we're allocating from, we simply say "thanks
      but no thanks", return the whole (256MB!) block of memory, and then
      take a fallback path that mmaps just the amount of memory we need
      (which may be as little as 8K).
      
      We have to do this because mheap_.arena_used is *both* the highest
      used address in the arena and the next address we allocate from.
      
      Fix all of this by separating the second role of arena_used out into a
      new field called arena_alloc. This lets us accept any arena block the
      OS gives us. This also slightly changes the invariants around
      arena_end. Previously, we ensured arena_used <= arena_end, but this
      was related to arena_used's second role, so the new invariant is
      arena_alloc <= arena_end. As a result, we no longer necessarily update
      arena_end when we're updating arena_used.
      
      Fixes #20259 properly. (Unlike the original fix, this one should not
      be cherry-picked to Go 1.8.)
      
      This is reasonably low risk. I verified several key properties of the
      32-bit code path with both 4K and 64K physical pages using a symbolic
      model and the change does not materially affect 64-bit (arena_used ==
      arena_alloc on 64-bit). The only oddity is that we no longer call
      setArenaUsed with racemap == false to indicate that we're creating a
      hole in the address space, but this only happened in a 32-bit-only
      code path, and the race detector require 64-bit, so this never
      mattered anyway.
      
      Change-Id: Ib1334007933e615166bac4159bf357ae06ec6a25
      Reviewed-on: https://go-review.googlesource.com/44010
      Run-TryBot: Austin Clements <austin@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      Reviewed-by: 's avatarRick Hudson <rlh@golang.org>
      13ae3b3a
    • Emmanuel Odeke's avatar
      net/http: revert CL 43779 · a9d8d4df
      Emmanuel Odeke authored
      CL 43779/commit 6a6c792e
      broke the builds at tip, and that CL doesn't account for
      cases where Redirect is directly invoked with a full URL
      that itself has a query string.
      
      Updates #17841
      
      Change-Id: Idb0486bae8625e1f9e033ca4cfcd87de95bc835c
      Reviewed-on: https://go-review.googlesource.com/44100Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      a9d8d4df
    • David du Colombier's avatar
      vendor: update golang.org/x/net/nettest · 00e6b34f
      David du Colombier authored
      Update golang.org/x/net/nettest to revision 7dcfb8076726a3fdd9353b6b8a1f1b6be6811bd6.
      
      Change-Id: Ib6505423910d34142d7b1bcb6792a5017df4da47
      Reviewed-on: https://go-review.googlesource.com/44131Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: David du Colombier <0intro@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      00e6b34f
  9. 24 May, 2017 9 commits