1. 11 Dec, 2012 3 commits
  2. 10 Dec, 2012 10 commits
  3. 09 Dec, 2012 4 commits
  4. 08 Dec, 2012 2 commits
  5. 07 Dec, 2012 2 commits
    • Russ Cox's avatar
      math/rand: add example / regression test · b99161e4
      Russ Cox authored
      This makes sure the outputs do not change for a fixed seed.
      See also https://golang.org/cl/6905049.
      
      R=golang-dev, bradfitz
      CC=golang-dev
      https://golang.org/cl/6907048
      b99161e4
    • Russ Cox's avatar
      undo CL 6845121 / 79603a5e4cda · ff2534e0
      Russ Cox authored
      This changes the output of
      
      rand.Seed(0)
      perm := rand.Perm(100)
      
      When giving the same seeds to Go 1.0 and Go 1.1 programs
      I would like them to generate the same random numbers.
      
      ««« original CL description
      math/rand: remove noop iteration in Perm
      
      The first iteration always do `m[0], m[0] = m[0], m[0]`, because
      `rand.Intn(1)` is 0.
      
      fun note: IIRC in TAOCP version of this algorithm, `i` goes
      backward (n-1->1), meaning that the "already" shuffled part of the
      array is never altered betweens iterations, while in the current
      implementation the "not-yet" shuffled part of the array is
      conserved between iterations.
      
      R=golang-dev
      CC=golang-dev
      https://golang.org/cl/6845121
      
      »»»
      
      R=golang-dev, bradfitz
      CC=golang-dev
      https://golang.org/cl/6905049
      ff2534e0
  6. 06 Dec, 2012 17 commits
  7. 05 Dec, 2012 2 commits
    • Ian Lance Taylor's avatar
      gc: avoid meaningless constant overflow error for inverted slice range · 08918ba4
      Ian Lance Taylor authored
      Used to say:
      
      issue4251.go:12: inverted slice range
      issue4251.go:12: constant -1 overflows uint64
      issue4251.go:16: inverted slice range
      issue4251.go:16: constant -1 overflows uint64
      issue4251.go:20: inverted slice range
      issue4251.go:20: constant -1 overflows uint64
      
      With this patch, only gives the "inverted slice range" errors.
      
      R=golang-dev, daniel.morsing
      CC=golang-dev
      https://golang.org/cl/6871058
      08918ba4
    • Dave Cheney's avatar
      cmd/5g: use MOVB for fixed array nil check · 54e8d504
      Dave Cheney authored
      Fixes #4396.
      
      For fixed arrays larger than the unmapped page, agenr would general a nil check by loading the first word of the array. However there is no requirement for the first element of a byte array to be word aligned, so this check causes a trap on ARMv5 hardware (ARMv6 since relaxed that restriction, but it probably still comes at a cost).
      
      Switching the check to MOVB ensures alignment is not an issue. This check is only invoked in a few places in the code where large fixed arrays are embedded into structs, compress/lzw is the biggest offender, and switching to MOVB has no observable performance penalty.
      
      Thanks to Rémy and Daniel Morsing for helping me debug this on IRC last night.
      
      R=remyoudompheng, minux.ma, rsc
      CC=golang-dev
      https://golang.org/cl/6854063
      54e8d504