1. 29 Oct, 2018 7 commits
    • Daniel Martí's avatar
      cmd/compile: typecheck types and funcs before consts · 9ce87a63
      Daniel Martí authored
      This way, once the constant declarations are typechecked, all named
      types are fully typechecked and have all of their methods added.
      
      Usually this isn't important, as methods and interfaces cannot be used
      in constant declarations. However, it can lead to confusing and
      incorrect errors, such as:
      
      	$ cat f.go
      	package p
      
      	type I interface{ F() }
      	type T struct{}
      
      	const _ = I(T{})
      
      	func (T) F() {}
      	$ go build f.go
      	./f.go:6:12: cannot convert T literal (type T) to type I:
      		T does not implement I (missing F method)
      
      The error is clearly wrong, as T does have an F method. If we ensure
      that all funcs are typechecked before all constant declarations, we get
      the correct error:
      
      	$ go build f2.go
      	# command-line-arguments
      	./f.go:6:7: const initializer I(T literal) is not a constant
      
      Fixes #24755.
      
      Change-Id: I182b60397b9cac521d9a9ffadb11b42fd42e42fe
      Reviewed-on: https://go-review.googlesource.com/c/115096
      Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarRobert Griesemer <gri@golang.org>
      9ce87a63
    • Bryan C. Mills's avatar
      cmd/go: support background processes in TestScript · d76b1cdf
      Bryan C. Mills authored
      This will be used to test fixes for bugs in concurrent 'go' command
      invocations, such as #26794.
      
      See the README changes for a description of the semantics.
      
      Updates #26794
      
      Change-Id: I897e7b2d11ff4549a4711002eadd6a54f033ce0b
      Reviewed-on: https://go-review.googlesource.com/c/141218
      Run-TryBot: Bryan C. Mills <bcmills@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      Reviewed-by: default avatarRuss Cox <rsc@golang.org>
      d76b1cdf
    • Filippo Valsorda's avatar
      crypto/tls: rewrite some messages with golang.org/x/crypto/cryptobyte · 4c8b09e9
      Filippo Valsorda authored
      As a first round, rewrite those handshake message types which can be
      reused in TLS 1.3 with golang.org/x/crypto/cryptobyte. All other types
      changed significantly in TLS 1.3 and will require separate
      implementations. They will be ported to cryptobyte in a later CL.
      
      The only semantic changes should be enforcing the random length on the
      marshaling side, enforcing a couple more "must not be empty" on the
      unmarshaling side, and checking the rest of the SNI list even if we only
      take the first.
      
      Change-Id: Idd2ced60c558fafcf02ee489195b6f3b4735fe22
      Reviewed-on: https://go-review.googlesource.com/c/144115
      Run-TryBot: Filippo Valsorda <filippo@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarAdam Langley <agl@golang.org>
      4c8b09e9
    • Daniel Theophanes's avatar
      database/sql: prefer to return Rows.lasterr rather then a static error · cf6e4238
      Daniel Theophanes authored
      Fixes #25829
      
      Change-Id: I400fdaf0ef3a23bc0d61c4873ffa298e0cf0fc6a
      Reviewed-on: https://go-review.googlesource.com/c/145204Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      cf6e4238
    • Daniel Martí's avatar
      text/template/parse: simplify Tree.pipeline · 37afd3e3
      Daniel Martí authored
      The pipeline parsing code was unnecessarily complex. It used a for loop
      with a trailing break, a complex switch, and up to seven levels of
      indentation.
      
      Instead, drop the loop in favor of a single named goto with a comment,
      and flatten out the complex switch to be easier to follow. Two lines of
      code are now duplicated, but they're simple and only three lines apart.
      
      While at it, move the pipe initialization further up to remove the need
      for three variables.
      
      Change-Id: I07b29de195f4000336219aadeadeacaaa4285c58
      Reviewed-on: https://go-review.googlesource.com/c/145285Reviewed-by: default avatarRob Pike <r@golang.org>
      Run-TryBot: Rob Pike <r@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      37afd3e3
    • bill_ofarrell's avatar
      cmd/asm: add s390x VMSLG instruction variants · 3f3142ad
      bill_ofarrell authored
      VMSLG has three variants on z14 and later machines. These variants are used in "limbified" squaring:
      VMSLEG: Even Shift Indication -- the even-indexed intermediate result is doubled
      VMSLOG: Odd Shift Indication -- the odd-indexed intermediate result is doubled
      VMSLEOG: Even and Odd Shift Indication -- both intermediate results are doubled
      Limbified squaring is very useful for high performance cryptographic algorithms, such as
      elliptic curve. This change allows these instructions to be used in Go assembly.
      
      Change-Id: Iaad577b07320205539f99b3cb37a2a984882721b
      Reviewed-on: https://go-review.googlesource.com/c/145180Reviewed-by: default avatarMichael Munday <mike.munday@ibm.com>
      3f3142ad
    • Alex Brainman's avatar
      os: remove sleep in windows Process.Wait · 5c359736
      Alex Brainman authored
      The wait was there, because we discovered that we could not remove
      finished process executable without the wait on Windows XP. But
      Windows XP is not supported by Go. Maybe we do not need the wait
      with modern Windows versions. Remove the sleep.
      
      Fixes #25965
      
      Change-Id: I02094abee3592ce4fea98eaff9d15137dc54dc81
      Reviewed-on: https://go-review.googlesource.com/c/145221
      Run-TryBot: Alex Brainman <alex.brainman@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      5c359736
  2. 28 Oct, 2018 9 commits
  3. 27 Oct, 2018 7 commits
  4. 26 Oct, 2018 11 commits
  5. 25 Oct, 2018 6 commits