1. 07 Oct, 2012 23 commits
  2. 06 Oct, 2012 12 commits
    • Nigel Tao's avatar
      image/jpeg: add DCT tests, do a small optimization (common sub-expression · 12e343f3
      Nigel Tao authored
      elimination) in idct.go.
      
      benchmark                   old ns/op    new ns/op    delta
      BenchmarkIDCT                    5649         5610   -0.69%
      BenchmarkDecodeRGBOpaque      2948607      2941051   -0.26%
      
      The "type block" declaration moved so that idct.go is compilable
      as a stand-alone file: "go tool 6g -S idct.go" works.
      
      R=r
      CC=golang-dev
      https://golang.org/cl/6619056
      12e343f3
    • Rémy Oudompheng's avatar
      cmd/gc: avoid clobbering the AST in cgen_callmeth. · 0b2ca9e6
      Rémy Oudompheng authored
      It confused the detection of init loops when involving
      method calls.
      
      Fixes #3890.
      
      R=golang-dev, rsc
      CC=golang-dev
      https://golang.org/cl/6620067
      0b2ca9e6
    • Rémy Oudompheng's avatar
      cmd/6g: fix out of registers when chaining integer divisions. · 46fcfdaa
      Rémy Oudompheng authored
      Fixes #4201.
      
      R=golang-dev, rsc
      CC=golang-dev, remy
      https://golang.org/cl/6622055
      46fcfdaa
    • Rémy Oudompheng's avatar
      cmd/gc: make rnd() more 64-bit-friendly. · 94acfde2
      Rémy Oudompheng authored
      Fixes #4200.
      
      R=golang-dev, dave, rsc
      CC=golang-dev
      https://golang.org/cl/6619057
      94acfde2
    • Rob Pike's avatar
      text/template: fix nil crash on Templates · bcccad40
      Rob Pike authored
      Fixes #3872.
      
      R=golang-dev, rsc
      CC=golang-dev
      https://golang.org/cl/6612060
      bcccad40
    • Rob Pike's avatar
      text/template: add an unexported method to Node · 421b75c0
      Rob Pike authored
      Protects the package a little against undesirable clients.
      
      R=golang-dev, bradfitz, rsc
      CC=golang-dev
      https://golang.org/cl/6624054
      421b75c0
    • Dave Cheney's avatar
      cmd/5g: avoid temporary during constant asop · bbccfddb
      Dave Cheney authored
      func add() int {
              var a int
              a += 10
              a += 20
              a += 30
              a -= 10
              a -= 20
              a -= 30
              return a
      }
      
      before
      
      --- prog list "add" ---
      0000 (/home/dfc/src/add.go:5) TEXT      add+0(SB),$0-4
      0001 (/home/dfc/src/add.go:6) MOVW      $0,R2
      0002 (/home/dfc/src/add.go:7) MOVW      $10,R0
      0003 (/home/dfc/src/add.go:7) ADD       R0,R2,R1
      0004 (/home/dfc/src/add.go:8) MOVW      $20,R0
      0005 (/home/dfc/src/add.go:8) ADD       R0,R1
      0006 (/home/dfc/src/add.go:9) MOVW      $30,R0
      0007 (/home/dfc/src/add.go:9) ADD       R0,R1
      0008 (/home/dfc/src/add.go:10) MOVW     $10,R0
      0009 (/home/dfc/src/add.go:10) SUB      R0,R1
      0010 (/home/dfc/src/add.go:11) MOVW     $20,R0
      0011 (/home/dfc/src/add.go:11) SUB      R0,R1
      0012 (/home/dfc/src/add.go:12) MOVW     $30,R0
      0013 (/home/dfc/src/add.go:12) SUB      R0,R1,R2
      0014 (/home/dfc/src/add.go:12) MOVW     R2,R0
      0015 (/home/dfc/src/add.go:13) MOVW     R2,R1
      0016 (/home/dfc/src/add.go:13) MOVW     R2,.noname+0(FP)
      0017 (/home/dfc/src/add.go:13) RET      ,
      
      after
      
      --- prog list "add" ---
      0000 (/home/dfc/src/add.go:5) TEXT      add+0(SB),$0-4
      0001 (/home/dfc/src/add.go:6) MOVW      $0,R0
      0002 (/home/dfc/src/add.go:7) ADD       $10,R0
      0003 (/home/dfc/src/add.go:8) ADD       $20,R0
      0004 (/home/dfc/src/add.go:9) ADD       $30,R0
      0005 (/home/dfc/src/add.go:10) SUB      $10,R0
      0006 (/home/dfc/src/add.go:11) SUB      $20,R0
      0007 (/home/dfc/src/add.go:12) SUB      $30,R0,R2
      0008 (/home/dfc/src/add.go:13) MOVW     R2,R0
      0009 (/home/dfc/src/add.go:13) MOVW     R2,.noname+0(FP)
      0010 (/home/dfc/src/add.go:13) RET      ,
      
      R=rsc, minux.ma, remyoudompheng
      CC=golang-dev
      https://golang.org/cl/6584056
      bbccfddb
    • Rémy Oudompheng's avatar
      runtime: fix a panic when growing zero-width-element slices. · 782464ae
      Rémy Oudompheng authored
      Fixes #4197.
      
      R=golang-dev, r
      CC=golang-dev
      https://golang.org/cl/6611056
      782464ae
    • Dmitriy Vyukov's avatar
      pprof: add goroutine blocking profiling · 4cc7bf32
      Dmitriy Vyukov authored
      The profiler collects goroutine blocking information similar to Google Perf Tools.
      You may see an example of the profile (converted to svg) attached to
      http://code.google.com/p/go/issues/detail?id=3946
      The public API changes are:
      +pkg runtime, func BlockProfile([]BlockProfileRecord) (int, bool)
      +pkg runtime, func SetBlockProfileRate(int)
      +pkg runtime, method (*BlockProfileRecord) Stack() []uintptr
      +pkg runtime, type BlockProfileRecord struct
      +pkg runtime, type BlockProfileRecord struct, Count int64
      +pkg runtime, type BlockProfileRecord struct, Cycles int64
      +pkg runtime, type BlockProfileRecord struct, embedded StackRecord
      
      R=rsc, dave, minux.ma, r
      CC=gobot, golang-dev, r, remyoudompheng
      https://golang.org/cl/6443115
      4cc7bf32
    • Daniel Morsing's avatar
      test: Add rundir, rundircmpout and errorcheckdir commands to testlib and run.go · ebb0e5db
      Daniel Morsing authored
      rundir will compile each file in the directory in lexicographic order, link the last file as the main package and run the resulting program. rundircmpout is an related command, that will compare the output of the program to an corresponding .out file
      
      errorcheckdir will compile each file in a directory in lexicographic order, running errorcheck on each file as it compiles. All compilations are assumed to be successful except for the last file. However, If a -0 flag is present on the command, the last compilation will also be assumed successful
      
      This CL also includes a small refactoring of run.go. It was getting unwieldy and the meaning of the run commands was hidden behind argument line formatting.
      
      Fixes #4058.
      
      R=rsc, minux.ma, remyoudompheng, iant
      CC=golang-dev
      https://golang.org/cl/6554071
      ebb0e5db
    • Jan Ziak's avatar
      cmd/cc: map C int to int32 in Go defs · 16bea49e
      Jan Ziak authored
      R=golang-dev, minux.ma, rsc
      CC=golang-dev
      https://golang.org/cl/6621052
      16bea49e
    • Dave Cheney's avatar
      cmd/5g: avoid temporary during constant OINDEX · ed0c5dd1
      Dave Cheney authored
      func addr(s[]int) *int {
      	return &s[2]
      }
      
      --- prog list "addr" ---
      0000 (/home/dfc/src/addr.go:5) TEXT     addr+0(SB),$0-16
      0001 (/home/dfc/src/addr.go:6) MOVW     $s+0(FP),R0
      0002 (/home/dfc/src/addr.go:6) MOVW     4(R0),R1
      0003 (/home/dfc/src/addr.go:6) MOVW     $2,R2
      0004 (/home/dfc/src/addr.go:6) CMP      R2,R1,
      0005 (/home/dfc/src/addr.go:6) BHI      ,7(APC)
      0006 (/home/dfc/src/addr.go:6) BL       ,runtime.panicindex+0(SB)
      0007 (/home/dfc/src/addr.go:6) MOVW     0(R0),R0
      0008 (/home/dfc/src/addr.go:6) MOVW     $8,R1
      0009 (/home/dfc/src/addr.go:6) ADD      R1,R0
      0010 (/home/dfc/src/addr.go:6) MOVW     R0,.noname+12(FP)
      0011 (/home/dfc/src/addr.go:6) RET      ,
      
      becomes
      
      --- prog list "addr" ---
      0000 (/home/dfc/src/addr.go:5) TEXT     addr+0(SB),$0-16
      0001 (/home/dfc/src/addr.go:6) MOVW     $s+0(FP),R0
      0002 (/home/dfc/src/addr.go:6) MOVW     4(R0),R1
      0003 (/home/dfc/src/addr.go:6) MOVW     $2,R2
      0004 (/home/dfc/src/addr.go:6) CMP      R2,R1,
      0005 (/home/dfc/src/addr.go:6) BHI      ,7(APC)
      0006 (/home/dfc/src/addr.go:6) BL       ,runtime.panicindex+0(SB)
      0007 (/home/dfc/src/addr.go:6) MOVW     0(R0),R0
      0008 (/home/dfc/src/addr.go:6) ADD      $8,R0
      0009 (/home/dfc/src/addr.go:6) MOVW     R0,.noname+12(FP)
      0010 (/home/dfc/src/addr.go:6) RET      ,
      
      R=rsc, remyoudompheng, minux.ma
      CC=golang-dev
      https://golang.org/cl/6590056
      ed0c5dd1
  3. 05 Oct, 2012 5 commits