1. 10 Sep, 2017 2 commits
  2. 09 Sep, 2017 20 commits
  3. 08 Sep, 2017 14 commits
  4. 07 Sep, 2017 4 commits
    • isharipo's avatar
      cmd/asm: restrict x86 shift ops to 8bit args · 5b043abe
      isharipo authored
      Change "yshl" and "yshb" immediate oclass from Yi32 to Yu8.
      This forbids:
      - negative shift counts
      - shift counts that not fit into 8bit
      
      Affects:
        RCL{B,L,Q,W}
        RCR{B,L,Q,W}
        ROL{B,L,Q,W}
        ROR{B,L,Q,W}
        SAL{B,L,Q,W}
        SAR{B,L,Q,W}
        SHL{B,L,Q,W}
        SHR{B,L,Q,W}
      
      Issue #21528 has some additional context about this change.
      
      Change-Id: I60884cb2b41a860820889fcd878ca6f564006b4a
      Reviewed-on: https://go-review.googlesource.com/62190
      Run-TryBot: Iskander Sharipov <iskander.sharipov@intel.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarRuss Cox <rsc@golang.org>
      5b043abe
    • Daniel Martí's avatar
      text/template: fix pos info when trimming newlines · 9b8964bf
      Daniel Martí authored
      The lexer keeps the byte offset and the line for the rune it's currently
      on. This was simple enough up until whitespace trimming was introduced.
      
      With whitespace trimming, we might skip over newlines. In that case, the
      lexer wasn't properly updating the line counter. Fix it.
      
      Also, TestPos now checks that the line is correct too, which it was
      ignoring before. This was necessary to test this scenario in the lexer.
      
      Fixes #21778.
      
      Change-Id: I3880f3adf02662eac8f818d5caa6935cca9cb33b
      Reviewed-on: https://go-review.googlesource.com/61870
      Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
      Reviewed-by: default avatarRob Pike <r@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      9b8964bf
    • Daniel Martí's avatar
      cmd/vet: remove two unused parameters and simplify · 38ad3308
      Daniel Martí authored
      The isStar and directory function parameters have been unused ever since
      they were introduced. Remove them.
      
      While at it, apply some other minor simplifications, such as simplifying
      a HasPrefix if and using an early continue to unindent many lines of
      code.
      
      Change-Id: I8d57353e9ec10cdb59c5388cf6152ce0ec17bdba
      Reviewed-on: https://go-review.googlesource.com/62030
      Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarRob Pike <r@golang.org>
      Reviewed-by: default avatarMarvin Stenger <marvin.stenger94@gmail.com>
      38ad3308
    • Martin Möhrmann's avatar
      runtime: avoid extra tophash check in mapassign when key comparison is cheap · ec0e2edd
      Martin Möhrmann authored
      mapaccess and mapdelete functions are already optimized to prefer direct
      key comparison instead of tophash checks when key comparison is cheap.
      
      Extended version of golang.org/cl/55235.
      
      AMD64:
      name                old time/op    new time/op    delta
      MapPopulate/1         42.5ns ± 2%    40.3ns ± 2%  -5.37%  (p=0.000 n=9+10)
      MapPopulate/10         558ns ± 1%     556ns ± 1%    ~     (p=0.157 n=10+10)
      MapPopulate/100       7.75µs ± 1%    7.66µs ± 2%  -1.19%  (p=0.001 n=10+10)
      MapPopulate/1000      92.6µs ± 1%    92.0µs ± 1%  -0.61%  (p=0.016 n=10+8)
      MapPopulate/10000      817µs ± 1%     814µs ± 1%    ~     (p=0.247 n=10+10)
      MapPopulate/100000    8.02ms ± 1%    7.90ms ± 2%  -1.47%  (p=0.007 n=10+10)
      
      Change-Id: If0eca9931379cbbd37eb753e9bcd2888d8272153
      Reviewed-on: https://go-review.googlesource.com/62050
      Run-TryBot: Martin Möhrmann <moehrmann@google.com>
      Reviewed-by: default avatarDaniel Martí <mvdan@mvdan.cc>
      Reviewed-by: default avatarKeith Randall <khr@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      ec0e2edd