1. 10 May, 2018 7 commits
  2. 09 May, 2018 16 commits
  3. 08 May, 2018 17 commits
    • Matt Juran's avatar
      test: fast GC+concurrency+types verification · e0adc35c
      Matt Juran authored
      This test runs independent goroutines modifying a comprehensive variety
      of local vars to look for garbage collector regressions. This test has
      been verified to trigger issue 22781 on the go1.9.2 tag. This test
      expands on test/fixedbugs/issue22781.go.
      
      Tests #22781
      
      Change-Id: Id32f8dde7ef650aea1b1b4cf518e6d045537bfdc
      Reviewed-on: https://go-review.googlesource.com/93715
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      e0adc35c
    • Martin Möhrmann's avatar
      cmd/compile: optimize map-clearing range idiom · aee71dd7
      Martin Möhrmann authored
      replace map clears of the form:
      
              for k := range m {
                      delete(m, k)
              }
      
      (where m is map with key type that is reflexive for ==)
      with a new runtime function that clears the maps backing
      array with a memclr and reinitializes the hmap struct.
      
      Map key types that for example contain floats are not
      replaced by this optimization since NaN keys cannot
      be deleted from maps using delete.
      
      name                           old time/op  new time/op  delta
      GoMapClear/Reflexive/1         92.2ns ± 1%  47.1ns ± 2%  -48.89%  (p=0.000 n=9+9)
      GoMapClear/Reflexive/10         108ns ± 1%    48ns ± 2%  -55.68%  (p=0.000 n=10+10)
      GoMapClear/Reflexive/100        303ns ± 2%   110ns ± 3%  -63.56%  (p=0.000 n=10+10)
      GoMapClear/Reflexive/1000      3.58µs ± 3%  1.23µs ± 2%  -65.49%  (p=0.000 n=9+10)
      GoMapClear/Reflexive/10000     28.2µs ± 3%  10.3µs ± 2%  -63.55%  (p=0.000 n=9+10)
      GoMapClear/NonReflexive/1       121ns ± 2%   124ns ± 7%     ~     (p=0.097 n=10+10)
      GoMapClear/NonReflexive/10      137ns ± 2%   139ns ± 3%   +1.53%  (p=0.033 n=10+10)
      GoMapClear/NonReflexive/100     331ns ± 3%   334ns ± 2%     ~     (p=0.342 n=10+10)
      GoMapClear/NonReflexive/1000   3.64µs ± 3%  3.64µs ± 2%     ~     (p=0.887 n=9+10)
      GoMapClear/NonReflexive/10000  28.1µs ± 2%  28.4µs ± 3%     ~     (p=0.247 n=10+10)
      
      Fixes #20138
      
      Change-Id: I181332a8ef434a4f0d89659f492d8711db3f3213
      Reviewed-on: https://go-review.googlesource.com/110055Reviewed-by: default avatarKeith Randall <khr@golang.org>
      aee71dd7
    • Rob Pike's avatar
      doc/faq: tidy up a couple of nits · cd1976db
      Rob Pike authored
      The phrase "couple X" is considered colloquial, so make that "a couple of X".
      Also move the start of a sentence to a new line in a couple of places
      for easier editing, in one place thereby removing two spaces after a period.
      
      Change-Id: If5ef05eb496afc235f8f0134c4e7346375a65181
      Reviewed-on: https://go-review.googlesource.com/112176Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      cd1976db
    • Hana (Hyang-Ah) Kim's avatar
      cmd/trace: handle invalid goid para in /trace · 43b18f42
      Hana (Hyang-Ah) Kim authored
      Change-Id: I1cb7c8b70a5ae16386f6abb577c23d821f7ff7f0
      Reviewed-on: https://go-review.googlesource.com/112197Reviewed-by: default avatarPeter Weinberger <pjw@google.com>
      Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
      43b18f42
    • Hana (Hyang-Ah) Kim's avatar
      cmd/trace: skip links for buckets with 0 count · 9eface70
      Hana (Hyang-Ah) Kim authored
      Change-Id: Ib1c2f7cc8e8f631ed9e74161699332f492d4cb0d
      Reviewed-on: https://go-review.googlesource.com/112196Reviewed-by: default avatarPeter Weinberger <pjw@google.com>
      9eface70
    • jimmyfrasche's avatar
      doc: make front page video respond to layout changes (1/2) · d96221f2
      jimmyfrasche authored
      The videos on the front page are always the same width, regardless of
      the viewport width. These changes let the video fill the space given
      to its container regardless of layout. It uses the standard hack for
      making iframes responsive, but the videos are loaded at random and do
      not have uniform aspect ratios so that information is injected into the
      DOM using custom properties. If these are not supported, it falls back
      to the same layout present before this change.
      
      Note: this change also requires CL 108678 to complete the fix,
      though either CL without the other is harmless.
      
      Updates #24997.
      
      Change-Id: I2f93dc21ffe01d99ce0e175e9dd0e3d486fddc9f
      Reviewed-on: https://go-review.googlesource.com/108677
      Run-TryBot: Andrew Bonventre <andybons@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarAndrew Bonventre <andybons@golang.org>
      d96221f2
    • Keith Randall's avatar
      cmd/compile: rename memory-using operations · f3234866
      Keith Randall authored
      Some *mem ops are loads, some are stores, some are modifications.
      Replace mem->load for the loads.
      Replace mem->store for the stores.
      Replace mem->modify for the load-modify-stores.
      
      The only semantic change in this CL is to mark
      ADD(Q|L)constmodify (which used to be ADD(Q|L)constmem) as
      both a read and a write, instead of just a write. This is arguably
      a bug fix, but the bug isn't triggerable at the moment, see CL 112157.
      
      Change-Id: Iccb45aea817b606adb2d712ff99b10ee28e4616a
      Reviewed-on: https://go-review.googlesource.com/112159
      Run-TryBot: Keith Randall <khr@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      f3234866
    • Keith Randall's avatar
      cmd/compile: remove unnecessary convert ops on 32-bit archs · 6b0941a1
      Keith Randall authored
      Missing rule to fold out Convert ops on 32-bit architectures.
      
      This comes up with expressions like
      unsafe.Pointer(uintptr(p) + x)
      
      Change-Id: I429e968e5d1a3e13a386ddd29a08ebb6d7dd938a
      Reviewed-on: https://go-review.googlesource.com/112158Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      Reviewed-by: default avatarDavid Chase <drchase@google.com>
      6b0941a1
    • Keith Randall's avatar
      cmd/compile: mark modify ops as both read and write · dffc915b
      Keith Randall authored
      If the modify ops operate on a variable, we should tell the liveness
      pass that the variable is still live before the instruction.
      
      This looks like a bug, but I don't think there's any way to trigger
      it at the moment. It only matters for pointer-containing values, and
      the modify ops don't normally work on pointers. Even when I reach for
      unsafe.Pointer tricks, I can't get ADDLmodify to work on pointers, as
      there's always a Convert or VarDef preventing the coalescing.
      
      TL;DR I can't figure out a test for this. But we should probably
      fix it anyway.
      
      Change-Id: I971c62616dec51a33788b7634e6478e1bfcd6260
      Reviewed-on: https://go-review.googlesource.com/112157Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      dffc915b
    • Paul Jolly's avatar
      cmd/go: fix go list -test where C is a dependency. · 941b3b77
      Paul Jolly authored
      Currently go list -test runtime/cgo fails with an index out of range
      error. This appears to be because the updating of import paths that
      happens as part of -test doesn't take into account the fact that the
      Internal.Imports of a package do not contain "C", whereas the public
      Imports do.
      
      Therefore we skip the public Import of "C" if it exists and continue.
      
      Change-Id: I5cdc8968890fa7e5da3e375718606037d3282754
      Reviewed-on: https://go-review.googlesource.com/111175
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      941b3b77
    • Chotepud Teo's avatar
      cmd/go: added missing space to pkg-config errors · cf4e5597
      Chotepud Teo authored
      pkg-config errors were missing a space between pkg-config flags and packages
      e.g.  pkg-config --cflags --staticsdl2
      
      Fixes #25260
      
      Change-Id: Iacecb697c5782c4822db9eefa1a2e4c4daf91a69
      GitHub-Last-Rev: 2adf8576be66e31160c109a79f3853feac293f1b
      GitHub-Pull-Request: golang/go#25261
      Reviewed-on: https://go-review.googlesource.com/111638
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      cf4e5597
    • Brian Kessler's avatar
      math/big: implement Lehmer's extended GCD algorithm · 50649a96
      Brian Kessler authored
      Updates #15833
      
      The extended GCD algorithm can be implemented using
      Lehmer's algorithm with additional updates for the
      cosequences following Algorithm 10.45 from Cohen et al.
      "Handbook of Elliptic and Hyperelliptic Curve Cryptography" pp 192.
      This brings the speed of the extended GCD calculation within
      ~2x of the base GCD calculation.  There is a slight degradation in
      the non-extended GCD speed for small inputs (1-2 words) due to the
      additional code to handle the extended updates.
      
      name                          old time/op    new time/op    delta
      GCD10x10/WithoutXY-4             262ns ± 1%     266ns ± 2%     ~     (p=0.333 n=5+5)
      GCD10x10/WithXY-4               1.42µs ± 2%    0.74µs ± 3%  -47.90%  (p=0.008 n=5+5)
      GCD10x100/WithoutXY-4            520ns ± 2%     539ns ± 1%   +3.81%  (p=0.008 n=5+5)
      GCD10x100/WithXY-4              2.32µs ± 1%    1.67µs ± 0%  -27.80%  (p=0.008 n=5+5)
      GCD10x1000/WithoutXY-4          1.40µs ± 1%    1.45µs ± 2%   +3.26%  (p=0.016 n=4+5)
      GCD10x1000/WithXY-4             4.78µs ± 1%    3.43µs ± 1%  -28.37%  (p=0.008 n=5+5)
      GCD10x10000/WithoutXY-4         10.0µs ± 0%    10.2µs ± 3%   +1.80%  (p=0.008 n=5+5)
      GCD10x10000/WithXY-4            20.9µs ± 3%    17.9µs ± 1%  -14.20%  (p=0.008 n=5+5)
      GCD10x100000/WithoutXY-4        96.8µs ± 0%    96.3µs ± 1%     ~     (p=0.310 n=5+5)
      GCD10x100000/WithXY-4            196µs ± 3%     159µs ± 2%  -18.61%  (p=0.008 n=5+5)
      GCD100x100/WithoutXY-4          2.53µs ±15%    2.34µs ± 0%   -7.35%  (p=0.008 n=5+5)
      GCD100x100/WithXY-4             19.3µs ± 0%     3.9µs ± 1%  -79.58%  (p=0.008 n=5+5)
      GCD100x1000/WithoutXY-4         4.23µs ± 0%    4.17µs ± 3%     ~     (p=0.127 n=5+5)
      GCD100x1000/WithXY-4            22.8µs ± 1%     7.5µs ±10%  -67.00%  (p=0.008 n=5+5)
      GCD100x10000/WithoutXY-4        19.1µs ± 0%    19.0µs ± 0%     ~     (p=0.095 n=5+5)
      GCD100x10000/WithXY-4           75.1µs ± 2%    30.5µs ± 2%  -59.38%  (p=0.008 n=5+5)
      GCD100x100000/WithoutXY-4        170µs ± 5%     167µs ± 1%     ~     (p=1.000 n=5+5)
      GCD100x100000/WithXY-4           542µs ± 2%     267µs ± 2%  -50.79%  (p=0.008 n=5+5)
      GCD1000x1000/WithoutXY-4        28.0µs ± 0%    27.1µs ± 0%   -3.29%  (p=0.008 n=5+5)
      GCD1000x1000/WithXY-4            329µs ± 0%      42µs ± 1%  -87.12%  (p=0.008 n=5+5)
      GCD1000x10000/WithoutXY-4       47.2µs ± 0%    46.4µs ± 0%   -1.65%  (p=0.016 n=5+4)
      GCD1000x10000/WithXY-4           607µs ± 9%     123µs ± 1%  -79.70%  (p=0.008 n=5+5)
      GCD1000x100000/WithoutXY-4       260µs ±17%     245µs ± 0%     ~     (p=0.056 n=5+5)
      GCD1000x100000/WithXY-4         3.64ms ± 1%    0.93ms ± 1%  -74.41%  (p=0.016 n=4+5)
      GCD10000x10000/WithoutXY-4       513µs ± 0%     507µs ± 0%   -1.22%  (p=0.008 n=5+5)
      GCD10000x10000/WithXY-4         7.44ms ± 1%    1.00ms ± 0%  -86.58%  (p=0.008 n=5+5)
      GCD10000x100000/WithoutXY-4     1.23ms ± 0%    1.23ms ± 1%     ~     (p=0.056 n=5+5)
      GCD10000x100000/WithXY-4        37.3ms ± 0%     7.3ms ± 1%  -80.45%  (p=0.008 n=5+5)
      GCD100000x100000/WithoutXY-4    24.2ms ± 0%    24.2ms ± 0%     ~     (p=0.841 n=5+5)
      GCD100000x100000/WithXY-4        505ms ± 1%      56ms ± 1%  -88.92%  (p=0.008 n=5+5)
      
      Change-Id: I25f42ab8c55033acb83cc32bb03c12c1963925e8
      Reviewed-on: https://go-review.googlesource.com/78755Reviewed-by: default avatarRobert Griesemer <gri@golang.org>
      Run-TryBot: Robert Griesemer <gri@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      50649a96
    • Ian Lance Taylor's avatar
      cmd/go: add -test to go list usage line · 25858cce
      Ian Lance Taylor authored
      Change-Id: Ia57f0ef1a3bdeb06346e175d67979e2a4512622d
      Reviewed-on: https://go-review.googlesource.com/112160
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      25858cce
    • Zhou Peng's avatar
      plugin: make stub lookup signature match dlopen version · 5b976d37
      Zhou Peng authored
      Change-Id: I64958f8f1a935adc07868362975447d0c0033084
      Reviewed-on: https://go-review.googlesource.com/111716Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      5b976d37
    • Michael Munday's avatar
      cmd/compile: fix Zero-to-Load forwarding rules · fbfbf03b
      Michael Munday authored
      Avoid using values that do not dominate the block the Zero op is in.
      Should fix the SSA check builder.
      
      The additional OffPtr ops inserted by these rules should always be
      optimized away when the Load is replaced with a const zero.
      
      Fixes #25288.
      
      Change-Id: I4163b58e60364f77c8a206ba084073a58ca6320a
      Reviewed-on: https://go-review.googlesource.com/112136
      Run-TryBot: Michael Munday <mike.munday@ibm.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarKeith Randall <khr@golang.org>
      fbfbf03b
    • Michael Munday's avatar
      cmd/compile: simplify shift lowering on s390x · 8af0c77d
      Michael Munday authored
      Use conditional moves instead of subtractions with borrow to handle
      saturation cases. This allows us to delete the SUBE/SUBEW ops and
      associated rules from the SSA backend. Using conditional moves also
      means we can detect when shift values are masked so I've added some
      new rules to constant fold the relevant comparisons and masking ops.
      
      Also use the new shiftIsBounded() function to avoid generating code
      to handle saturation cases where possible.
      
      Updates #25167 for s390x.
      
      Change-Id: Ief9991c91267c9151ce4c5ec07642abb4dcc1c0d
      Reviewed-on: https://go-review.googlesource.com/110070
      Run-TryBot: Michael Munday <mike.munday@ibm.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      8af0c77d
    • Elias Naur's avatar
      misc/ios: retry iOS launch even if no device app path was found · 704893b1
      Elias Naur authored
      Now that the iOS exec wrapper uninstalls any existing test app before
      installing a new, looking up the device app path might fail. Before,
      the lookup always succeeded (even though the path reported might be
      stale).
      
      For the iOS builder.
      
      Change-Id: I5667b6fae15f88745bdee796db219a429a26e203
      Reviewed-on: https://go-review.googlesource.com/112075
      Run-TryBot: Elias Naur <elias.naur@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarHyang-Ah Hana Kim <hyangah@gmail.com>
      704893b1