1. 18 Sep, 2018 6 commits
  2. 17 Sep, 2018 12 commits
  3. 16 Sep, 2018 3 commits
  4. 15 Sep, 2018 3 commits
  5. 14 Sep, 2018 6 commits
  6. 13 Sep, 2018 10 commits
    • Ian Lance Taylor's avatar
      path/filepath: correct symlink eval for symlink at root · 9f59918c
      Ian Lance Taylor authored
      For a relative symlink in the root directory, such as /tmp ->
      private/tmp, we were dropping the leading slash.
      
      No test because we can't create a symlink in the root directory.
      The test TestGZIPFilesHaveZeroMTimes was failing on the Darwin builders.
      
      Updates #19922
      Updates #20506
      
      Change-Id: Ic83cb6d97ad0cb628fc551ac772a44fb3e20f038
      Reviewed-on: https://go-review.googlesource.com/135295
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarRobert Griesemer <gri@golang.org>
      9f59918c
    • David du Colombier's avatar
      runtime: don't build semasleep_test on Plan 9 · 7c95703c
      David du Colombier authored
      CL 135015 added TestSpuriousWakeupsNeverHangSemasleep.
      However, this test is failing on Plan 9 because
      syscall.SIGIO is not defined.
      
      This change excludes semasleep_test.go on Plan 9
      
      Fixes #27662.
      
      Change-Id: I52f9f0fe9ec3c70da5d2f586a95debbc1fe568a1
      Reviewed-on: https://go-review.googlesource.com/135315
      Run-TryBot: David du Colombier <0intro@gmail.com>
      Reviewed-by: 's avatarEmmanuel Odeke <emm.odeke@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      7c95703c
    • Roberto Selbach's avatar
      cmd/go/internal/modfetch: stop cutting the last character of versions · 56dc1795
      Roberto Selbach authored
      When a zip archive for a module contains an unexpected file, the error
      message removes the last character in the version number, e.g. an invalid
      archive for "somemod@v1.2.3" would generate the following error:
      "zip for somemod@1.2. has unexpected file..."
      
      Change-Id: I366622df16a71fa7467a4bc62cb696e3e83a2942
      GitHub-Last-Rev: f172283bcdffd45b485b1e8fd99795eb93fef726
      GitHub-Pull-Request: golang/go#27279
      Reviewed-on: https://go-review.googlesource.com/131635
      Run-TryBot: Bryan C. Mills <bcmills@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarBryan C. Mills <bcmills@google.com>
      56dc1795
    • Lynn Boger's avatar
      cmd/compile: improve rules for PPC64.rules · 8dbd9afb
      Lynn Boger authored
      This adds some improvements to the rules for PPC64 to eliminate
      unnecessary zero or sign extends, and fix some rule for truncates
      which were not always using the correct sign instruction.
      
      This reduces of size of many functions by 1 or 2 instructions and
      can improve performance in cases where the execution time depends
      on small loops where at least 1 instruction was removed and where that
      loop contributes a significant amount of the total execution time.
      
      Included is a testcase for codegen to verify the sign/zero extend
      instructions are omitted.
      
      An example of the improvement (strings):
      IndexAnyASCII/256:1-16     392ns ± 0%   369ns ± 0%  -5.79%  (p=0.000 n=1+10)
      IndexAnyASCII/256:2-16     397ns ± 0%   376ns ± 0%  -5.23%  (p=0.000 n=1+9)
      IndexAnyASCII/256:4-16     405ns ± 0%   384ns ± 0%  -5.19%  (p=1.714 n=1+6)
      IndexAnyASCII/256:8-16     427ns ± 0%   403ns ± 0%  -5.57%  (p=0.000 n=1+10)
      IndexAnyASCII/256:16-16    441ns ± 0%   418ns ± 1%  -5.33%  (p=0.000 n=1+10)
      IndexAnyASCII/4096:1-16   5.62µs ± 0%  5.27µs ± 1%  -6.31%  (p=0.000 n=1+10)
      IndexAnyASCII/4096:2-16   5.67µs ± 0%  5.29µs ± 0%  -6.67%  (p=0.222 n=1+8)
      IndexAnyASCII/4096:4-16   5.66µs ± 0%  5.28µs ± 1%  -6.66%  (p=0.000 n=1+10)
      IndexAnyASCII/4096:8-16   5.66µs ± 0%  5.31µs ± 1%  -6.10%  (p=0.000 n=1+10)
      IndexAnyASCII/4096:16-16  5.70µs ± 0%  5.33µs ± 1%  -6.43%  (p=0.182 n=1+10)
      
      Change-Id: I739a6132b505936d39001aada5a978ff2a5f0500
      Reviewed-on: https://go-review.googlesource.com/129875Reviewed-by: 's avatarDavid Chase <drchase@google.com>
      8dbd9afb
    • Robert Griesemer's avatar
      go/types: be more precise in API comment · 8eb36ae9
      Robert Griesemer authored
      Change-Id: I24c4b08091bf3b8734f5dcdb9eac1a3582a4daa8
      Reviewed-on: https://go-review.googlesource.com/135116Reviewed-by: 's avatarAlan Donovan <adonovan@google.com>
      8eb36ae9
    • Robert Griesemer's avatar
      go/types: fix scope printing (debugging support) · 8e2333b2
      Robert Griesemer authored
      Printing of scopes was horribly wrong: If a scope contained
      no object declarations, it would abort printing even if the
      scope had children scopes. Also, the line breaks were not
      inserted consistently. The actual test case (ExampleScope)
      was incorrect as well.
      
      Fixed and simplified printing, and adjusted example which
      tests the printing output.
      
      Change-Id: If21c1d4ad71b15a517d4a54da16de5e6228eb4b5
      Reviewed-on: https://go-review.googlesource.com/135115
      Run-TryBot: Robert Griesemer <gri@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarAlan Donovan <adonovan@google.com>
      8e2333b2
    • erifan01's avatar
      runtime: skip TestGcSys on arm64 · 0ef42f4d
      erifan01 authored
      This failure occurs randomly on arm64.
      
      13:10:32 --- FAIL: TestGcSys (0.06s)
      13:10:32 gc_test.go:30: expected "OK\n", but got "using too much memory: 71401472 bytes\n"
      13:10:32 FAIL
      
      Updates #27636
      
      Change-Id: Ifd4cfce167d8054dc6f037bd34368d63c7f68ed4
      Reviewed-on: https://go-review.googlesource.com/135155
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      0ef42f4d
    • Ian Lance Taylor's avatar
      path/filepath: rewrite walkSymlinks · 7d27e87d
      Ian Lance Taylor authored
      Rather than try to work around Clean and Join on intermediate steps,
      which can remove ".." components unexpectedly, just do everything in
      walkSymlinks. Use a single loop over path components.
      
      Fixes #23444
      
      Change-Id: I4f15e50d0df32349cc4fd55e3d224ec9ab064379
      Reviewed-on: https://go-review.googlesource.com/121676
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarAlex Brainman <alex.brainman@gmail.com>
      7d27e87d
    • Alan Donovan's avatar
      regexp: fix incorrect name in Match doc comment · 8c610aa6
      Alan Donovan authored
      Change-Id: I628aad9a3abe9cc0c3233f476960e53bd291eca9
      Reviewed-on: https://go-review.googlesource.com/135235Reviewed-by: 's avatarRalph Corderoy <ralph@inputplus.co.uk>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      8c610aa6
    • erifan01's avatar
      strings, bytes: optimize function Index · 691f5c34
      erifan01 authored
      This change compares the first two characters instead of the first one,
      and if they match, the entire string is compared. Comparing the first two
      characters helps to filter out the case where the first character matches
      but the subsequent characters do not match, thereby improving the substring
      search speed in this case.
      
      Benchmarks with no effect or minimal impact (less than 5%) is not listed,
      the following are improved benchmarks:
      On arm64:
      strings:
      IndexPeriodic/IndexPeriodic16-8   172890.00ns +- 2%   124156.20ns +- 0%  -28.19%  (p=0.008 n=5+5)
      IndexPeriodic/IndexPeriodic32-8    78092.80ns +- 0%    65138.60ns +- 0%  -16.59%  (p=0.008 n=5+5)
      IndexPeriodic/IndexPeriodic64-8    42322.20ns +- 0%    34661.60ns +- 0%  -18.10%  (p=0.008 n=5+5)
      bytes:
      IndexPeriodic/IndexPeriodic16-8     183468.20ns +- 6%     123759.00ns +- 0%  -32.54%  (p=0.008 n=5+5)
      IndexPeriodic/IndexPeriodic32-8      84776.40ns +- 0%      63907.80ns +- 0%  -24.62%  (p=0.008 n=5+5)
      IndexPeriodic/IndexPeriodic64-8      45835.60ns +- 0%      34194.20ns +- 0%  -25.40%  (p=0.008 n=5+5)
      
      On amd64:
      strings:
      IndexPeriodic/IndexPeriodic8-16    219499.00ns +- 0%   178123.40ns +- 0%  -18.85%  (p=0.008 n=5+5)
      IndexPeriodic/IndexPeriodic16-16   109760.20ns +- 0%    88957.80ns +- 0%  -18.95%  (p=0.008 n=5+5)
      IndexPeriodic/IndexPeriodic32-16    54943.00ns +- 0%    44573.80ns +- 0%  -18.87%  (p=0.008 n=5+5)
      IndexPeriodic/IndexPeriodic64-16    29804.80ns +- 0%    24417.80ns +- 0%  -18.07%  (p=0.008 n=5+5)
      bytes:
      IndexPeriodic/IndexPeriodic8-16     226592.60ns +- 0%    181183.20ns +- 0%  -20.04%  (p=0.008 n=5+5)
      IndexPeriodic/IndexPeriodic16-16    111432.60ns +- 0%     90634.60ns +- 0%  -18.66%  (p=0.008 n=5+5)
      IndexPeriodic/IndexPeriodic32-16     55640.60ns +- 0%     45433.00ns +- 0%  -18.35%  (p=0.008 n=5+5)
      IndexPeriodic/IndexPeriodic64-16     30833.00ns +- 0%     24784.20ns +- 0%  -19.62%  (p=0.008 n=5+5)
      
      Change-Id: I2d9e7e138d29e960d20a203eb74dc2ec976a9d71
      Reviewed-on: https://go-review.googlesource.com/131177
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      691f5c34