1. 27 Aug, 2019 6 commits
    • Javier Revillas's avatar
      net/http: fix a typo in comments · cd33d271
      Javier Revillas authored
      HTTP is an initialism, not an acronym, where you pronounce each letter as a
      word. It's "an H", not "a H".
      
      Running `find src/net/http -type f | xargs grep -n 'an HTTP' | wc -l` shows
      that the "an HTTP" form is used 67 times across the `net/http` package.
      Furthermore, `find src/net/http -type f | xargs grep -n 'a HTTP' | wc -l`
      yields only 4 results.
      
      Change-Id: I219c292a9e2c9bf7a009dbfe82ea8b15874685e9
      GitHub-Last-Rev: 6ebd095023af47444b6b0fc5b6d7b26d85f4c7b7
      GitHub-Pull-Request: golang/go#33810
      Reviewed-on: https://go-review.googlesource.com/c/go/+/191700Reviewed-by: default avatarToshihiro Shiino <shiino.toshihiro@gmail.com>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      cd33d271
    • LE Manh Cuong's avatar
      cmd/compile: remove adjustctx from inline test · 324cf21f
      LE Manh Cuong authored
      After golang.org/cl/33895, function adjustctx can not be inlined,
      cost 82 exceeds budget 80
      
      Change-Id: Ie559ed80ea2c251add940a99f11b2983f6cbddbc
      Reviewed-on: https://go-review.googlesource.com/c/go/+/187977
      Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarKeith Randall <khr@golang.org>
      324cf21f
    • zdjones's avatar
      cmd/compile: handle sign/zero extensions in prove, via update method · 69ff0ba7
      zdjones authored
      Array accesses with index types smaller than the machine word size may
      involve a sign or zero extension of the index value before bounds
      checking. Currently, this defeats prove because the facts about the
      original index value don't flow through the sign/zero extension.
      
      This CL fixes this by looking back through value-preserving sign/zero
      extensions when adding facts via Update and, where appropriate, applying
      the same facts using the pre-extension value. This fix is enhanced by
      also looking back through value-preserving extensions within
      ft.isNonNegative to infer whether the extended value is known to be
      non-negative. Without this additional isNonNegative enhancement, this
      logic is rendered significantly less effective by the limitation
      discussed in the next paragraph.
      
      In Update, the application of facts to pre-extension values is limited
      to cases where the domain of the new fact is consistent with the type of
      the pre-extension value. There may be cases where this cross-domain
      passing of facts is valid, but distinguishing them from the invalid
      cases is difficult for me to reason about and to implement.
      Assessing which cases to allow requires details about the context and
      inferences behind the fact being applied which are not available
      within Update. Additional difficulty arises from the fact that the SSA
      does not curently differentiate extensions added by the compiler for
      indexing operations, extensions added by the compiler for implicit
      conversions, or explicit extensions from the source.
      
      Examples of some cases that would need to be filtered correctly for
      cross-domain facts:
      
      (1) A uint8 is zero-extended to int for indexing (a value-preserving
      zeroExt). When, if ever, can signed domain facts learned about the int be
      applied to the uint8?
      
      (2) An int8 is sign-extended to int16 (value-preserving) for an equality
      comparison. Equality comparison facts are currently always learned in both
      the signed and unsigned domains. When, if ever, can the unsigned facts
      learned about the int16, from the int16 != int16 comparison, be applied
      to the original int8?
      
      This is an alternative to CL 122695 and CL 174309. Compared to CL 122695,
      this CL differs in that the facts added about the pre-extension value will
      pass through the Update method, where additional inferences are processed
      (e.g. fence-post implications, see #29964). CL 174309 is limited to bounds
      checks, so is narrower in application, and makes the code harder to read.
      
      Fixes #26292.
      Fixes #29964.
      Fixes #15074
      
      Removes 238 bounds checks from std/cmd.
      
      Change-Id: I1f87c32ee672bfb8be397b27eab7a4c2f304893f
      Reviewed-on: https://go-review.googlesource.com/c/go/+/174704
      Run-TryBot: Zach Jones <zachj1@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarGiovanni Bajo <rasky@develer.com>
      69ff0ba7
    • Sergei Zagurskii's avatar
      reflect: optimize directlyAssignable to avoid rtype.Name call · 8057c088
      Sergei Zagurskii authored
      directlyAssignable invoked rtype.Name() just to compare its result
      to empty string. We really only need to check whether rtype has
      name. It can be done much cheaper, by checking tflagNamed.
      
      Benchmark: https://play.golang.org/p/V2BzESPuf2w
      name                   old time/op  new time/op  delta
      DirectlyAssignable-12  32.7ns ± 6%   6.6ns ± 6%  -79.80%  (p=0.008 n=5+5)
      
      Fixes #32186
      
      Change-Id: I1a2a167dbfddf319fba3015cb6a011bf010f99a8
      Reviewed-on: https://go-review.googlesource.com/c/go/+/178518
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      8057c088
    • Robert Griesemer's avatar
      cmd/compile/internal/syntax: better error recovery after missing expression · dca0d03b
      Robert Griesemer authored
      Don't skip closing parentheses of any kind after a missing
      expression. They are likely part of the lexical construct
      enclosing the expression.
      
      Fixes #33386.
      
      Change-Id: Ic0abc2037ec339a345ec357ccc724b7ad2a64c00
      Reviewed-on: https://go-review.googlesource.com/c/go/+/188502Reviewed-by: default avatarMatthew Dempsky <mdempsky@google.com>
      dca0d03b
    • Jason A. Donenfeld's avatar
      ld: fix up header copy and paste error · 1a423bec
      Jason A. Donenfeld authored
      Some constants were added above the initial copyright blurb, and then
      later a new copyright blurb was added on top of that. So we wound up
      with two header sections, one of which contained a useful comment that
      became obscured. This commit fixes up that mistake.
      
      Change-Id: I8b9b8c34495cdceae959e151e8ccdee3137f6ca4
      Reviewed-on: https://go-review.googlesource.com/c/go/+/191841
      Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      1a423bec
  2. 26 Aug, 2019 13 commits
  3. 25 Aug, 2019 3 commits
  4. 24 Aug, 2019 1 commit
  5. 23 Aug, 2019 4 commits
  6. 22 Aug, 2019 3 commits
  7. 21 Aug, 2019 3 commits
  8. 20 Aug, 2019 2 commits
  9. 19 Aug, 2019 1 commit
  10. 18 Aug, 2019 1 commit
  11. 16 Aug, 2019 3 commits